Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setProperty,Math.abs doesn't do anything??

Status
Not open for further replies.

Curisco

Programmer
Feb 6, 2002
90
SE
Hi ther folks,
I tried to figure this out and i think setProperty is timming and/or positioning and the Math.abs is to keep the result a "round figure"
However! Having a tweened shaped movieclip with the below script attached, nothing seems to be happening apart from the tweened effect!?..

Guidence would be greatly received,
Thank you
/Ramsey


onClipEvent (enterFrame)
{
if (squareXscale)
{
setProperty("", _xscale, _xscale + (squareXscale - _xscale) / 5);
var xsep = Math.abs(squareXscale - _xscale);
if (squareYscale)
{
setProperty("", _yscale, _yscale + (squareYscale - _yscale) / 9);
var ysep = Math.abs(squareYscale - _yscale);
} // end if
} // end if
}


/* ------- thanks for your time ---------- */

-------------------------------------
Laughing out loud every day,
keeps the doctor away....
Question is ...What's so funny?
-------------------------------------
 
if (squareXscale)

...this will be false if squareXscale is undefined, false, null, or 0. Then nothing will happen.

setProperty("", _xscale, _xscale + (squareXscale - _xscale) / 5);

I think this needs to be:

setProperty(this, _xscale, _xscale + (squareXscale - _xscale) / 5);

...then again I haven't used "setProperty" since Flash 4, may be I'm wrong and you can actually use "" as the path to itself!

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top