July 9, 200818 yr hello there i m new to the field of Flash action scripting, i have designed a banner with animated buttons. If i hover and click the buttons, the animation stops in the down position of the current page. Up to here everything is o k, but i want to make sub menus for the some buttons, like if i hover or click on a button the main buttons animations should animate the way they are and it should open the sub menu on hover and change the color of that particular sub menu button and if i click on the sub menu button it should stay in the down position. If you could help me with this problem or provide some video tut. i will be very much great full to you thanking you anand Here is the code var currentPage; myLoader.contentPath = \"img1.swf\"; stick(\"btnAnim_mc\"); btnAnim_mc.onRollOver = function () { rollover(\"btnAnim_mc\"); } btnAnim_mc.onRollOut = function () { rollout(\"btnAnim_mc\"); } web_mc.onRollOver = function () { rollover(\"web_mc\"); } web_mc.onRollOut = function () { rollout(\"web_mc\"); } ecomm_mc.onRollOver = function () { rollover(\"ecomm_mc\"); } ecomm_mc.onRollOut = function () { rollout(\"ecomm_mc\"); } internet_mc.onRollOver = function () { rollover(\"internet_mc\"); } internet_mc.onRollOut = function () { rollout(\"internet_mc\"); } contact_mc.onRollOver = function () { rollover(\"contact_mc\"); } contact_mc.onRollOut = function () { rollout(\"contact_mc\"); } btnAnim_mc.onRelease = function() { myLoader.contentPath = \"img1.swf\"; stick(\"btnAnim_mc\"); } web_mc.onRelease = function() { myLoader.contentPath = \"img2.swf\"; stick(\"web_mc\"); } ecomm_mc.onRelease = function() { myLoader.contentPath = \"img3.swf\"; stick(\"ecomm_mc\"); } internet_mc.onRelease = function() { myLoader.contentPath = \"img4.swf\"; stick(\"internet_mc\"); } contact_mc.onRelease = function() { myLoader.contentPath = \"img5.swf\"; stick(\"contact_mc\"); } function rollover(movieName) { if (currentPage != movieName) { eval(movieName).gotoAndPlay(\"over\"); } } function rollout(movieName) { if (currentPage != movieName) { eval(movieName).gotoAndPlay(\"out\"); } } function stick(movieName) { if (currentPage != movieName) { eval(currentPage).gotoAndPlay(\"out\"); } currentPage = movieName; eval(currentPage).gotoAndStop(\"down\"); }
Create an account or sign in to comment