Skip to main content
Inspiring
October 6, 2006
Question

Loader Component

  • October 6, 2006
  • 4 replies
  • 254 views
Is it possible to load a picture link from a TXT file using the Loader Component.

Can someone walk me through this and show me the code.

Thanks in advance!
This topic has been closed for replies.

4 replies

Inspiring
October 6, 2006
Do as Mr. Helpy explains and then use this code below with the instance name
of your loader component as "loader":

loader.contentPath = link1;
loader.load();


--

Dan Mode
--> Adobe Community Expert
*Flash Helps* http://www.smithmediafusion.com/blog/?cat=11
*THE online Radio* http://www.tornadostream.com
*Must Read* http://www.smithmediafusion.com/blog



"Mr Helpy mcHelpson" <webforumsuser@macromedia.com> wrote in message
news:eg68um$g5f$1@forums.macromedia.com...
> Oh I'm sorry. I generally hand build that stuff. I can help you if you'd
> like
> to do that, but if you want to just use a canned component, I'm sure they
> have
> documentation around to help you out. (ie- I don't know)
>


Inspiring
October 6, 2006
Oh I'm sorry. I generally hand build that stuff. I can help you if you'd like to do that, but if you want to just use a canned component, I'm sure they have documentation around to help you out. (ie- I don't know)
bcountsAuthor
Inspiring
October 6, 2006
I am sorry - I might have not been clear about what I am using.

I am using the Loader Compnent from the compnents panel.

I want to tell that component to load a picture from a folder on my server through a TXT file making updating the picture simple.

I need the code to tell the component to look to the TXT file for the link where the image is held.
Inspiring
October 6, 2006
of course. All you do when you import data from a .txt file is import variables. (or create variables by importing the entire file).

in you .txt file, you can write

&link1=http://www.13studios.com&link2=http://www.13studios.com/joe

the & symbol tells flash a new variable is a-commin'. Then just use the LoadVars() .load() method to import the .txt file, assign the variables to buttons, and you can have the buttons be links using those variables.

Make sense?