variables to child

I am simply trying to have a child movie, that was loaded into level 1, recognize the variables in the parent movie.

In the parent movie I have this:
_global.address = "222";
loadMovieNum("somemovie.swf", 1);

In the child movie I have used all of there but they don't work;
trace(_level1.address);
trace(_parent.address);
trace(address);
trace(_global.address);

Does anyone know of one that would work? Or is there something else I should do like a POST, if so what would the code look like?

 
DocjaymanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vickerleungCommented:
Docjayman,

How about

trace (this._parent.address);
trace (_root.address);

Vicker
0
nishasrilankanCommented:
trace(_global.address); is working....just check with

Ctrl+Enter >> Debug >> List Variables
0
DocjaymanAuthor Commented:
For some reason when I do hit list variable I get about 1000 lines of code come up which would be impossible to scroll through.  The traces didn't work for me.  Would it matter if the child movie loaded an external swf?  Maybe the _global thing only works with movies within the main movie and not with swfs that are loaded in.  
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

nishasrilankanCommented:
no..I tested it here...as you said..it works man...
Ctrl+Enter >> Debug >> List Variables >> Ctrl+F >> "222" >>Enter

//just find "222" in the listed variables...
0
DocjaymanAuthor Commented:
I agree I made a test movie and it worked, but the original movie containing on the data and forms will not allow it to work for some strange reason.  
0
nishasrilankanCommented:
Sorry...cannot say anything without seeing the .fla

my email is "n i s h a n t h e @ g m a i l . c o m"
you can send it to check.
0
vickerleungCommented:
me2~ vicker@gmail.com
0
blue-genieCommented:
docmanjay.

*laughing at comment*   some reason when I do hit list variable I get about 1000 lines of code come up which would be impossible to scroll through.

your list variables is an integral part of development and debugging, if you're looking for a particular variable simply right click in the output window and use the find option.

ps. shout if it doesnt' get resolved.

blu
0
nishasrilankanCommented:
when I load the external .swf through the atletic.swf....I cannot run the output window (Flash stucked)..I think thats because the variable list is quite big to handle with the output window.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DocjaymanAuthor Commented:
You just have to wait a second for Flash to catch up.  I know it seems as if Flash is stuck but it isn't, I thought the same thing but I just waited it out and the list will complete.  
0
DocjaymanAuthor Commented:
The syntax error is some where in the function validateForm(), in the actions layer, in the academic movie clip.  When I take everything out of this function except the LoadMovieNum(baseballform.swf, 1) it works.  Here is the code:
errors = new Array();
function validateForm() {
      errorLog.text = "";
      errors.length = 0;
      validateACT();
      validateSAT();
      //validateGPA();
      validateClassRank();
      if (errors.length > 0) {
            errorLog.htmlText = "<b>ERRORS:</b><br>";
            var i = -1;
            while (++i < errors.length) {
                  errorLog.htmlText += errors[i] + newline;
            }
errormovie.play();
      } else {
      _root.toolbar.gotoAndStop(3);
      if(already == 2){
      if(sport == "Baseball") {
            loadMovieNum("baseballform.swf", 1);
            _global.already = 3;
      }
      }
      else {
            _level1._visible = true;}
      
      
      _root.academic._visible = false;
      //getURL("athletedatain.cfm", "", "post");
      }
}

function validateAct() {
      if (zip.length > 2 || isNaN(zip) == true) {
            errors.push("Invalid ACT.");
            actR.gotoAndStop(2);
      }else {
            actR.gotoAndStop(1);
      }
}
function validateSAT() {
      if (zip.length > 4 || isNaN(zip) == true) {
            errors.push("Invalid SAT.");
            satR.gotoAndStop(2);
      }else {
            satR.gotoAndStop(1);
      }
}

function validateGPA() {
      if(gpa.lenght != "") {
      if ((gpa.indexOf(".") != 1) || (gpa.length != 4)) {
            errors.push("Invalid GPA ex.=(3.02) or (3.50)");
            gpaR.gotoAndStop(2);
      }else {
            gpaR.gotoAndStop(1);
      }
      }
      }

function validateClassRank() {
      if (isNaN(zip) == true) {
            errors.push("Invalid Class Rank.");
            classrankR.gotoAndStop(2);
      }else {
            classrankR.gotoAndStop(1);
      }
}
0
blue-genieCommented:
djm, what error message are you getting?
or is it simply not working?

0
DocjaymanAuthor Commented:
Thanks guys, but I figured it out.  I learned that _global vaiables don't play by exactly the same rules a var variables.  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.