_currentframe... how to get the current frame label?

Ask a Question related to Adobe Flash, Flex & Director, Design and Development.

  1. #1

    Default _currentframe... how to get the current frame label?

    What actionscript code do I need to get the curreframe's label? I don't
    want the frame number... this way I can make my movie player code more
    generic, instead of having code like:

    if (_currentframe != "100") { .stuff }

    I want:

    if (_currentframe.getlabel() != "end") { ... stuff }


    thanks for the help...



    Andre Guest

  2. Similar Questions and Discussions

    1. Label TextFrams or any frame
      Hi there! I want to label a textframe so I can found it from VB-script. I can label a textframe from a script ,but I cant figure it out how I make...
    2. goToAndPlay - frame;label
      I'm new to FlashMX2004 Pro and to Action Script 2.0, I'm trying to go to a specific frame in the timeline, having problems with this simple code....
    3. determining current label?
      Hi, Does anyone know if there is a way to determine the current frame label in a Flash movie? Thanks in advance, Kelly
    4. controling director frame-label with swish?
      Hi all... I've just created a menu system using swishMax! The problem is it's destined for a macromedia director movie where the menu will...
    5. Capture frame label and assign to variable?
      Is it possible to capture the label for the current frame so that I can assign it to a variable? My frame labels carry the same name as the...
  3. #2

    Default Re: _currentframe... how to get the current frame label?

    Not possible .. you cannot access the frame labels for a frame or the frame
    number for a label in script.

    There are some tricks you can do that involve duplicating the timeline and
    then doing a gotoAndStop to the label you want to find, then getting the
    _currentframe value and the deleting the duplicate (very messy).

    But in general, you cannot do that.

    Instead, do something like add some code to the frame labelled "end" that
    does

    endframe = _currentframe

    and then you can test if _currentframe == endframe


    Artful Guest

  4. #3

    Default Re: _currentframe... how to get the current frame label?

    On Wed, 19 May 2004 10:24:52 -0700, in alt.macromedia.flash "Andre"
    <notvalid@hotmail.com> wrote:
    >| What actionscript code do I need to get the curreframe's label? I don't
    >| want the frame number... this way I can make my movie player code more
    >| generic, instead of having code like:
    >|
    >| if (_currentframe != "100") { .stuff }
    >|
    >| I want:
    >|
    >| if (_currentframe.getlabel() != "end") { ... stuff }
    >|
    >|
    >| thanks for the help...
    AFAIK there is no such function but you could implement your own.
    If frame 1 declare your variable:
    var FrameLabel = "Frame1";

    In each key frame location just set this variable to whatever
    FrameLabel = "Frame200";

    ---------------------------------------------------------------
    [email]jnorth@yourpantsbigpond.net.au[/email] : Remove your pants to reply
    ---------------------------------------------------------------
    Jeff North Guest

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139