Sunday, 30 October 2016

ADD CHILD INTO CLASS AS3

add child as3

-------------------------------------------------------------------------------------------------------
SIMPLE ADD CHILD CODE IN AS3
0) MAKE MOVIE CLIP SYMBOL
1) RIGHT CLICK ON MOVIE CLIP ICON IN LIBRARY WINDOW
2) AND GO TO MOVIE CLIP PROPERTIES
3)TWO CHECK BOXES CHECKED LIKE
Export For ActionScript, Export In Frame 1
4)TYPE IN THE  CLASS  BOX
http://flashcollege.blogspot.co.uk/2015/02/color-matching-game-as3.html
http://flashcollege.blogspot.co.uk/2016/10/symbol-properties-class-as3.html
http://flashcollege.blogspot.co.uk/2016/10/button-function-as3-and-button-class-as3.html

STAGE MOVIE SYMBOL ADD CHILD AS3 - YouTube

https://www.youtube.com/watch?v=aupV4EZqI0Q
5 Mar 2016 - Uploaded by SAVE MONEY
http://flashcollege.blogspot.co.uk/2015/02/movie-shuffle-as3.html ... Game Development in AS3 Part 2 - The ...



-------------------------------------------------------------------------------------------------------
var Btn1:ClassName = new ClassName();
addChild(Btn1);
Btn1.addEventListener(MouseEvent.CLICK,tile_clicked);
function tile_clicked(event:MouseEvent){
trace("Click")
}
-------------------------------------------------------------------------------------------------------
OR USE SIMPLE ADD CHILD CODE WITH MAIN CLASS:
-------------------------------------------------------------------------------------------------------


-------------------------------------------------------------------------------------------------------
1) SAVE YOUR FLA AND CLASS FILE SAVE IN SAME FOLDER
2) FLA FILE NAME = ADD CHILD AS3 
3) CLASS FILE NAME  =  FileNameClassNameSame
4) TYPE FileNameClassNameSame  IN PROPERTIES SECTION  
PENCIL ICON CLASS BOX
5) TYPE ClassName IN SYMBOL PROPERTIES SECTION
-------------------------------------------------------------------------------------------------------







package{

import flash.display.*;
import flash.events.*;

public class FileNameClassNameSame extends MovieClip{

public function FileNameClassNameSame(){

var Btn1:ClassName = new ClassName();
addChild(Btn1);
Btn1.addEventListener(MouseEvent.CLICK,tile_clicked);
function tile_clicked(event:MouseEvent){
trace("Click")
}

}

}
}

--------------------------------------------------------------------------------------------------------
SYMBOL PROPERTIES CLASS AS3
0) MAKE MOVIE CLIP 
1) GO INSIDE PROPERTIES AND SET CLASS NAME FileNameClassNameSame
2) CLICK PENCIL ICON AND SAVE THIS CLASS FILE IN FLA FOLDER
READ MORE:
https://youtu.be/-beq_mz9CJg
-----------------------------------------------------------------------------------------------------------



---------------------------------------------------------------------------------------------------------

package{

import flash.display.*;
import flash.events.*;

public class FileNameClassNameSame extends MovieClip {

public function FileNameClassNameSame() {

this.addEventListener(MouseEvent.CLICK,tile_clicked);
function tile_clicked(event:MouseEvent) {
trace("Click")
}

}

}
}


---------------------------------------------------------------------------------------------------------

















1 comments:

After completing the course of study for your Master's, we are sure you must be worried finishing your term paper. Well, you can turn to us and pay to have your essays written!


EmoticonEmoticon