Blog Archives

adding classes dynamically Part II

A little addition to a previous post on adding symbols dynamically from the library. I was having difficulty adding classes(that weren’t in the library) dynamically – they weren’t being recognised. var classRef:Class = getDefinitionByName(“Square”) as Class; var shape:IShape= new classRef()

Tagged with: ,
Posted in Flash

adding a symbol dynamically from the library

how to add a symbol from the library? in AS2, this.attachMovie(“square”, “square”, 1); and in AS3, var square1:square=new square(); but how do you add a symbol dynamically from the library? say if you have a shape stored in a variable:

Tagged with: ,
Posted in Flash