I assigned a class of bgMountain to an image in my library. How do I (programmatically) create a new symbol, and attach that image to the newly created symbol?
[Embed(source="path_to_hero.png")] //or .jpeg
public class Hero extends Bitmap {
public function Hero(){
}
}
public class Main extends Sprite(){
public function Main():void {
var hero:Hero = new Hero() ;
hero.x = 50 ;
hero.y = 50 ;
stage.addChild(hero) ;
}
}
Here is the tutorial
Also, using SWF library