This content has been marked as final. Show 6 replies
The class is in an AS file probably named GWWindowXP.
Open the properties for GWWindowXP in the library and select the Advanced button and look at AS 2.0 class for the location of the code for this item.
I'm sorry, I guess I didn't make myself clear. I know where the physical code is. What I'm trying to do is access it at runtime, I need to execute functions in that code directly, but I don't have a reference to it.
The Library element is named "frmPublishVideoStream". It's "link to 2.0 class" property is "PublishVideoStreamForm.AS". I need to execute code in PublishVideoStreamForm.AS but cannot because I have no reference to that object at runtime. The question is, how do I get a reference to that object?
You use the import statement and add the line you find in the Advanced properties tag under AS 2.0.
Then you use the instance name in the attachMovie to reference the exposed methods and properties in the class.
As a guess at the details:
Cool! I'll chew on this for a while and see if I can make it work.
I'm reading up on Import, but I think I've got a basic problem. I did this:
without any qualifiers, because in my arrangement, the PublishVideoStreamForm.as file is in the same directory as my ESMS.fla file (ESMS being my app name.)
In my code, I set my instance name to a specific value (this is going to be a problem, because we create unique instance names for each instance of the form we load. We can have as many as 12 up at a time.)
Neither of the calls to Howdy(); results in the alert "Howdy sailor!". I'm obviously missing something still.
I did it in a unique way, though. Since I couldn't get what was suggested here to work, I created an array of objects in my main session class. In the constructor for my inaccessible class, I have it add a reference to itself. I can then walk through the list of windows and have access to the individual instances anytime I want.
It's a round about way, but whatever works!
Thanks for your help.