-
I was wondering if it was possible by Action script
to load images from the outside, like loading variables
from text files.
What I have in mind is to just add jpg images into a folder and for the flash to automatically recognize it and display it, rather then to keep updating the flash file everytime I produce a new image.
-
Well, you have two options to solve that:
1. (and easiest)
Create your swf without the Pictures in it.
write a allPictures.txt file with the names of the pictures in, formated like this:
allnames=picturename1.picturename2.picture-name3......&loaded=a; (picturename should be the name of the file before .jpg)
and save that in the same directory as your swf
add an empty movieclip to the _root. and name it container
add this code to the object:
onClipEvent(load){
_root.actualpicture=0;
loaded=b;
loadVariables("allPictures.txt", this);
}
onClipEvent(enterFrame){
if(loaded=="a"){
theURL=allnames.split;
loaded="b";
}}
create a button in your swf-file
add the action "on(release){loadMovieNum(_container.theURL[_root.actualpicture] add ".swf", 1);
_root.actualpicture++;}
after that create single swf files containing one jpg file on the right position on the screen an name it after the .jpg-picture and save them to the same directory as the main swf.
(note that the code is not perfect, bu you should get the idea....)
2.Option
use Generators......
-
Hi,
if you are dealing with jpeg baseline images only, there are a few tools around that can automate the conversion to swf - either on your own computer or on the server
Musicman
-
Thanks for the tips!!
I've managed to make it work just like badbadzmaru instructed. And I'll look into the tools Musicman.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|