Reputation: 1
Can anyone help me with finding the error here. Its for my loading bar at the begging of my flash movie.
if (_root.getBytesLoaded() == _root.getBytesTotal());
{
gotoAndPlay(4)
}
else
{
gotoAndPlay(1)
}
Upvotes: 0
Views: 306
Reputation: 27045
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.
Upvotes: 0
Reputation: 82594
if (_root.getBytesLoaded() == _root.getBytesTotal()); { gotoAndPlay(4) }
should be
if (_root.getBytesLoaded() == _root.getBytesTotal()) { gotoAndPlay(4) }
You are terminating your if statement with that ;
Upvotes: 3