I am building an application in Flash MX 04 where I would like to
create text boxes dynamically using action script. I can create them
dynamically with code placed on the timeline of the desired slide.
However, I will have many slides that need to create text boxes
dynamically .... so I want to reuse my code. I figured reusing my code
meant creating a class.
I created a class using the working code from a slide. When called
using the class, the XML file does not appear to be loading. I have
tried many different tweaks, but nothing. The best explaination of
what could be happening is here:
http://www.bit-101.com/blog/archives/000023.html
At the above link, he describes the potential problem thusly: "One of
the most confusing issues with AS 2.0 classes is when you declare some
object as a member of the class and then you need to assign a callback
or listener for that object. Perhaps the most common example is where
your class needs to load some XML."
My sample swf can be found here:
http://music.salesrank.info/flash/classXML.html
The fla can be downloaded here:
http://music.salesrank.info/flash/classXML.zip
My question is basically what am I doing wrong and, most importantly,
what how can I fix it? Ideally, the answer would modify my fla file so
it works with a little explaination as to why.
Thanks,
Steve |