Skip navigation
XELAD111
Currently Being Moderated

public var and External swf

Jun 13, 2012 8:14 AM

Hello!

I have some problem with vars. The situation is the same I wrote here Re: External swf

 

I have public var (for example ZZZ) in code of MAIN.swf (main class is Main.as), and I want to access it from code of loaded EXTERNAL.swf.

 

But nothing helps, flash says:

there is no ZZZ in code of Main

there is no ZZZ on stage.root

there is no ZZZ in any parents.

 

But if a have ZZZ in code of EXTERNAL, and want to access it from MAIN,  (the reverse situation), ZZZ is easily found.

 
Replies
  • kglad
    62,203 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 13, 2012 8:26 AM   in reply to XELAD111

    your variable is defined on the main timeline of MAIN.swf so you just need a path to it.

     

    that exact path depends on the scope of EXTERNAL's loader.

     

    (and, of course, you need to make sure that variable is defined before trying to reference it.)

     
    |
    Mark as:
  • kglad
    62,203 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 13, 2012 12:05 PM   in reply to XELAD111

    you're welcome.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points