More information about the Underscore mailing list

[_] Flash Help

Jon Bennett jmbennett at gmail.com
Tue Jan 30 21:29:01 GMT 2007

> Looking for some flash help if anyone out there can...
>
> Creating a dynamic text box and having it zoom in and when reach a
> certain size fade out...
>
> this is the function, but not working ? Any help would be much appreciated
>
> Cheers
>
> _root.onEnterFrame = function() {
>    myFormat.size++;
>    if (myFormat.size>=36) {
>    myFormat._alpha=myFormat._alpha-2.5;
>    }
>    signetText.setTextFormat(myFormat);
> };

hmm, not sure about tweening using a textformat, why not set the font
at 12px, then transform the textfield to 300%, eg:

// first, place your Textfield instance inside a movieclip, for
arguments sake called 'mc'

var myFormat.size = 12;
mc.signetText.setTextFormat(myFormat);

this.onEnterFrame = function ()
{
    if (signetText._xscale < 300)
    {
        mc._xscale = mc._yscale += 10;
    }
    else
    {
        mc._alpha -= 5;
        if (mc._alpha <= 0)
        {
            this.onEnterFrame = null;
        }
    }
}

you may want to look into some of the existing Tween classes here
http://www.actionscriptclasses.com/category/tween/ rather than coding
your own functions.

cheers,

jon


-- 


jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett