how to load dynamic text together with images into one swf
hesuerauh?
What do you mean “images in there”?
ok well I still dont know what you mean but Ill guess. (either way the answer is no).
-
html files with <**img> tags. The images are not IN the text file they are thrown in there from the browser as an external source when the browser reads and sees the <**img> tag instructing for the image to be placed in the document. Flash, when loading text files can understand basic HTML for formatting text in textfields, but this does not include images.
-
images embedded in text documents like in Word or in RTF files. The kind of image data contained within those files are not readable by flash and will often obscure whatever ascii information youre trying to extract. Its not suggested you try loading these files into flash.
-
a bitmap image with text in it. As a jpg or gif, any text within the image is rasterized and a part of the image just as any picture is within that image - a collection of pixels to make up the shapes that appear to be text. This is in no means dynamic and cant be edited from within Flash or durring runtime.
Maybe you should explain what you are trying to do so we can brainstorm on the best way to tackle your problem
ok ok, I have a main movie called. menu.swf and i have another swf which is called products.swf
so products .swf is totally ‘naked’ but i want to dress this guy with some text and images text will be about products and images to show a product, i want for images to have a multiple commands i.e on mouse down to give user some options like to print a picture or to download that picture, to watch a 15 sec. movie clip about that product, or to link user to a instruction page and so on. and i was thinking if i learn how to add images in the same file with a text i can convert that image into MC and add some animation. since i know just a little piece about flash i can’t accomplish what i need. any ideas or suggestions
i am thinking is it possible to load 2 external swf into one main.swf
would be nice if somebody can give me some ideas how i can accomplish what i need.
Thanks
hi
i’m kind of new in flash but what i liked very much was to learn how flash interact with XML files.
said that ,what i suggest to you is that instead of having 2 swf you put it all on one,in that one you use an empty movie clip and an empty dynamic text field,then the only thing you have to do is to read from an xml file the information for the path to the image and the text correspondent to it. I would do something like this:
1st-on my stage put an empty movieclip with an instance name called HOLDER and an empty textbox with var name TXT
2nd-read the xml file
let’s say that my xml file has this structure:
<**?xml ver="1.0"?>
<**!-- i use attributes because i realised that is faster to load--!>
<**images>
<**image url="C:\images\image1.jpg" Desc="This is my image number one"> <**/image>
<**/images>
lets say i saved my xml file as IMAGES.XML
in action script i’d do something like this
myimages_xml=new xml();
myimages_xml.ignorewhite=true;
myimages_xml.onload=loaded;
myimages_xml.load("IMAGES.XML");
function loaded(){
_root=myimages_xml.firstchild;
firstimage=root.firstchild.attributes.URL;
firsttext=root.firstchild.attributes.DESC;
Loadmovie(firstimage,HOLDER);
Txt=firsttext;
}
as you can see its pretty easy,you can add more lines to your xml file with the tags IMAGE
hope i could be helpful,sorry for my english
bye
Edited by senocular for formatting
Cool this is pretty much what I was looking for. Im making an image gallery, BUT unlike you’re version Sen, I want to make it so that clicking on a thumbnail picture launches another browser window with a swf movie that loads the corresponding enlarged image. Any ideas on how I can do this ?
So far Ive sketched it out in my head that I’ll be using an fscommand to call a js function, but Im not sure how the new window with the swf movie will know which enlarged image to load…Possibly some sort of severside php!? Bah I cant my head around it