Skip to main content
October 16, 2007
Question

Info in URL

  • October 16, 2007
  • 32 replies
  • 2207 views
Heres my story

So i have a flash file that has a text box with a scroll bar
thats all the flash file is...just a text box with a scroll bar attached

well i would like to do two different things, totally different
lol

heres number 1:
i have seen in many flash countdowns and stuff that is embeded, the url looks like this, for example:

http://i93.photobucket.com/albums/l80/bigrollerdave/flash/countdownred.swf?da=03&mo=01&words=bday"

If you look after the file is located, it says countdownred.swf?...
it has the extra info that gives the countdown what it needs
For my flash file, i would like to have something like that that would give the flash file the text it needs to be put in the flash file.
so the url would be like:
http://mysite.com/scrollbar.swf?text=this text appears in the scroll bar"


the second thing i would like to do it make a text file with the text, and make the text file in the url so that the text in the text file would be what appears in the scroll bar
so it would be somethin like:
http://mysite.com/scrollbar.swf?text=http://mysite.com/text.txt"
This topic has been closed for replies.

32 replies

October 26, 2007
and so i have my text box with instance name: my_txt
and i have the var as: _root.url

so what is the code i would do so i can make it load the text i label in the url as url and if there is no url then make it autmatically go to, lets say http://mysite.default.txt
October 26, 2007
and so i have my text box with instance name: my_txt
and i have the var as: _root.url

so what is the code i would do so i can make it load the text i label in the url as url and if there is no url then make it autmatically go to, lets say http://mysite.default.txt
October 26, 2007
okay i will try to work on that
but what you say about the as3 thing...
why dont i want to try it?
ive done buttons and a couple things in as3 already

and if flash is moving towards as3 and away from 1 and 2, then shouldn i just start in as3 rather that in as2 and THEN learn as3?
October 26, 2007
AS1 and AS2 are basically the same.

You don't want to try AS3. Trust me.

Looking at the script you posted on kirupa, you want to pass in a textfield path like so:
http://mysite.com/test.swf?url=http://mysite.com/test.txt

Doing that would make the variable "url" with a string value of " http://mysite.com/test.txt" available on the _root timeline of your movie as soon as it loads. Pass that variable in the LoadVars.load() function.
October 26, 2007
i see that this is actionscript 1
what would it be actionscript 3

and i would like need it hooked to a text file
i posted this other forum that fully explains it:

http://www.kirupa.com/forum/showthread.php?p=2231880#post2231880
October 26, 2007
Download the .fla files and take a look at what's happening in them.
October 25, 2007
um i clicked it but it takes me to a directory and i cant click any html page that explains it...
lol
October 25, 2007
October 24, 2007
so what would my new code be, using the code i previously stated, that would make me be able to put "text=..." in the url and it would work?
October 24, 2007
That example is using a completely different method.

A. To put the variable at the end of embed .swf url, use the method I described.

B. Just create a textfield on the stage, give it an instance name via the Property panel of "my_txt" and omit the createTextField line in your example.