FORUMS: list search recent posts

Top level in AS3

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mint Fresh
Top level in AS3
on Jan 18, 2012 at 11:40:34 am


I found a great bokeh effect using AS3 and it's exactly what a client of ours has asked for. My only problem is I'm struggling to overlay some text over the top (I'm relatively new to AS3).

Any pointers would be really appreciated.

The files can be found here.

Many thanks

Return to posts index

Graham Quince
Re: Top level in AS3
on Jan 21, 2012 at 3:26:35 pm


You just need to add a couple of lines of code to the .as file and alter the library contents. The background currently appears on top of the text movieclip.

In your library, right-click on the text movieclip and choose Properties. Then check the box Export for ActionScript. In the class text box, enter: textMC

Save your fla, but keep it open. Now in the as file, underneath:

addEventListener(Event.ENTER_FRAME, frameLoop);

and the following:

var newText:textMC = new textMC();

Your movieclip with text will appear in the top-left corner, so you'll need to use newText.x and newText.y to position it in the stage.

Hope that helps,

Graham - Free FX for amateur films

Return to posts index

Mint Fresh
Re: Top level in AS3
on Jan 23, 2012 at 8:58:11 am

Many thanks, exactly what I needed.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved