A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: Please Help-Alpha?

  1. #1
    Member
    Join Date
    Jun 2002
    Posts
    45
    Does anyone know the actionscript for fading in frames. When I click one of my buttons it goes directly to the frame I want. I want that frame to fade in. Thanks in advance.

  2. #2
    Senior Member
    Join Date
    Jun 2002
    Posts
    199
    you can fade objects, but you can't fade a frame.

  3. #3
    Member
    Join Date
    Jun 2002
    Posts
    45
    That's what I meant. How do I fade in the object?

  4. #4
    Junior Member
    Join Date
    May 2002
    Posts
    27
    1- convert the object to a symbol (f8)
    2- insert object to a frame1
    3- insert keyframe on frame 5
    4- create a motion tween
    5- go to frame1 and put alpha 0

  5. #5
    Member
    Join Date
    Jun 2002
    Posts
    45
    What kind of symbol do I convert it to? And how do I put the alpha setting in?

  6. #6
    Senior Member
    Join Date
    Mar 2002
    Posts
    298
    It's quite file inefficient to put tweens in movies like that, it's also harder to allow fade outs and stuff to work properly.

    I'd just stick this actionscript on the frame:

    Code:
    myMovie._alpha = 0
    myMovie.onEnterFrame = function()
    {
    	this._alpha += 20
    	if (this._alpha >=100)
    	{
    		delete this.onEnterFrame
    	}
    }
    You should call your movie "myMovie" in this case

  7. #7
    Senior Member
    Join Date
    Jan 2001
    Posts
    106

    place this code

    hi soklean,

    As Tom was telling its best to do it using AS. Do not use tweening which will consume more memory.

    Place the following code in the instance of the MC
    //---------code starts---------
    on ClipEvent(Load){
    for(i=100;i>=0;i--){
    this._alpha--;
    }
    }
    //---------code ends-----------

    best of luck
    gnana

  8. #8
    Junior Member
    Join Date
    May 2002
    Posts
    27
    hi.. one question tom or gnana, how can I make this ac work if I have a 5 images, one in each frame, with buttons that will goto next frame?.. like a slideshow?.. thanks a lot...
    (still learning actionscript)

  9. #9
    Member
    Join Date
    Jun 2002
    Posts
    45
    Ok, putting the action script into the frame worked but I ran into another problem. My image fades in but I have two buttons on top of the image that still just pop up. I want the buttons to fade in with the image. Do I need to put actionscript into the button instance also? Thanks in advance...

  10. #10
    Senior Member
    Join Date
    Jan 2001
    Posts
    106
    hi guys,

    For Alviro: You can do that for any number of images,....all that you got to do is either use 5 frames with similar MC and code loading various images....Other way is execute the code then load another image and execute the code again...continue the same for the number of images you have....that will solve your problem....Use loop for executing the code for the number of images you want to slide show.....

    For Soklean:
    Hey that code is for an MC you cannot use that on a button...do one simple thing select both the buttons and make it an MC and place the code in that MC....that's it...

    regards
    gnana

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