-
Righto.
I'm having trouble getting my Flash movie to "act" upon variables imported from text files.
I can get a variable set within the Flash movie to work e.g:
spam = "2";
if (spam>1) {
tellTarget ("spammovieclip") {
gotoAndStop (5);
}
}
I can also load variables from text files without any problems.
What I want to do, is load a variable from a text file, (lets call the variable "textitems")
Then dependent upon the value of the variable textitems, go to a certain frame within a movie clip, and act upon the variable.
Any ideas?
Thanks in advance
H
-
Infinite Loop
Hmmmm, could you eval the loaded variables like this.....
button ex
OnRelease
if (testitems==whatever)
goto (frame number, _root.yourMC)
Just guessing
Hope it helps
GrvDgr
-
Tried it, but it doesn't seem to work!
Any ideas????
-
Infinite Loop
Try this one, notice the subtle diff in code? I left out the quotes, maybe that will help.
on (release) {
;
if (textitems=="whatever")
gotoAndPlay ("Scene",frame,_root.yourMC);
)
Where are you loading the "textitems" variable too? You would need to eval where it is loaded to, example... "textfield"
Hope that helps
GrvDgr
-
Originally posted by grvdgr
Try this one, notice the subtle diff in code? I left out the quotes, maybe that will help.
on (release) {
;
if (textitems=="whatever")
gotoAndPlay ("Scene",frame,_root.yourMC);
)
Where are you loading the "textitems" variable too? You would need to eval where it is loaded to, example... "textfield"
Hope that helps
GrvDgr
I'm trying to load the variable from the text file into wherever I can. I've tried loading I've tried loading it into level_0 and also into a movie clip to do the eval.
I'm stuck!
-
Infinite Loop
Hmmm,just to test, try to eval them from a text field.....
Make a dynamic text box, named "textfield"
at the top of your text file, put ... textfield=
frame 1 of your movie
loadVariablesNum ("http://yoursite.com/textitems.txt", 0);
eval from the text field.....
on (release) {
;
if (textfield=="whatever")
gotoAndPlay ("Scene",frame,_root.yourMC);
)
Hope that helps
GrvDgr
http://caveart.tv
-
Maaaan, I'm being daft. - Forgetting to make the variable literal rather than expressional. . .
How long have I been using Flash again?????
Thanks for the help dude.
H
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|