View Full Version : New question
gromgutten
03-29-2003, 10:48 AM
K, thanks again, I now understand how to make animations within the buttons. But I seem to have found one more "problem".
The animation I made, works like this : all the button on my page has 20 in alpha, and when you hold your mouse pointer over the button, it will fade into 100 in apha.
It is here the problem appears, when you remove the cursor, the button will instantly jump back to 20 i alpha...
And i want it to fade back to 20:(
Any ideas on how i could do this? (By the way, I use Flash MX )
Gromgutten
CyanBlue
03-29-2003, 12:21 PM
Howdy...
Well... You have an effect that fades from 20 to 100 smoothly, and you don't know how to fade it back from 100 to 20 when the event occurs, right???
Show us what you have that fades from 20 to 100 and people will tell you how to reverse it... ;)
zebbah
03-29-2003, 04:17 PM
Try using the invisible button "trick".
Only specify the hit-state of a button to make it invisible and have it control a movie clip with frame labels.
binkyboo
03-29-2003, 06:06 PM
An even easier method.
_root.box._alpha = 20;
_root.box.onRollOver = function() {
_root.box.onEnterFrame = function() {
if (_root.box._alpha<100) {
_root.box._alpha += 5;
}
};
};
_root.box.onRollOut = function() {
_root.box.onEnterFrame = function() {
if (_root.box._alpha>20) {
_root.box._alpha -= 5;
}
};
};
CyanBlue
03-29-2003, 06:12 PM
Oops... You forgot to delete the onEnterFrame handler when it is above 100 or below 20... Are you trying to bog down my poor computer, binkyboo??? ;)
binkyboo
03-29-2003, 06:18 PM
I'm sorry I should explain a bit. You don't have to make a button here. Create a moviclip and give it an instance name of box. Paste the code above into the first frame.
binkyboo
03-29-2003, 06:24 PM
Cyan,
This code isn't consistently running. Why would I have to do that?
binkyboo
03-29-2003, 06:25 PM
As always you're right!
binkyboo
03-29-2003, 06:27 PM
Updated script!
_root.box._alpha = 20;
_root.box.onRollOver = function() {
_root.box.onEnterFrame = function() {
trace("called");
if (_root.box._alpha<100) {
_root.box._alpha += 5;
}
};
};
_root.box.onRollOut = function() {
_root.box.onEnterFrame = function() {
trace("called");
if (_root.box._alpha>20) {
_root.box._alpha -= 5;
} else {
_root.box.onEnterFrame = null;
}
};
};
CyanBlue
03-29-2003, 06:33 PM
You are still missing one on onRollOver, my man...
http://www.fadzter.com/smilies/happydevil.gif
WHY IMG tag is not working??? I don't want the link... :(
binkyboo
03-29-2003, 06:37 PM
You don't need it on the rollover. Try it out.
binkyboo
03-29-2003, 06:38 PM
lmao
Fine!
_root.box._alpha = 20;
_root.box.onRollOver = function() {
_root.box.onEnterFrame = function() {
trace("called");
if (_root.box._alpha<100) {
_root.box._alpha += 5;
} else {
_root.box.onEnterFrame = null;
}
};
};
_root.box.onRollOut = function() {
_root.box.onEnterFrame = function() {
trace("called");
if (_root.box._alpha>20) {
_root.box._alpha -= 5;
} else {
_root.box.onEnterFrame = null;
}
};
};
:)
There ya happy? lol
CyanBlue
03-29-2003, 06:41 PM
Well... Actually I am not...
I still didn't get any response from the original poster regarding this...Well... You have an effect that fades from 20 to 100 smoothly, and you don't know how to fade it back from 100 to 20 when the event occurs, right???I just don't quite get how that can be possible... :(
zebbah
03-29-2003, 09:54 PM
He's got a movie clip with the alpha animation on the Over-frame of a button. When he rolls out the button goes to the Up-frame with no anim on it. I think...?
gromgutten
03-30-2003, 10:13 AM
I need an animation to start when you remove the cursor from the button.
Usually the button is in 20 alpha, and fades in to 100 in alpha when you have the cursor over it..
But the problem is that once i move the cursor away from the button, it will intantly jump back to 20 in alpha, and this is not what i want, I want hte button to fade back into 20 in alpha.
so basically i just need an animation to start when you remove the cursor
(I have already made this animation, just dont know where to put it)
CyanBlue
03-30-2003, 12:20 PM
Um... If zebbah and binkyboo has helped already is not solving your problem, you will have to upload your example so that people can help you the way you want it to be...
gromgutten
03-30-2003, 05:41 PM
You guys helped med alot, thanks.
But ive got a new question for you :P
How can i insert a HTML script into a text in flash?
Like for example <a href="mailto:alfercool@hotmail.com"></a>
gromgutten
03-30-2003, 06:38 PM
When I tried the buttons, I noticed that i could not link them to another part of the page, As I would have done with "usuall" buttons. I used the .zip file Zebbah posted.
How can I link the button to another frame?
(Fram 2 to be excact.)
gromgutten
04-02-2003, 08:46 AM
nevermind. Fixed it. Had to use the _root. command.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.