instead of using the 'getProperty()' method, get the instance variable _y and _x of the mouse object directly. and if you multiply by 100 and divide by 200, it will be easier to just to divide by 2, since 100/200 = 1/2.
so:
zfactor = mouse._y/2;
mouse._y *= zfactor;
mouse._x *= zfactor;
Your algorithm will run quicker in that way, w/o having to call useless methods as eval, get property or set property which consume a lot of memory.
Comments
Wasamonster Says:
Great job, thanks.
Alfredo Says:
What actionscript do you use to make it scale? Do you have to use setProperty(_scale)?
quickflint Says:
thats awesome
Cybersief Says:
i though i was special... how you told me... :(
Ericaka Says:
So where did you get it from anyways?
keicho Says:
instead of using the 'getProperty()' method, get the instance variable _y and _x of the mouse object directly. and if you multiply by 100 and divide by 200, it will be easier to just to divide by 2, since 100/200 = 1/2.
so:
zfactor = mouse._y/2;
mouse._y *= zfactor;
mouse._x *= zfactor;
Your algorithm will run quicker in that way, w/o having to call useless methods as eval, get property or set property which consume a lot of memory.
Flasht Says:
One word, Sweeet.
Madam Shoebox Says:
thats so neato!
Ecniv TR Says:
Now I find myself needing the actionscript for the countdown. D:
AwesomeGirl86 Says:
That's cool!