Skip navigation
Currently Being Moderated

currentLabel Problem

Aug 30, 2012 6:07 PM

I have written a package that I am importing with a public function that wants to use the currentLabel but I am getting a 1120 errror and I am not sure why. I am wanting to use it to get the label of the maintimeline in an FLA. Can anyone help or done this before? Thanks.

 

CODE:

//Get Frame Label

                    public function getcurrentFrameLabel():void

                    {

                              trace("Getting Label Name");

                              trace(currentlabelName);

                              currentlabelName = (currentLabel);

                              //Get Next Frame Label from labesArray

                              nextLabel = labelsArray.indexOf(currentlabelName) + 1;

                    }

 
Replies
  • kglad
    72,340 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 30, 2012 6:37 PM   in reply to TheScarecrow

    you should copy and paste the complete error message after enabling "permit debugging" and indicate the problematic line number.  also, you'll need to post enough of the relevant code to evaluate it. 

     
    |
    Mark as:
  • kglad
    72,340 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 30, 2012 7:01 PM   in reply to TheScarecrow

    sprites don't have a timeline and therefore don't have currentLabel property.

     

    if you're trying to retrieve the currentLabel of some movieclip (which is reasonable), you need to pass a reference to that movieclip to getcurrentFrameLabel and then use the currentLabel property of that movieclip.

     
    |
    Mark as:
  • kglad
    72,340 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 30, 2012 9:28 PM   in reply to TheScarecrow

    if your allActivities instances has been added to the display list, you can use MovieClip(root) to reference the maintimeline and use MovieClip(root).currentLabel to reference the main timeline's currentLabel property.

     

    .

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points