PDA

View Full Version : Input Boxes & Variables between .swf's



chrisbees1
May 22nd, 2002, 12:32 PM
Hi, i hope you guys can help me!

I have two .swf flash 5 movies and on one of them it has two input boxes which for the sake of easyness we'll call....

Inputbox1
Inputbox2

Is there any way that on another .swf file i can recall what the user put in any of the Inputboxes and then if they entered "something" then it would go to a frame.

Thanks in advance, Chris

upuaut8
May 23rd, 2002, 12:34 AM
are you going to end up loading one of these movies into the other one, or are they intended to be used separately on a page or in stand alone players?

chrisbees1
May 23rd, 2002, 01:24 PM
Hi, the two .swf files are completely seperate and i do not intend to load the other one from one of them. Also the two swf files are on two html pages but are stored on the server in the same directory.

Also does any one know how to get it so when you right mouse click on a movie it only comes up with the settings (if flash 6) and the "About Macromedia Flash Player" instead of all the "play", "Stop" and "Forward" rubbish?

upuaut8
May 23rd, 2002, 08:34 PM
The second question.. to disable that, you have to check out the publish settings. I think the html publish tab is the one that holds that option.

The first question. I'm still thinking about this. I believe that the getURL(); global function sends variables to an html page.

So if you had the first swf in an html use the getUrl to another html page, you should be able to send variables to it.

Then if you were to have the address of the swf in the second html page apended with "?myFirstVariable=something&mySecondVariable=something

and those variables were the same as the ones being sent to it, it might very well send and recieve these between the pages. I've never tried this, but it's worth a shot. I'll try to do some testing on that.

ilyaslamasse
May 24th, 2002, 01:06 AM
Check this www.flashxpress.net/2001/.../index.htm (http://www.flashxpress.net/2001/html/flash/integration/synchro/index.htm)
It's about communication between Flash and HTML, but it might help you a bit.

pom 0]

chrisbees1
May 24th, 2002, 11:41 AM
Still havent managed to do it ! Im fairly new to html and javascript so im still learning loads as i am with flash and actionscript.

Ive read about many questions on these forums about using a .txt file as text on a flash movie using dynamic vairables. I have seen examples which incorporate using buttons which i dont quite understand however i dont need to know how to use them to that extent.

However what i want to do is have a dynamic text box on flash movie that will just load the text from a .txt document. Im sure it is fairly simple, i just haven't found a way to get it working properly yet, help would be much appreciated.

Thanks, Chris

upuaut8
May 29th, 2002, 12:01 AM
Take the text box and set it's variable to something like

"_root.myLoadedText"

Then in the first frame of your movie script something like

loadVariable("mytextfile.txt",0);

This will load any variables from the file mytextfile.txt, into the root of the movie. The text field itself can be on the root timeline, or in a movie clip since it's variable is set to "_root" location.

Remember that the txt file must be in the same web folder as the swf that's calling it.