Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Defining _x _y parameters using variables from a text file

Status
Not open for further replies.

davidhammond1

Technical User
Sep 19, 2001
3
NO
Hi,

Im hoplessley trying to change a position (xy value) of a normal circle 'called 'CIRC' using variables from a text file.

I create the txt file. 'text.txt' the contents saying ypos=0 (example). Then in Flash, loadvariablenum ("text.txt,0);then setProperty (circ, _y, ypos); Obviosley this isnt right because it doesnt work.

Can anybody help???????

Dave

 
How come you are using a methid called loadvariablenum? The only one I know of is lodaVariables(). Could this be part of the problem. Are you mixing it up with loadMovienum()?

When you get it working, remember the variables are loaded into the object you specify - so you must address the variables accordingly.

;-)
 
Hi

Im a bit confused, in the actions menu, I insert loadvariables, though in the script it states 'loadvariablesNum()' Is this supposed to happen?

Still baffeled,

Dave
 
The loadVariablesNum action appears just below the loadVariables one... Are you sure you hit the right one?
mywink.gif
ldnewbie
Hope that this
was helpful!
 
Is this because I'm using Flash 5, not 4?
In Falsh 5, I click on 'loadvariables', In this I have the option to change between 'Location' level or Target. When on level, the actionscript says 'LoadVariablesNum' when using target the actionscript saye 'loadvariables.

It does seem I'm reading the text file correctley. In my text file, called text.txt I just have 'ypos=1'. Now in Flash. I loadvariable(withnum),text.txt, then if I insert a textfield in the movie as dynamic text, and set the variable 'ypos'. You will correctley get the value 1 printed on the screen. This shows that the variable is loaded correctley.

But now I want that num 1, to be set to _y position.

I hope Im not confusing you, I really appreciate this help. I used to have a full head of hair, and now Im bald

Dave
 
If the variable is there then it sounds like either an addressing issue - the object is outside the variable scope, try assigining it to root level.

Or there is a problem with the number being a string - convert to integer.

Or it thinks 1 means true - try another number.

;-)
 
What's this CIRC anyway? A mc? Or just a plain circle object?
mywink.gif
ldnewbie
Hope that this
was helpful!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top