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)
yes we can (still using the timeline ?)!
aha yes sometimes
This could help make things easier anyway
Thibault
do your best to make this functionality true.
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);
Hi Cors,
Yes I agree, but if it could be native to the player that would be even much easier no ?
Thibault
Yep, that feature would be awesome! +1
great !
and the method “playToward()” can be added too ?
Who develop in timeline and never write it?
it will be usefull !
Really really useful !
vote++
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.
Hi armetiz,
You are right, it would be nice too
Thibault
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);
}
Cross-linked on Adobe Devnet (on p4 of the article):
http://www.adobe.com/devnet/flash/articles/timelinewatcher.html
great, I didn’t know, thank’s
Any use to you guys?
http://www.tink.ws/blog/framelabelmovieclip-uiframelabelmovieclip/
Hi Tink,
Nice class !
Bookmarked, thanks
PS : Watch out, the Google Code link on your post is broken.
Thibault
Would it be easy to just extend Scene to achieve this?
Trackbacks/Pingbacks (2)
[...] 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 [...]
[...] from Big Spaceship, Adobe DevNet / TimelineWatcher and Bytearray.org I wanted a clean solution to recognize FrameLabels on a timeline without using EnterFrame (which [...]