Groups | Blog | Home
all groups > flash (macromedia) > september 2004 >

flash (macromedia) : Action script in buttons?


Flatwish
9/25/2004 9:35:19 PM
I've got this test file. I would like to know, if i can't put actionscrip into
a keyframe inside a botton, how can i make a fade in and fade out, on a
scroolover the button, instead of just apearing and desapearing.

Another issue, is the animation of that triangle, it has some delay to the
trajectory of the mouse, is this because of the frame rate? each dot is a movie
clip, with code, is the repeat copying of this movie clip, making it too heavy?
can i do it in a simplier way?

Thank you very much

Jo?o

http://pwp.netcabo.pt/0711649201/infobox.html
lumeeguvnor
9/25/2004 10:22:48 PM
i am not really sure what you are asking but
you could convert text to movieClip and use alpha to fade in and out
the same for the button - use movieClip's instead then you can put scripts
wherever you want.
don't know how you coded the animation but you could try using
upDateAfterEvent() which will refresh on action rather than frame rate.
hope this helps
Flatwish
9/26/2004 1:36:15 PM

Well, i've made what you told me... convert text and button into movie clips.
In the triangle i want that a roll over would make the fade in of the text, and
the oposite the fade out... So i was trying to put the event handles
on(rollover) into the first movie clip, and then the load action, to load the
movieclip (text), but that event handler only works with buttons, right?

sorry, i know somethings about flash, but i'm still trying to learn the
basics.

As for the code of the triangle, a member gave me the folowing. how should i
aply the upDateAfterEvent()?

onClipEvent (load) {
maxScale = 500;
minScale = 50;
}
onClipEvent (enterFrame) {
x = _root._xmouse-_x;
y = _root._ymouse-_y;
h = int(Math.abs(Math.sqrt((x*x)+(y*y))))*1;
scale = (100-h>30) ? 110-h : 30;
_xscale = _yscale=scale;
}

Thank you veeerrryyy much

Jo?o
Flatwish
9/26/2004 9:12:33 PM

Errr.... Somebody? anybody?

Pleeeaaasse.

AddThis Social Bookmark Button