dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Text color change effect

  1. #1
    Member
    Join Date
    Jun 2006
    Location
    Croatia
    Posts
    90

    Question Text color change effect

    Hi,

    I was wondering how is done the effect of the text color change where you have for example a letter 'A' which is for example blue and its color changes from left to right to let's say red color? I am not talking about a simple color tween when color of whole letter changes at the same time. There are tons of sites with this kind of effect, but i can't find the sample at the moment but i am sure you know what i mean. Do you have any idea how to accomplish this?

    thanks,
    best regards

  2. #2
    Senior Member
    Join Date
    Apr 2008
    Location
    Nottingham, UK
    Posts
    348
    do you mean a colour gradient tween?

  3. #3
    Member
    Join Date
    Jun 2006
    Location
    Croatia
    Posts
    90
    No, that's not what I mean. Let's say you have letter 'A' in blue color and then letter color changes from left to right from blue to for example red. So color simply changes from left to right. Any ideas?

  4. #4
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    You could do that with masking - wrap the text inside a sprite and use that sprite to mask a rectangle with the gradient in it, then just move the gradient inside rectangle using a shape tween (or make the rectangle twice as wide as the text and move the whole thing). One caveat - you'll need to embed the font and you have to set the mask in actionscript, just using the timeline masking won't work.

    PHP Code:
    textWrapper.cacheAsBitmap true;
    gradientBox.cacheAsBitmap true;
    gradientBox.mask textWrapper

  5. #5
    Member
    Join Date
    Jun 2006
    Location
    Croatia
    Posts
    90
    Thanks neznein9 for suggestion, will try that

    best regards

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center