Can anyone help me with finding the error here. Its开发者_如何学Python for my loading bar at the begging of my flash movie.
if (_root.getBytesLoaded() == _root.getBytesTotal());
{
gotoAndPlay(4)
}
else
{
gotoAndPlay(1)
}
if (_root.getBytesLoaded() == _root.getBytesTotal()); { gotoAndPlay(4) }
should be
if (_root.getBytesLoaded() == _root.getBytesTotal()) { gotoAndPlay(4) }
You are terminating your if statement with that ;
The semicolon on the first row is ending your statement prematurely, you need to drop it:
if (_root.getBytesLoaded() == _root.getBytesTotal())
{
gotoAndPlay(4);
}
else
{
gotoAndPlay(1);
}
Also, it's good practice to always end your lines with a semicolon, it shouldn't matter here, but always do it just to be safe.
精彩评论