|
|
|
#1 |
|
Senior Member
Join Date: Aug 2002
Location: london village
Posts: 623
|
[AS3 question] Class from String?
ok...so I don't know if this is possible...but...
let's say I have stringName = "bigFootball"; is it possible to some how do somehting like this : var ball:class[stringName] = new class[stringname] so initialise an instance of a Class from a string of the class type? danke Chris x
__________________
kill5 |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Aug 2002
Location: london village
Posts: 623
|
[RESOLVED]
you do ti like this: PHP Code:
__________________
kill5 |
|
|
|
|
|
#3 |
|
FK founder & general loiterer
Join Date: Feb 2000
Location: Sydney
Posts: 1,148
|
and if it was like a bitmapData you would put in the parameters eg bg = new Classreference(0,0)... or for any class that takes parameters.
This is very very handy! You can also create classes from loaded swf files which is even cooler, and manipulate, add to the main stage etc etc. You'll need to look for applicationDOmain in the help for that though
__________________
Regards Mark Fennell - Flash Kit Founder, general loiterer ------------------------------- markfennell.com | original games | world panoramas |
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|