Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 07-12-2001, 10:55 AM   #1
barkers
Registered User
 
Join Date: Jul 2001
Posts: 29
Default

i am trying to use loadvariables to to assing values to variables in another movie clip and having problems.
this is quite a difficult problem to explian, bear with me....

i recieve the variables in a clip called:
_level0.loadVars
i am using loadVaraibles several time during the movie, and this is used to recieve all the data.
some of the varables that are recieved need to bee assigned to other movie clips. when i tried sending then (from perl script) like this: _level0.clip1.clip2.clip3.variable, it didnt work (this the variable is _level0.loadVars._level0.clip1.clip2....etc).

got round that by creating a reference to clip3 in the loadVars clip:
var ref = _level0.clip1.clip2.clip3;

this works, but only for assigning values to textboxes, not for variables.

I need to find a way around this, can anyone help?

cant send a string of variables names and values and split them, because theres too much info. it crashes flash.
so i have to assign values to them directly


thanks
barkers
barkers is offline   Reply With Quote
Old 07-12-2001, 01:18 PM   #2
Jesse
ActionScript.org Founder
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: New York
Posts: 8,736
Default

eek, can you post the source or a schematic diagram of the structure coz you lost me (then again I have had only 2 hours sleep in 3 days so I might be a bit slow tonight ) and what do you mean that it works for text fields (which are string variables by the way) and not for 'variables'?
__________________
Cheers

Jesse Stratford
ActionScript.org Cofounder

Please don't email or PM me Flash questions, that's what the Forums are for!

Please don't rely on me reading my PMs either. Email me about important stuff.
Jesse is offline   Reply With Quote
Old 07-12-2001, 01:19 PM   #3
barkers
Registered User
 
Join Date: Jul 2001
Posts: 29
Default

did any one even understand what i was talking about.

i found out whats happenning now. this is it (incase anyone knows anything about this)
the variales that are recieved by the clip _level0.loadVars
are like this:
myclip.1.mainText=sumtext+and+stuff&myclip.1.statu s=1&myclip.2.mainText=more+text&myclip.2.status=4

myclip is a reference to _level0.clip1.clip2.clip3

mainText is a textbox in a movieclip called '1' and another called '2'
status is a variable found in the sames places.

when i load the data, the texts are shown in the boxes (and i suspect that the values assigned to the varaibles), however i cannot access these. every time i trace them it thinks the values have not been assigned.

if i do a list variables i can see
_level0.loadVars.myclip.1.mainText="sumtext and stuff"
_level0.loadVars.myclip.1.status=1
....

_level0.clip1.clip2.clip3.1.mainText=""


its like it hasnt updated the value but has displayed the text in the right boxes.
its really confusing. can anyone shed som light on what the hel is going on.
c'mom jesse you seem to have all the answers

barkers


barkers is offline   Reply With Quote
Old 07-19-2001, 10:15 AM   #4
Pawn Rush
Registered User
 
Join Date: Jul 2001
Posts: 2
Send a message via AIM to Pawn Rush
Default

I know what you are talking about. I have run into a similar problem myself. When you loadVariables it runs on a different thread, so they may not be loaded by the time you try to access them within the same function. Try debuging this by assigning the loadVariables portion of your code to a seperate button Then continue whatever process requires the variables. It should work then.

Let me know how it goes.
Pawn Rush is offline   Reply With Quote
Old 07-19-2001, 10:27 AM   #5
barkers
Registered User
 
Join Date: Jul 2001
Posts: 29
Default

i dont quite understand what you're saying.
Its not that the values are taking a long time to be assigned. I try to access some textbox variables, which i can see have been assigned. but flash doesnt find any value. if i wait and do it again (its basically a simple search that im doing), it still doesnt find a value.

if i have actually typed text in the boxes and then export it, the imported variables overwrite the data in the boxes.
which can clearly be seen on the screen. But when i perform the search for the new values, they're not found. when i search for the values i typed, they are found.
barkers is offline   Reply With Quote
Old 03-26-2006, 07:33 PM   #6
marielisa
Registered User
 
Join Date: Mar 2006
Posts: 1
Default Having the same problem

Sounds like the same problem. I was hoping to find an answer here.

What I'm trying to do is to load variables from a txt file:
Code:
_root.loadVariables("playlist.txt")
Since I'm loading them to the root, I should be able to pass them on to other variables.
Like barkers said, these variables are displayed in any textfield with the same variable name, as long as it is placed on the root.

If my playlist.txt has the following variables, for example:
Quote:
song1=&mysong.mp3
song2=&mysong2.mp3
...etc
and then if I try to pass this value to any movie clip or to another variable, like this:
Code:
completeurl = "mp3folder/"+_root.song2;
the value of song2 that I loaded into the root won't pass to the completeurl value

even if i just pass it on without adding anything else:

Code:
_root.playthissong = _root.song2;
the value of _root.playthissong is unnassigned.

Also if i have a movie clip with a dynamic textfield with variable name song2 and on that same movie clip or on the root I assign
Code:
_root.movieclipname.song2 = _root.song2;
it comes out as undefined

I usually solve it by loading variables in any movie clip where I need them but I'm guessing this isn't very efficient. And most of all, if i have a playlist that switches the number of song i can't pass on the songname to another variable, like this:

Code:
playthisone = _root["song"+_root.currentnumber];

does anybody know how to pass loaded variables to other variables and other movie clips?
marielisa is offline   Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading SWF/or movie clips in sequence Kutha ActionScript 2.0 12 01-07-2005 08:53 PM
animated fireworks: loading random movie clips amlan ActionScript 1.0 (and below) 1 11-21-2004 09:01 AM
Movie Clips Order Luigi Vercotti ActionScript 1.0 (and below) 2 02-27-2004 10:32 AM
POST variables from different clips within the same movie drliebs ActionScript 1.0 (and below) 3 02-19-2004 05:08 PM
target external movie clips variables Flashchick ActionScript 1.0 (and below) 7 11-21-2003 03:41 PM


All times are GMT. The time now is 11:52 AM.

///
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.