My question is fairly simple. In a database I have the URL to a jpg, or other format of picture. I load in that URL as a string, but how do I load that picture into a movieclip in my swf?
Printable View
My question is fairly simple. In a database I have the URL to a jpg, or other format of picture. I load in that URL as a string, but how do I load that picture into a movieclip in my swf?
I think you just use loadMovie
imageMC.loadMovie("../myFolder/myImage.jpg");
or in your case
imageMC.loadMovie(stringVar);
That's what I am trying, but it doesn't appear to be working...
post your code?
Not really a whole lot I can show you code wise. I am importing the URL in from a database using 'varsIn' and the variable photo. The path to the movieClip I want the picture in is box1.name.picture.picture_in
so this is what I have
Code:varsIn.onLoad = function (success) {
if(success) {
box1.name.picture.picture_in.loadMovie(this.photo1);
} else {
//nothing
}
}
is photo one tracing something besides "undefined"?
Does everything trace out correctly ? The success flag and both the filename ( this.photo1 ) and the holder movieclip ?
Remember with load vars the scope goes to the actual load vars object, so you may have to drop a nasty _root in front of the mc name if you're not using Delegate to sort the scope out.
Squize.
Hm... for some reason it works now. I changed what picture I was linking to and it works properly now... I was linking to a .png would that have anything to do with it?
Quote:
Originally Posted by ImprisonedPride
I suppose this means I'm quicker on the draw than you are. Though I suppose from the rumors I have to chalk it up to your age. :pQuote:
Originally Posted by Squize
.png loads fine for me, though I did not test from a database... but it works fine.
hm... not sure what the deal was then... Thanks anyways.