Showing posts with label Action Script. Show all posts
Showing posts with label Action Script. Show all posts
Monday, 15 April 2013
Action Script 3 - Play Symbol Children
This script is an example of how to play a symbol within a symbol
The AA symbol contains the AB symbol
The AB symbol contains the AC symbol
//Stop clip playing
stop();
//Create Listener
AA.addEventListener(MouseEvent.CLICK, C_AA);
//Mouseover button mode
AA.buttonMode = true;
//Create function
function C_AA(event:MouseEvent):void {
//Play AA Symbol
AA.play();
//Play AB Symbol which is a child of AA
AA.AB.play();
//Play AC Symbol which is a child of AB which is a child of AA
AA.AB.AC.play(); }
Original Post Aug 27th 2012
Flash Action Script
//Stop the flash playing
stop();
//Listen for Home Button
Home.addEventListener(MouseEvent.CLICK, onClickHome);
//Function for Home Button
function onClickHome(myEvent:MouseEvent):void {gotoAndStop(“Home”);}
//Listen for Game Button
Game.addEventListener(MouseEvent.CLICK, onClickGame);
//Function for Game Button
function onClickGame(myEvent:MouseEvent):void {gotoAndStop(“Game”);}
//Listen for Billy Button
Billy.addEventListener(MouseEvent.CLICK, onClickBilly);
//Function for Billy Button
function onClickBilly(myEvent:MouseEvent):void {gotoAndStop(“Billy”);}
//Listen for Olaf Button
Olaf.addEventListener(MouseEvent.CLICK, onClickOlaf);
//Function for Olaf Button
function onClickOlaf(myEvent:MouseEvent):void {gotoAndStop(“Olaf”);}
//Listen for Fido Button
Fido.addEventListener(MouseEvent.CLICK, onClickFido);
//Function for Fido Button
function onClickFido(myEvent:MouseEvent):void {gotoAndStop(“Fido”);}
Original Post Aug 7th 2012
Subscribe to:
Posts (Atom)