Jump to content
Search Community

Accessing a normal variable or function from child swf

user8429 test
Moderator Tag

Recommended Posts

Is it possible to access variables or functions belonging to the parent swf from child swf, which are not assigned to _root, withouth changing code of the parent swf? For example in parent swf there is not-root variable called 'x' in 'SomeClass' class. Now I'm loading second swf through 'loadMovie' function and I want to print value of this variable in child swf. I can't just write 'trace(_root.SomeClass.x)' because this is not _root variable.

Link to comment
Share on other sites

  • 5 months later...

hey ya mate. Not sure if this is too late. But you can try tunnelling up from your child swf.

 

trace(this.parent)

trace(this.parent.parent)

trace(this.parent.parent.parent)

 

See what hits.

 

Also try adding Monster Debugger to your child swf and run the companion app to see what it outputs. Might be easier than blind tracing.

 

http://demonsters.nl/nl/projects/monsterdebugger/

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...