Skip to content

Flash has got me!

This one’s for the tech nerds. I recently upgraded to Adobe Creative Suite CS3 Web Design and absolutely love it. I’ve been trucking along through all the programs until I get to Flash CS3. I design a little nav creation as I have done so many times in the past until I go to start Actionscripting. Whoa – actions can’t be applied to objects?! Have to add listener events and all this new standards compliant stuff. I’m all for standards, but this threw me for a curve. I’m still stuck at trying to figure out how to pass variables to functions called by listener events…as soon as I can figure out how to do that, I think I’ll be back on course.

Anybody got any ideas? Below is my actionscript. I have a list of movieclips that I want to jump around the object’s timelines based on hover triggers from another button. I basically want to pass into the function which object I want to send to “in” and “out” frames and thus save lots of redundant programming…

function hoverIn(event:MouseEvent):void{ home.gotoAndPlay(“in”)}
function hoverOut(event:MouseEvent):void{ home.gotoAndPlay(“out”)}

home_btn.addEventListener(MouseEvent.MOUSE_OVER, hoverIn);
home_btn.addEventListener(MouseEvent.MOUSE_OUT, hoverOut);

Find this useful? Take just a moment and give a $1. Thanks!
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)