Flash Button / MovieClip
|
|
Thread rating:  |
Mappa01 - 03 Nov 2008 03:04 GMT Apologies if this is very basic to some of you, but i am a relative newcomer to using Flash.
I'd like to create a button that, when rolled-over, shows two images from the top and bottom joining to make one in the middle, and then when rolled-off, they slide out again. To explain what i mean, i have made a very rough example http://www.fitzroyreds.com.au/Flash/Results Button.fla. I would like the movie to stop at frame five when the mouse is over, and go to frame 1 again (or 10) when it is moved off. I'd like to also make sure that they slide in too, not just pop up.
I hope someone could assist me here with some advice, or a link to a tutorial of some sort. Again, I am very new to this.
Cheers
webqaflash - 04 Nov 2008 06:16 GMT hai, 1.Create new layer name it as 'actions' 2.convert the content in the layer button to a button(Now it is a graphic); Check that the last frame(10) of that layer should also contains the button. 3.Give an instance name button_btn to the button. 4.In the first frame of the actions layer paste the code stop(); button_btn.addEventListener(MouseEvent.MOUSE_OVER,mouseover); button_btn.addEventListener(MouseEvent.MOUSE_OUT,mouseout) function mouseover(e:MouseEvent):void{ gotoAndPlay(2); } function mouseout(e:MouseEvent):void{ gotoAndPlay(6); }
5.In the fifth frame of the actions layer create a key frame (simply press F6) and enter an actionscript(F9) stop(); 6.test the movie.
Mappa02 - 04 Nov 2008 11:52 GMT Many thanks, this works a treat.
Could i be a pain and ask how I might do multiple buttons in one file ? This is for my football club website, and the users can rollover one of five teams to see the result each Monday. I have tried replicating the codes, but changing the button Instance, but it still tells me that there is a replication.
Cheers again.
webqaflash - 04 Nov 2008 12:40 GMT There are several methods , but it is better study this method and made five different movieclips and apply the code and motions to each movie clips.
Mappa01 - 19 Nov 2008 05:37 GMT Once again, thank you very much for your help. I have managed to load the multiple buttons in one file and it is all working great.... BUT..... when i load it into DW I can play the file, however when i upload the page to the web, the flash files do not show up. They don't show up as an error, they just don't show up in IE.
I have tried exporting it in Actionscript 2, thinking that AS3 might be causing the problem, but that brings up a whole new set of errors in itself. Could you have a look at the script below, and secondly tell me if you have come across this before ?
Cheers
<script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab# version=9,0,28,0','width','160','height','296','src','Flash/Results','quality',' high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Pro d_Version=ShockwaveFlash','movie','Flash/Results' ); //end AC code </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve rsion=9,0,28,0" width="160" height="296"> <param name="movie" value="Flash/Results.swf" /> <param name="quality" value="high" /> <embed src="Flash/Results.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Versio n=ShockwaveFlash" type="application/x-shockwave-flash" width="160" height="296"></embed> </object></noscript>
Mappa01 - 19 Nov 2008 05:38 GMT Once again, thank you very much for your help. I have managed to load the multiple buttons in one file and it is all working great.... BUT..... when i load it into DW I can play the file, however when i upload the page to the web, the flash files do not show up. They don't show up as an error, they just don't show up in IE.
I have tried exporting it in Actionscript 2, thinking that AS3 might be causing the problem, but that brings up a whole new set of errors in itself. Could you have a look at the script below, and secondly tell me if you have come across this before ?
Cheers Mappa
<script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab# version=9,0,28,0','width','160','height','296','src','Flash/Results','quality',' high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Pro d_Version=ShockwaveFlash','movie','Flash/Results' ); //end AC code </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve rsion=9,0,28,0" width="160" height="296"> <param name="movie" value="Flash/Results.swf" /> <param name="quality" value="high" /> <embed src="Flash/Results.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Versio n=ShockwaveFlash" type="application/x-shockwave-flash" width="160" height="296"></embed> </object></noscript>
NedWebs - 19 Nov 2008 12:43 GMT Changing between AS3 and AS2 without changing the code (they are quite different) is an accident waiting to happen, so stick with what you have already designed.
Have you loaded the AC_FL_RunContent.js file to the server as well? It needs to be there.
Mappa01 - 20 Nov 2008 00:23 GMT Once again you have given me all the answers that i needed and all is working right. I wasn't aware of the .js script that needed to be loaded up.
Cheers again
|
|
|