FORUMS: list search recent posts

one swf to rule them all

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Gabriel Yépez
one swf to rule them all
on Feb 26, 2009 at 1:47:34 pm

hi, i'm not really new to AS3 but i'm still learning it, so i was doin' a loader for "intro" and for "home".. i get all sorts of problems but afer a 8 hours and twenty cups of coffee i manage to complete it but something is missing a jumper for the "intro" so when it reaches the end it jumps to "home" i actually realized how you do this with

if(currentFrame == totalFrames)

so i get this:

var l:Loader = new Loader();

l.load(new URLRequest("intro.swf"));

l.contentLoaderInfo.addEventListener(Event.COMPLETE, doneIntro);

function doneIntro(e:Event):void
var mcLoaded:MovieClip = as MovieClip;
addChildAt(mcLoaded, 0);
trace("actual", mcLoaded.currentFrame, "total", mcLoaded.totalFrames);
if(mcLoaded.currentFrame == mcLoaded.totalFrames)
trace("playback finished");

ok, the trace of currentFrames and totalFrames is fine, the issue is that for some reason the if statement is never true, and the end is never registered

my principal question is that if i'm already accessing the currentFrame and totalFrames why i can't listen to them in the if statement, i've tried a if to check when currentFrame is 1 and i get true so i don't understand

my loader timeline have only one frame and the intro.swf have 72 is this the problem?, how i make it work?

Return to posts index

Kelly Johnson
Re: one swf to rule them all
on Feb 28, 2009 at 1:40:21 am

I'm just into AS3 at the moment and this is a quick look but shouldn't you be checking the frames loaded of the intro.swf?

It appears as if you're checking the frames loaded of the content holder rather than the actual swf?

Return to posts index

Gabriel Yépez
Re: one swf to rule them all
on Apr 5, 2009 at 12:41:44 am

well, thanks for the advice, but, how i do that?, how u can access the currentFrames of the real swf?


i've been tryin'


but it's wrong, how to say "mcLoaded.thecontent.theactualplayingframe"

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved