Skip to main content
Participant
December 17, 2008
Question

Display List

  • December 17, 2008
  • 1 reply
  • 217 views
I'm having trouble getting at a class. So I have a class in a shell swf that imports a swf and runs it on the stage. When this imported swf is done, I need to tell the class that birthed it to get a new swf. I have a way to do this that works, but I feel like there's a more direct way.

My working way is that the class assigns a variable within the imported swf to hold a pointer to the class ("shellPointer = this;). At the end of the swf, it prefixes a method call with this variable. Simple enough, sure. But I want to know if there's a way for the swf to access the class without the class assigning the pointer. Is there? I tried prefixing the method call with variations on parent and MovieClip(this.parent), but I always get an error.
This topic has been closed for replies.

1 reply

Participant
December 17, 2008
I miss having a global variable - you could always be guaranteed a way to reach an object.