Groups | Blog | Home
all groups > flash actionscript > may 2006 >

flash actionscript : preloader mc must play at least once


mikezile
5/18/2006 9:48:46 PM
I have a preloader made and it works fine, but I want to add an "and" statement
to the if statement that currently says;

if(_root.getBytesLoaded() == _root.getBytesTotal()) {
gotoAndPlay(3);
}
I would like to be able to add (theoretically) "and frame of movieclip equals
at least 50" to the "if" statement. The problem is, I don't know how to
translate that into action script.

The preloader is a your typical bar (which is actually getting bytes loaded)
with a movie clip in the background to make it look a little smoother. I've
tried using "_currentframe", but I think that only gets the frame of when an
action takes place like a mouse click.

my version of the action script looks like this but doesn't work.
if(_root.getBytesLoaded() == _root.getBytesTotal() &&
movieclipname._currentframe >49) {
gotoAndPlay(3);
}
mikezile
5/18/2006 9:55:08 PM
OK, I figured out that I can in fact use _currentframe, but I still need to
know how to add the "and" statement to the existing "if" statement.

Any reply would be appreciated even if you say "your animation is probably
stupid. So, don't worry about it."
mikezile
5/18/2006 10:15:25 PM
AddThis Social Bookmark Button