Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
iota webforumsuser@macromedia.com #1
button: fade in/fade out
below are the actions i've been using to do a button fade in/fade out.
action on frame 1:
McName.onEnterFrame = function() {
if (fade) {
this.nextFrame();
} else {
this.prevFrame();
}
};
stop();
action on button:
on (rollOver) {
_root.fade = true;
}
on (rollOut, dragOut) {
_root.fade = false;
}
the only problem being with this is that the movie clip animation of the fade has to be a shape tween for some reason, and the graphic that needs to fade contains text. and seeing you can't shape tween a symbol you have to break the text, but once you've broken the text you can't alpha fade it. its very annoying.
does anyone know of a way, or can they direct me to a tutorial that shows how to do a simple fade in/fade out button, i didn't think it would be this hard. and not the canfield studios one because thats far to complicated for me and i don't understand the action script.
i've been searching the internet all day and haven't found any useful tutorials that show me what i want to do. if anyone can help it would be much appreciated.
thanks
iota.
iota webforumsuser@macromedia.com Guest
-
Image Fade! - doesnt want to fade!
Hi all, Hope someone can help me. I have found a piece of code from Codelifter.com (http://www.codelifter.com/main/javas...lideshow2.html)... -
play button to start fade out movie
I am using Flash MX to fade out my index page. The fade out works fine. I consider the fading out process to be my movie. I would like to insert a... -
Mouseover 1 button to fade-out other buttons
I am trying to do a mouseover such that when the client passes over one button, all the other buttons fade out (example:... -
Fade out - fade in ....between pages
Hi, I just came across this and need help with something similar. I have four links to each section of my site (about us, portfolio, services,... -
Fade in Fade out text
Is there an easy way to create a scripting to let a script fade in and out? thx in advance brian Im dutch isnt that great! -
urami_ #2
Re: button: fade in/fade out
not really , motion tween will do to ....> the only problem being with this is that the movie clip animation of the fade has to be a shape tween for some reason
yes you can w/o problem , the only reason why would text behave badly would be if you use dynamic> and the graphic that needs to fade contains text. and seeing you can't shape tween a symbol you have to break the text,
instead of static
> but once you've broken the text you can't alpha fade it. its very annoying.
Sure you can , I would suggest a bit for help files reading , seem you missing some really fundamental
flash informations.
Regards
urami_*
<xmas>
[url]http://flashfugitive.com/[/url]
</xmas>
urami_ Guest
-
sneakyimp webforumsuser@macromedia.com #3
Re: button: fade in/fade out
i don't entirely follow your code, but if you have it fading, then that's good.
you don't need to do a shape tween to reduce the alpha of an object to 0. try creating a new graphic symbol for your text...once you put the text in a graphic symbol or movie symbol, you can adjust its alpha to 0 with a motion tween just fine.
hope this helps.
sneakyimp webforumsuser@macromedia.com Guest
-
iota webforumsuser@macromedia.com #4
Re: button: fade in/fade out
hmm... thats weird urami, because originally i got the code from you and in your example the tween was set to shape, i tried using motion but it didn't work.
attached is the original sample file. maybe you can tell me what i'm doing wrong.
[url]http://webforums.macromedia.com/attachments/roll_over_fade.fla.zip[/url]
iota webforumsuser@macromedia.com Guest
-
urami_ #5
Re: button: fade in/fade out
> hmm... thats weird urami, because originally i got the code from you and in your example the tween was set to shape, i tried using motion but it didn't work.
>
> attached is the original sample file. maybe you can tell me what i'm doing wrong.
>
> [url]http://webforums.macromedia.com/attachments/roll_over_fade.fla.zip[/url]
I use shape because shape single color is the most cpu friendly .
The script does not really bother the movie clip content , it only needs frames to progress and
go back so whatever is on these frames will be fine.
Place on top layer , above the shape some text, make sure is STATIC and convert it to symbol.
Motion tween must use symbols and to change color you don't need to actually MOTION the text.
Some people assume Motion means it has to be moving , you can still use it just for color change.
And because motion require symbol not row shape we need the text to be converted to graphic or button
or movie clip and because Dynamic need outlines to utilize color effect , we need STATIC text and if MUST be
dynamic than we need to include the font outlines.
Shape tween text will usually screw up the text , too many curves for flash to maintain the original shape.
Shape tween is good for simple curves.
ANyway , I add text to your sample , check it here
[url]http://www.flashfugitive.com/usr/roll_over_fade.swf[/url]
d/l
[url]http://www.flashfugitive.com/usr/roll_over_fade.fla[/url]
Please ask if you have any more problems.
Regards
urami_*
<xmas>
[url]http://flashfugitive.com/[/url]
</xmas>
urami_ Guest
-
iota webforumsuser@macromedia.com #6
Re: button: fade in/fade out
thanks a lot urami, i managed to get it to work. :D
i've just got 1 more question, i have multiple buttons all on the first frame and i want them all to fade in/out like the original button. how do i go about doing that?
i thought i would just have to duplicate the actionscript like this:
mc0101.onEnterFrame = function() {
if (fade) {
this.nextFrame();
} else {
this.prevFrame();
}
};
mc0102.onEnterFrame = function() {
if (fade) {
this.nextFrame();
} else {
this.prevFrame();
}
};
stop();
and copy the button actionscript to the other buttons:
on (rollOver) {
_root.fade = true;
}
on (rollOut, dragOut) {
_root.fade = false;
}
but it doesn't work, instead when i roll over either button both the mc's fade at the same time. do you know what i'm doing wrong?
thanks
iota.
iota webforumsuser@macromedia.com Guest
-
urami_ #7
Re: button: fade in/fade out
> i thought i would just have to duplicate the actionscript like this:
>Can't use multiple variables of same name , must define individual to each .> but it doesn't work, instead when i roll over either button both the mc's fade at the same time. do you know what i'm doing wrong?
In case of many buttons it is good to make a prototype and use the prototype function .
But for start , just rename each fade
.... if (fade1) {.....
than
.... if (fade2) {.....
etc....
Regards
urami_*
<xmas>
[url]http://flashfugitive.com/[/url]
</xmas>
urami_ Guest



Reply With Quote

