Black Screen on action view video when parallel loading new scene

  • Hi, all.
    I have any problems is black screen on action BEFORE view video
    .....
    <action name="actionVideoPerexod">
    addplugin(videoPerexod);
    set(plugin[videoPerexod].url,plugins/videoplayer.swf);
    set(plugin[videoPerexod].keep,true);
    set(plugin[videoPerexod].width,100%);
    set(plugin[videoPerexod].height,100%);
    set(plugin[videoPerexod].visible,true);
    set(plugin[videoPerexod].alpha,1);
    set(plugin[videoPerexod].pausedonstart, false );
    set(plugin[videoPerexod].onvideocomplete, complete(video,videoPerexod););
    set(plugin[videoPerexod].iscomplete, true );
    set(plugin[videoPerexod].enabled,true);
    set(plugin[videoPerexod].devices,all);
    set(plugin[videoPerexod].loop,false);
    set(plugin[videoPerexod].onloaded, delayedcall(0, loadscene(%2, null, null)); );
    set(plugin[videoPerexod].buffertime,0.1);
    set(plugin[videoPerexod].videourl, %1 );
    </action>

    this is code create dinamic videoAction

    if I create static plugin I have not problems, no I have many large code - This Is bad Idea

    <plugin name="videoperexod" keep="true" ....../>


    <hotname="clickMe" onclick="actionVideoPerexod(video/vyezd_vxod.flv,scene_vxod);"/>
    When, I click a hotspot I see black screen before loading video

    If create plugin as example
    set(plugin[videoPerexod].onvideocomplete, delayedcall(0, loadscene(%2, null, null)); complete(video,videoPerexod););
    than, I have consistency loading new scene
    step 1. view plugin
    step 2. loadscene
    This is - bad Idea

    I have parallel loading new scene when play video with plugin

    My videos time between 1 .. 15 seconds
    If I create plugin as
    set(plugin[videoPerexod].onloaded, delayedcall(1, loadscene(%2, null, null)); );
    than, I have black screen on quick video, If delayedcall(10, loadscene(%2, null, null)) I have not interactive scene


    Thanks All!
    Sorry for my bad english.

    Edited once, last by mxelgin (February 28, 2011 at 8:04 AM).

  • Klauss, I decide problem. This is my code.

    <action name="ready">
    if (plugin[%1].isvideoready == true, delayedcall(0.1, loadscene(%2, null, null)), delayedcall(0.1,ready(%1, %2));
    </action>


    <action name="actionVideoPerexod">
    ......
    set(plugin[videoPerexod].onloaded, ready(videoPerexod, %2); );
    ......
    </action>

    This problem was becouse I dont know function 'isvideoready',
    therefore when I pushed hotspot, function 'onloaded' loaded new scene. When loading new scene per seconds see black screen, becouse plugin not loaded also, Now I wait animate screen, and only later loading new scene. And scene under plugin.

    I hope explain it

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!