Groups | Blog | Home
all groups > flash actionscript > march 2005 >

flash actionscript : Using Variable to define Dynamic images



Dan Defenbaugh
3/18/2005 1:28:12 PM
the text file should read:

pic=babe.jpg

then:

babewindow.loadMovie(pic)

as long as babewindow is at the root and not nested deeper

[quoted text, click to view]
Stckman
3/18/2005 9:08:16 PM
Hi im trying to load a dynamic image. but i want to define the image filename
thru a variable created in a text file. babewindow.loadMovie('babe.jpg'); <---
this loads the pic 'babe.jpg' then i made a text file and in the text file it
says &amp;pic=babe.jpg now i want to apply this variable to the loadmovie so
i wrote babewindow.loadMovie((pic)); what am i doing wrong? i know my
textfile variable is being read cause ive applied it to text boxes in the
running movie and they show the variable contents... what do i need to do to
have a txt file variable applied to this particular function? Thanks. -stick
Byron Canfield
3/22/2005 11:31:55 PM
Try adding an ampersand to the right end of the line, also, just in case the
editor you are using is appending a carriage return (if it does, that
becomes part of the value, which then does not match the filename, as a
return is an illegal character for a filename):

&pic=babe.jpg&

AddThis Social Bookmark Button