A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: animation controlled by AS

  1. #1
    The next Squaresoft
    Join Date
    Sep 2004
    Location
    Zanarkand
    Posts
    215

    animation controlled by AS

    umm im not sure if this is the place to post this but
    its kind a bit of animation...

    so, is there a command that can make a MC's alpha change?

    and also, is there a command that can detect the type of alpha an Mc has?

    like if the Mc is 70% alpha, the command will do something...

    thanks a bunch!!
    "Are those gummy worms? Can I have some?"

    "Nevermind, I just saw one move by itself..."

  2. #2
    Doesn't the name say it all?
    Join Date
    Oct 2000
    Posts
    148
    I would first set up a variable that keeps track of the alpha.

    AlphaVariable=.7

    Then have a constant event that uses the command.

    instancename_alpha=AlphaVariable

    Then since you are using a variable to control the alpha. Setting up an event that's based on alpha would be easy:

    if (AlphaVariable=.70)
    Then (execute action)

    I'm not an actionscript-y person, so don't copy/paste my example because I'm 99% sure it has improper syntax. (I'd use FlashMX's normal mode in the AS window to help guide you) But the command you are looking for is: instancename_alpha=
    (where the instance name is the thing you type in the properties window when you have the MC you want to change selected. You have to give the MC an instance name so the Actionscript can recognize it)

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