PDA

View Full Version : Need Flash MX guru


JGross
12-29-04, 09:25 PM
Anyone here real good with Flash MX? I need some help with my actionscripting but I am new to the program.

Croc Hunter
12-30-04, 08:46 PM
I know it pretty well, satis and others do to, where are you stuck?.

JGross
1-6-05, 12:13 AM
Ok, I am designing a new site and starting off with the intro and I had a good idea for it. I looked around a found a good tutorial on kirupa.com (link to tuorial (http://www.kirupa.com/developer/mx/alpha_fade.htm)) with kinda what I want to do.

I was able to make some modifications to help it work better for me but not what I really want to do. Here is where I am at so far (http://jason-gross.com/4/intro.html).

What I want to do is have the colors change when the x and y mouse positions correlate with the center of the different color areas. For instance, when a person puts thier mouse in the middle of the red section, around (400,150), I want the red to show at 100%. At the moment it is set to do so based on the corners.

Is there anything I can change that would help me achive this with all the colors? It seems to me as though there should be some sort of simple explination. Here is the actionscript:

//Creates a new movie clip on the '_root'
//timeline which is named 'script_clip'
_root.createEmptyMovieClip("script_clip", 0);
script_clip.onLoad = function() {
//Makes variable to store inertia.
mosx = 0;
//Makes variable to store inertia.
mosy = 0;
};
//Starts a movie clip loop that executes
//the code everytime the play head enters
//a frame and this only works in Flash MX
script_clip.onEnterFrame = function() {
//Takes 'mosx' and subtracts by the _xmouse mouse position to yield the difference.
difx = mosx - _root._xmouse;
//Takes 'mosy' and subtracts by the _ymouse mouse position to yield the difference.
dify = mosy - _root._ymouse;
//Subtracts the total of the _xmouse position and 'mosx' and 8 determines the speed of the effect.
mosx -= difx / 8;
//Subtracts the total of the _ymouse position and 'mosy' and 8 determines the speed of the effect.
mosy -= dify / 8;
//Used to control the _alpha setting of 'graphic1' with dependency of the mouse position and inertia.
_root.graphic1._alpha = (mosx / 4) - (mosy / 4);
//Used to control the _alpha setting of 'graphic2' with dependency of the mouse position and inertia.
_root.graphic2._alpha = 100 - (mosx / 4) - (mosy / 4);
//Used to control the _alpha setting of 'graphic3' with dependency of the mouse position and inertia.
_root.graphic3._alpha = (mosy / 4) - 100 + (mosx / 4);
//Used to control the _alpha setting of 'graphic4' with dependency of the mouse position and inertia.
_root.graphic4._alpha = (mosy / 4) - (mosx / 4);
};

Croc Hunter
1-6-05, 09:47 PM
Can you put up a link or PM me one to work with the source .FLA file please.

JGross
1-7-05, 12:13 AM
of course

http://jason-gross.com/4/flash/

everything you need should be in there