Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-29-2003, 06:59 PM   #1
Registered User
Join Date: Jan 2003
Posts: 397
Send a message via ICQ to yorkeylady Send a message via AIM to yorkeylady Send a message via Yahoo to yorkeylady
Default grids to global functions

I started out trying to get my data grid to load data in a sub movie.

With no luck I've thought of trying to change some of my variables and functions to global since the data grid works fine in another layer by itself.

Now my global functions have me confused about the sequence in the program.

For instance, I have a global function that I use to load the variables.

// action script in the root of the movie

_global.loaddoors = function(filetoload){
myvars = new LoadVars();
myvars.onLoad = function(success){
trace("inside onload , success is "+success);
if(success){loadst = myvars.loadst;
if(myvars.doornames == undefined){
root.loadst += " No doors have been read from the database."
_global.doornamesA = myvars.doornames.split("|");
_global.doorpricesA = myvars.doorprices.split("|");
_global.doorquantitysA = myvars.quantitys.split("|");
_global.doordescsA = myvars.doorpics.split("|");
_global.doorpicsA = myvars.doorpics.split("|");
trace("returning 1");
return 1;
}else{return 0;
loadst += " Could not recieve the information from the server.";

loadst = "";
trace("exiting loaddoors method");

//Then in the sub movie I have:
var loadOK = new Boolean();
loadOK = _global.loaddoors("doors.txt");
trace("loadOK is "+loadOK);
trace("doors loaded ok");

/////// My traces is what I'm confused about ////////////
exiting loaddoors method
loadOK is
inside onload , success is true
returning 1

Why is exiting loaddoors method displayed first.
Why doesn't it fork to root then fork back to the frame that called it?
yorkeylady is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 03:22 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.