-
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.
-
you can fade objects, but you can't fade a frame.
-
That's what I meant. How do I fade in the object?
-
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
-
What kind of symbol do I convert it to? And how do I put the alpha setting in?
-
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
-
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
-
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)
-
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...
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|