Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

if Current Frame Lable == ???

Engaged ,
Mar 03, 2009 Mar 03, 2009
currently I have been using this frame number with conditional logic to do some stuff but I know it will and already has come back to haunt me when I made some changes to the timeline. So in order to avoid this is there a way to use if (this._currentlable == FrameLableName) {
//do something
}


similar to:

if (this._currentframe == 41) {
do something();
}
TOPICS
ActionScript
11.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 04, 2009 Mar 04, 2009
AS2 doesn't have a property for the frame label. AS3 does. It's currentLabel. There is also a currentLabels property.
Translate
Engaged ,
Mar 03, 2009 Mar 03, 2009
I think this may be it but if someone could confirm the syntax is correct that would be geat.
I notice it uses "NO"_ in the syntax and also a string instead of frame number.

This does not work the same as the currentframe syntax so something is not correct here.
Maybe I need to omit the "this" from the condition.
Anybody use his method to call or identify a frameLable?

if (this.currentFrameLabel == "CI") {
//do something
}
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 04, 2009 Mar 04, 2009
Unless there is some new old property I never knew about, that is most likely a home-made variable that gets assigned a value via actionscript when timeline travel reaches a frame with a label.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 04, 2009 Mar 04, 2009
AS2 doesn't have a property for the frame label. AS3 does. It's currentLabel. There is also a currentLabels property.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 04, 2009 Mar 04, 2009
LATEST
W_Bell,

>> I think this may be it
>>
>> currentFrameLabel

Conceptually, this exists for ActionScript 3.0 (the actual MovieClip
property is called currentLabel in AS3), but NedWebs nailed it when he
suggested a custom variable:

> Unless there is some new old property I never knew about,
> that is most likely a home-made variable that gets assigned
> a value via actionscript when timeline travel reaches a frame
> with a label.

Remember, you can always find the full functionality of whatever object
you're dealing with by looking up its class in the Help docs. Objects are
defined by classes (think of the class as a blueprint), and the class name
usually matches the name of the object itself. You're dealing with a movie
clip symbol, so you'll be consulting the MovieClip class ( ... see the
TextField class for text fields, the Sound class for sounds, and so on).
Once you're inside the class entry, look for the Properties heading to see
what characteristics the object has -- such as _currentframe, or
currentFrame in AS3 -- look for Methods to see what the object can do, and
look for Events to see what the object can react to.

In AS2, there is no currentLabel property, to as NedWebs described, you
can declare a variable scoped to the movie clip in question, and use frame
scripts to update the value of that variable to represent the names of frame
labels. That way, instead of checking for a property of that movie clip
(such as _currentframe), you can check the value of the variable instead.


David Stiller
Co-author, Foundation Flash CS4 for Designers
http://tinyurl.com/dpsFoundationFlashCS4
"Luck is the residue of good design."


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines