Skip to main content
Participant
October 5, 2008
Question

Im stumped with loading an id number into flash.

  • October 5, 2008
  • 2 replies
  • 304 views
I have a flash file (actionscript 2) created that calls an external text file, and loads it into a scrolling text area.

example: // send and load variables
lv.load(" http://website.com/" + id + ".txt");

the url i want to load looks like this:
http://www.website.com/1.txt

the "1" is the id number. i have multiple id numbers. example: "2", "3", "4" , etc.

if i direct link it like: lv.load(" http://website.com/1.txt"); it works perfect.

however, since i have multiple files, i want to determine the url by the "embed code"

so i have something like
<param name="movie" value="events.swf?id=12" /> and
<embed src="events.swf?id=1" .....

for some reason its not work. I thought I had it right, but apparently not.

I have been wasting hours on this. Someone please help.
This topic has been closed for replies.

2 replies

Known Participant
October 5, 2008
try the following:

- _root.id instead of just id
- pass the id through with <param name="FlashVars" value="id=1"> (in addition to what you have already... different browsers work differently in this case...)
- set a default id in case the id doesn't come through

http://www.permadi.com/tutorial/flashVars/index.html



Hope that helps.

stephank
kglad
Community Expert
Community Expert
October 5, 2008
check id to see if it's what you think it should be.