Copy link to clipboard
Copied
hello
i use a preloader in frame 1 for my project , when i put some image or graphic on Frame 2 the preloader works well and spend a time to load all of them ..
but now i want i put an extrenal FLV videos to Frame 2 and when i do this the preloader not show for a while and then run fast , it seems the preloader not calculate my Flv at all !!
this is my Main script of preloader :
function update(e:Event)
{
var percentage:int;
percentage = Math.round(stage.loaderInfo.bytesLoaded*100/stage.loaderInfo.bytesTotal);
display.text = String(percentage) + "%";
if(percentage >=100)
{
display.text = "100%";
updateTimer.removeEventListener(TimerEvent.TIMER, update);
updateTimer.stop();
updateTimer = null;
// play or stop on the next frame for the loade parent
if(!onFinishPlayParent)
parentMc.gotoAndStop(parentMc.currentFrame+1);
else
parentMc.gotoAndPlay(parentMc.currentFrame+1);
new EazeTween(this).to(1,{alpha:0});
}
}
so how can i set preloader to calculate my external data for loading too ?
cause i dont want to import my FLv to timelinewith 1600 frames !!!
thanks ...
Copy link to clipboard
Copied
if you want to preload your flv and you're using an flvplayback component or the netstream class to play your flv, you must play your flv, then immediately pause it and use a loop (eg, videoprogressevent or enterframe) to check its load status.
Copy link to clipboard
Copied
well i use : File \ import Video \ Load external Video with playback component
i dont know i get your point Dear Kglad or not , as i undrestand i should put my Video in Frame 1 ( same frame preloader exist )
and use script to pause it ?!
and then put the same video or call it from frame 1 to frame 2 too ?!?
if yes , how can i hide this video in frame 1 ?
is there any another way ? for example use script to tell preloader load my flv or any external object with some Var first ?!
Copy link to clipboard
Copied
you can use the visible property of you flvplayback component to hide it or use removeChild() to remove it from the display.
you could add your video to timeline but may cause other problems.
Copy link to clipboard
Copied
thanks Kglad ...
but it seems this way no solve my problem or maybe i use your tips in wrong way ...
i will Try to find another Preloader or tips
Copy link to clipboard
Copied
ok
Find more inspiration, events, and resources on the new Adobe Community
Explore Now