RE: [Flashcoders]

2011-08-19 Thread Mendelsohn, Michael
You're right Kenneth. var g:Vector.uint = Vector.uint([1,2,3,4,5]); var hh:Vector.uint = g.slice(); var h:Vector.uint =; var a = 5; function mapper(item:uint,ind:uint,g:Vector.uint):Vector.uint{ trace(g[ind]+30); return g; } In this case, hh returns the vector, and

[Flashcoders] rotation cw ccw

2011-08-19 Thread nasim hhhhh
how can i recognize cw rotation and ccw rotaion when we want to rotate mvieClip ___ Flashcoders mailing list

Re: [Flashcoders]

2011-08-19 Thread Kenneth Kawamoto
private function arrayMapper(item:uint, index:uint, array:Array):uint { return item + 30; } trace([1, 2, 3, 4, 5].map(arrayMapper)); // traces 31,32,33,34,35 does what it says it does. private function vectorMapper(item:uint, index:uint, vector:Vector.uint):uint { return

Re: [Flashcoders] rotation cw ccw

2011-08-19 Thread Henrik Andersson
You can't unless you assume that the maximum rotation speed is less than 180 degrees per update. This is due to the aliasing problem. This is, assuming that you don't actually know the rotation speed and are calculating the angular difference between two positions.

RE: [Flashcoders]

2011-08-19 Thread Dennis Ernst
function mapper needs to return an element of the new vector. In this case, the vector is a vector of uint, so the mapper function needs to return a uint, not a Vector. This makes sense because mapper is called for every item in g. Say you wanted to populate h with the squares of each

RE: [Flashcoders]

2011-08-19 Thread Mendelsohn, Michael
It sure seems like the documentation is off from what it actually does. Maybe in the mapper function, you can push each iteration out to a new array instead. :-/\ Good luck! - Michael M. -Original Message- From: Kenneth Kawamoto [] Sent: Friday,

Re: [Flashcoders] Custom Event Question

2011-08-19 Thread John Polk
Hey, Jason: Check this out! Then if you d/l it, go to this: file:///Users/blahblahblah.../Downloads/templelibrary_2.9.1/doc/temple/ui/eventtunneling/EventTunneler.html This is an example about how to nest MultiStateButtons and how EventTunneling