View Full Version : Simple ActionScript _framesloaded help wanted
JackJack
08-21-2008, 09:03 PM
This doesn't do what I want it to do, the frames just play right through till the end. I wanted to use the if else statement, but I guess I'm not writing it out correctly.
if (_framesloaded==("Scene 1", "label 100")) {
gotoAndPlay("preloader", "label 50");
} else {
gotoAndPlay("preloader", "label 10");
}
Any insight?
Thanks
:confused:
Medyman
08-22-2008, 12:51 PM
What exactly are you trying to do? What is "Scene 1" representing?
("Scene 1", "label 100") isn't a valid ActionScript object. Even if it were, it wouldn't equal the numberical value of _framesloaded.
JackJack
08-22-2008, 04:39 PM
I have seven scenes in a one flash movie, each named Scene 1, Scene 2, Scene 3 etc... There is a label in Scene 1 named label 100.
It used to be written like this:
ifFrameLoaded ("Scene 1", "label 100") {
gotoAndPlay("preloader", "label 10");
}
That worked, but I wanted more control.
:)
Medyman
08-22-2008, 11:08 PM
If you know what frame ("Scene 1", "label 100") refers to...you can use the same logic as in your first post just replace ("Scene 1", "label 100") with the frame number.
JackJack
08-25-2008, 09:02 PM
Scene 1 is a new scene in the Flash movie file. Label 100 does refer to a frame number in Scene 1, but I'm trying to send the movie to the label, not the frame because the movie my grow or shrink, and the frame number my not stay consistent as I work on the scene.
The ifFrameLoaded sample works fine with the literal names of the scene and label within the quote marks.
I think the problem is my attempt at ActionScript coding.
:(
drluv888
07-10-2009, 03:54 PM
Search on google for the AS you are confused about before posting on a forum. for example a quick google search brought me to Adobe's site for the two actionscript codes, and showed me what you were doing wrong:
ifFramesLoaded
http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary386.html
_framesloaded
http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary522.html
;)
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.