Feature request for Flash Player 11 – FrameLabel (Event.FRAME_LABEL) [ by Thibault Imbert ]

I am sure some of you have already thought about this one :

// retrieve a frame label on the timeline
var myFrame:FrameLabel = this.currentLabels[1];

// listen for Event.FRAME_LABEL dispatched when frame is reached
myFrame.addEventListener ( Event.FRAME_LABEL, onFrameLabel );

function onFrameLabel ( e:Event ):void
{
// do stg
}

This would replace the unofficial and limited addFrameScript function and greatly improve timeline coding.

Yes ! I still like using the timeline ;)

Please vote if you would like to see it, it can help make it happen.

Comments (16)

  1. mama wrote::

    yes we can (still using the timeline ?)!

    Monday, March 9, 2009 at 4:34 pm #
  2. Thibault Imbert wrote::

    aha yes sometimes :) This could help make things easier anyway ;)

    Thibault

    Monday, March 9, 2009 at 4:38 pm #
  3. vitaLee wrote::

    do your best to make this functionality true. ;)

    Monday, March 9, 2009 at 4:53 pm #
  4. Cors wrote::

    I agree with your point, but it’s not so very hard to write a TimeLineController class. I use it like this:


    testTimeline = new TimelineController(this.testClip);
    testTimeline.addLableEventListener('fadeIn', fadeInMethod);

    Monday, March 9, 2009 at 7:14 pm #
  5. Thibault Imbert wrote::

    Hi Cors,

    Yes I agree, but if it could be native to the player that would be even much easier no ?

    Thibault

    Monday, March 9, 2009 at 7:17 pm #
  6. Anton Granik wrote::

    Yep, that feature would be awesome! +1

    Monday, March 9, 2009 at 8:22 pm #
  7. thomas wrote::

    great !

    and the method “playToward()” can be added too ?

    Who develop in timeline and never write it?

    it will be usefull !

    Tuesday, March 10, 2009 at 2:40 pm #
  8. Romain wrote::

    Really really useful !

    vote++

    Wednesday, March 11, 2009 at 2:03 am #
  9. Armetiz wrote::

    Hi thibault,
    In this way, why don’t using a specific Event, like FrameEvent which contains the frameLabel, currentFramePosition (relative to the MovieClip), …

    Like :
    var mc : MovieClip = new Animation ();
    //FrameLabel.ENTER is dispatch when mc player meet a frameLabel
    mc.addEventListener (FrameLabel.ENTER, hldFrame);

    function hdlFrame (ev : FrameLabel) : void
    {
    trace (ev.frameLabel + ” ” + ev.currentPosition);
    }

    Anyway, I vote for this new feature.

    Wednesday, March 11, 2009 at 12:26 pm #
  10. Thibault Imbert wrote::

    Hi armetiz,

    You are right, it would be nice too :)

    Thibault

    Wednesday, March 11, 2009 at 12:52 pm #
  11. Jloa wrote::

    Thibalut, don’t u think that a FontLoader would more great to have?

    Cause currently font embedding is awful like:

    package {
    import flash.display.Sprite;

    import flash.text.Font;

    public class FontFileGoudy extends Sprite
    {

    //here image/Goudy.ttf points to the font file relative to this file
    [Embed(source="image/Goudy.ttf", fontName="Goudy",fontWeight="bold", mimeType="application/x-font-truetype")]
    private var font1:Class;

    public function fontFile()
    {
    trace(”Embedded font in loaded swf”);

    Font.registerFont(font1);//registers font

    trace(”registered font”);
    }
    }
    }

    Image how greate it would be if u have a FontLoader class that would really help u manage ex-fonts like this:

    var fl:FontLoader = new FontLoader();
    fl.addEventListener(FontEvent.COMPLETE, fontLoaded);
    fl.load(new ULRRequest(“fonts/my_font.ttf”));

    function fontLoaded(event:FontEvent):void
    {
    Font.registerFont(event.font);
    }

    Friday, March 13, 2009 at 4:04 pm #
  12. bobby wrote::

    Cross-linked on Adobe Devnet (on p4 of the article):
    http://www.adobe.com/devnet/flash/articles/timelinewatcher.html

    Tuesday, March 17, 2009 at 2:03 pm #
  13. baptiste wrote::

    great, I didn’t know, thank’s

    Monday, March 23, 2009 at 3:40 pm #
  14. Tink wrote::

    Any use to you guys?

    http://www.tink.ws/blog/framelabelmovieclip-uiframelabelmovieclip/

    Monday, April 13, 2009 at 6:15 pm #
  15. Thibault Imbert wrote::

    Hi Tink,

    Nice class !

    Bookmarked, thanks :)

    PS : Watch out, the Google Code link on your post is broken.

    Thibault

    Monday, April 13, 2009 at 6:39 pm #
  16. atraikov wrote::

    Would it be easy to just extend Scene to achieve this?

    Friday, June 25, 2010 at 9:08 am #

Trackbacks/Pingbacks (2)

  1. [...] 31 March, 2009 in bugs and dpdk. Tags: framelabel, movieclip, scene, timeline. While viewing a post on bytearray.org and after teaching a class on creative technology at the avans hogeschool today, I got inspired to [...]

     
  2. [...] from Big Spaceship, Adobe DevNet / TimelineWatcher and Bytearray.org I wanted a clean solution to recognize FrameLabels on a timeline without using EnterFrame (which [...]