Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
Diamonos #1
Please Help - Path Problems
Hi,
this is a question about a movie found under [url]www.flashkit.com[/url] >
Movies: Scripting : Physics : Elastic Button.
If I try to put the 'Bouncing Button'movie clip into another movie
clip the script won´t work anymore.
I think it has something to do with the targetpathes !? Any sugestions
?
Thanks
script for Flash MX:
onClipEvent (enterFrame) {
k = 0.8;
damp = 0.7;
orgzx = _width;
orgzy = _height;
zx = _width;
zy = _height;
lower = _x-(_width*0.5);
higher = _x+(_width*0.5);
bottom = _y+(_height*0.5);
top = _y-(_height*0.5);
scale = 3;
}
onClipEvent (enterFrame) {
inside = (_root._xmouse>=lower) && (_root._xmouse<=higher);
outside = (_root._xmouse<lower) || (_root._xmouse>higher);
func = (_root._ymouse<top) || (_root._ymouse>bottom);
if (inside) {
zx = orgzx*scale;
zy = orgzy*scale;
}
if (outside) {
zx = orgzx;
zy = orgzy;
}
if (func) {
zx = orgzx;
zy = orgzy;
}
ax = (zx-_width)*k;
vx += ax;
vx *= damp;
_width += vx;
ay = (zy-_height)*k;
vy += ay;
vy *= damp;
_height += vy;
}
Diamonos Guest
-
importFileInto path problems
Hi! I have problems with the paths that use this function with each situation. In projector author or local shockwave I can pass the all path or... -
Path problems
There's the searchCurrentFolder property that's set true by default. OF course Quicktime must be installed on the windows system ( not standard... -
graphics path problems
I've had this problem before and can't remember how to repair it. when I publish my move, I get an error that a graphic cannot be found. I see... -
SWF export path problems
When exporting from Freehand MX to swf the paths of my illustration in certain instances change line weights they are OK in the freehand swf preview... -
Path problems on PC to mac transfer
I've created a crossplatform project. I am using a MAC with Toast to burn my CDs. At this point in time I'm only interested in burning the PC side... -
Diamonos #2
Please Help - Path Problems
Hi,
this is a question about a movie found under [url]www.flashkit.com[/url] >
Movies: Scripting : Physics : Elastic Button.
If I try to put the 'Bouncing Button'movie clip into another movie
clip the script won´t work anymore.
I think it has something to do with the targetpathes !? Any sugestions
?
Thanks
script for Flash MX:
onClipEvent (enterFrame) {
k = 0.8;
damp = 0.7;
orgzx = _width;
orgzy = _height;
zx = _width;
zy = _height;
lower = _x-(_width*0.5);
higher = _x+(_width*0.5);
bottom = _y+(_height*0.5);
top = _y-(_height*0.5);
scale = 3;
}
onClipEvent (enterFrame) {
inside = (_root._xmouse>=lower) && (_root._xmouse<=higher);
outside = (_root._xmouse<lower) || (_root._xmouse>higher);
func = (_root._ymouse<top) || (_root._ymouse>bottom);
if (inside) {
zx = orgzx*scale;
zy = orgzy*scale;
}
if (outside) {
zx = orgzx;
zy = orgzy;
}
if (func) {
zx = orgzx;
zy = orgzy;
}
ax = (zx-_width)*k;
vx += ax;
vx *= damp;
_width += vx;
ay = (zy-_height)*k;
vy += ay;
vy *= damp;
_height += vy;
}
Diamonos Guest



Reply With Quote

