dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: urgent help - simple AS fade needed

  1. #1
    Junior Member
    Join Date
    Mar 2001
    Posts
    14
    Hi there,

    Please could someone put me out of my misery. I've built a few sites in Flash using tweening but I am trying to use actionscripting to control animations for the first time. All I want to do is get some code that will fade a MC instance in during 1 frame ( ie. Alpha 0 to Alpha 100 ). I'm sure this is really easy but my head is falling to bits - I have a deadline for friday and things aren't looking too good! PLEASE, PLEASE could someone help. I found the following code that fades an MC instance in and out but even this does too much!

    onClipEvent (load) {
    val = 100;
    }

    onClipEvent (enterFrame) {
    if (val >= 100) addval = -5;
    if (val <= 0) addval = 5;

    val += addval;

    this._alpha = val;
    }

    Any help would be very, very much appreciated!

  2. #2
    Welcome to flavour country
    Join Date
    Sep 2000
    Posts
    662
    If you just want to fade it in, here's some code that works. Just attach it to the movieclip itself.

    Code:
    onClipEvent (load) {
    _alpha=0;
    }
    onClipEvent (enterFrame) {
    _alpha+=2;
    }

  3. #3
    Junior Member
    Join Date
    Mar 2001
    Posts
    14

    Thanx

    O.K. sorted it - thanx for the help er, ... thewiz 1972 (!).

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