-
1. Re: Load multiple swf play one by one when required
Ned Murphy Aug 13, 2012 5:42 AM (in response to rahimhaji)You need to either have something in the first trigger the start of the second when it completes, or you need something external that is capable of monitoring the first to see when it completes so that it can trigger the second to start. The design/code you currently have will help to determine which is the more likely way for you to proceed.
-
2. Re: Load multiple swf play one by one when required
rahimhaji Aug 14, 2012 2:28 AM (in response to Ned Murphy)Dear Mr.Nedmurphy,
Thks for ur reply. I need to load both swf same time, when one get finished other one has to play immediately. My aim is to reduce the loading time, if i load 2nd one after first one finish viewer has to wait till it load, so i want to load 2nd one while first one playing, and play the 2nd one when 1st one finish.
Thanks in advance,
Syed Abdul Rahim
-
3. Re: Load multiple swf play one by one when required
Ned Murphy Aug 14, 2012 5:07 AM (in response to rahimhaji)Loading time is loading time, and you cannot reduce how long it takes. It is not clear where you are having trouble. Are you able to load the second file while the first is playing? Are you able to detect when the first has stopped playing? Are you able to start the second swf playing when you need it to play?
-
4. Re: Load multiple swf play one by one when required
Amit Shakya Aug 14, 2012 7:53 AM (in response to rahimhaji)see i write code for you may be it will helps you
var vidno:int=1
var totalvideos:int=10
var ld:loader
function loadvideo(str:String)
addChild(ld)
loader.load(urlrequest(str))
loader.contentLoaderInfo.addEventListener(Event.Complete,loadnext)
function loadnext(event:Event):void{
removeChild(ld)
if(vidno<totalvideos){
vidno++
loadvideo('vid'+vidno+'.swf')
}
}
loadvideo(vid1.swf)
try it..
-
5. Re: Load multiple swf play one by one when required
Ned Murphy Aug 14, 2012 9:02 AM (in response to Amit Shakya)You should rewrite that code, correctly, so that it makes sense. It is very difficult to help someone with code if they are not showing the code they are actually using, and if you are actually using the code you showed, you should have errors. You have a Loader named 'ld' that does nothing - not an error, but it serves no purpose. You have a class and function that do not exist as far as I know (loader, urlrequest)
-
6. Re: Load multiple swf play one by one when required
rahimhaji Sep 2, 2012 8:37 PM (in response to Ned Murphy)Thks Mr.Ned murphy,
i found the solution, what i did was, i loaded 2 different swf with 2 different loaders. i stoped playing second loaded swf by MovieClip(loder.content).gotoAndStop(1)
Thks & Regards,
Syed Abdul Rahim



