dcsimg
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Text not working with alpha changes

  1. #1
    Member
    Join Date
    Jun 2007
    Posts
    39

    Text not working with alpha changes

    I have a movieclip with some text, it starts at 0% alpha and then I want to make a simple AS that will bing up the alpha to 100%, but the first problem that I have is that when I just test it, I have the whole movieclip set to 0% alpha, yet the text is shown at 100% alpha. The text parts are supposed to be buttons so I later changed them to button and set thier induvidual alpha to 0% but they still show when I test my fla.

    Ive tried set them to random alphas like 35% but you can still see them clearly with 100% alpha, its very strange and I dont understand what the problem is. I also tried to then disable the buttons with actionscript but they are still at 100% alpha.

    And what is wrong with this code?

    Code:
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    
    test.addEventListener(
      MouseEvent.MOUSE_DOWN,
      function(evt:MouseEvent):void {
    	  new Tween(submenu_mc, "_alpha",Regular.easeOut,0,100,12,false);
    	  }  
    );
    Last edited by Zahmet; 07-17-2007 at 08:53 AM.

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    You have AS2 syntax. Change to:

    new Tween(submenu_mc, "alpha",Regular.easeOut,0,1,12,false);
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  3. #3
    Member
    Join Date
    Jun 2007
    Posts
    39
    Thanks alot

    but you dont happen to have any clue about the alpha things?

  4. #4
    Actionscript 3, postproduction georgecalgary's Avatar
    Join Date
    Jun 2005
    Location
    Toronto
    Posts
    229
    TextField alpha should only work for embeded fonts text (load fonts with libray or dynamically fonts loaded, check Adobe tutorial.).

  5. #5
    Member
    Join Date
    Jun 2007
    Posts
    39
    Im only changing the alpha for the whole movieclip and the text is a part of that, ánd when I try to change the alpha for the text from the properties panel then it changes on the stage where im working, but it gets to 100% when I test it (ctrl+enter).

    The font im useing is "Tahoma" but it doesnt matter if I change to something simple like "Times new roman"

  6. #6
    Member
    Join Date
    Jun 2007
    Posts
    39
    Ive keept on testing turning the text into an graphic, set the "color" of the text to alpha0 etc. nothing seems to work. There must be some logical thing that Im doing wrong, can anyone think of it?

  7. #7
    Amazed and Amused Mazoonist's Avatar
    Join Date
    Mar 2006
    Location
    Northern California
    Posts
    201
    For one thing, take away the underscore from in front of alpha. In AS3 they took away all the underscores from MovieClip properties.

  8. #8
    Member
    Join Date
    Jun 2007
    Posts
    39
    cancerinform already said that, well it got it to work finaly, had to change the text to dynamic and embed it. Working now.

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