Actually the function will remember what the temp variable points to even after everything goes out of scope through the so-called closure. So change is scope is not necessary for this teaser's fix.
----- Original Message ---- From: Steven Sacks | BLITZ <[EMAIL PROTECTED]> To: Flashcoders mailing list <[email protected]> Sent: Wednesday, October 11, 2006 11:50:13 AM Subject: RE: [Flashcoders] brain teaser: filter tweening code has a problem, can you spot it? You've got a scope issue. The movieclip has no idea what gfBX or gfBY is on rollover because they are just temporary variables in your iterator and once your iterator is done they're gone and the movieclip has no reference to them. You need to assign gfBX and gfBY to the movieclip so it knows what they are. mc.gfBX = gfBX; mc.onRollOver = function() { this.gfBX.continueTo(30, 2); }; Follow? HTH, Steven _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

