A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [RESOLVED] AS3 Alpha coding help!

Hybrid View

  1. #1
    AS3 N00B
    Join Date
    Feb 2002
    Location
    NYC
    Posts
    308

    resolved [RESOLVED] AS3 Alpha coding help!

    I have 12 bars and every time it plays frame 1 I want the bar to get darker. Am I doing it correctly?

    Code:
    for (var ii:Number = 1; ii < 13; ii++){
    	this["bar"+ii].alpha += ii * 0.083;
    }
    Also, is it possible to call on an instance and detect what the alpha is on it? So that once the alpha is 0.996 it resets to 0?

    Thanks in advance.
    -Neo

  2. #2
    Senior Member jweeks123's Avatar
    Join Date
    Mar 2006
    Posts
    1,124
    Do you mean your playing these on a timeline? Or what exactly?

  3. #3
    AS3 N00B
    Join Date
    Feb 2002
    Location
    NYC
    Posts
    308
    Yes, the snippet above is in frame 1 and in frame 2 I have "gotoAndPlay(1);" So essentially its a loop.
    -Neo

  4. #4
    Senior Member jweeks123's Avatar
    Join Date
    Mar 2006
    Posts
    1,124
    Is this what your after?

    Granted I used frame 1 to dynamically create my clips, but the concept is still the same with frames 2 and 3.
    Attached Files Attached Files

  5. #5
    AS3 N00B
    Join Date
    Feb 2002
    Location
    NYC
    Posts
    308
    thank you so much! not exactly what i was looking for but it helped greatly! really appreciate the time and effort into making that fla and uploading it for me. thank you again!
    -Neo

  6. #6
    Senior Member jweeks123's Avatar
    Join Date
    Mar 2006
    Posts
    1,124
    No problem. Is there any further assistance that I can offer? I'm sorry that wasn't exactly it, but glad it helped.

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