PDA

View Full Version : dynamic load of picture?


alsvik
03-18-2003, 05:29 PM
How do i load pictures dynamic? I've found out how to load text from txt-files (saw it in a tutorial)
But how do i do that with a picture?

DuRanG
03-18-2003, 06:03 PM
using loadMovie()

alsvik
03-24-2003, 08:54 AM
Great!

Thank you. It helped. I've just used the script u wrote here and changed it to fit my needs.

But in case i have a lot of pictures in different sizes, how do i make sure the will fit to the "image holder"?

Can i add something to the script to make sure it's centered in the image holder? and that it fits within the imgaholder.
As it is now it only fits on horizontal level.

From FLASH MX-Forum:
I've done it like this:

myPicture = new loadVars()
myPicture.onLoad = function () {
loadMovie(myPicture.photo, "image")
}
myPicture.load("gallery_picture.txt")


But how can i create a "image holder" of, lets say 200x400px and make the image (150x300px) be centered within this "image holder" ? Right now, the above mentioned case will cause the image to be placed in the upper left corner of the "image holder"

Fitting the pictures to the image holder (same size) could be a solution, but that will make it more (than necessary) difficult to switch pictures.
It's possible that i would like to switch from horizontal to vertical pictures from time to time....
!?!?
Does anybody have "EASY" solution to this problem!?