|
-
Senior Member
Loading JPG from URL
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?
"If I have seen further it is by standing on the shoulders of giants." Isaac Newton
------------------------------------------------------------------------------
-
I think you just use loadMovie
imageMC.loadMovie("../myFolder/myImage.jpg");
or in your case
imageMC.loadMovie(stringVar);
-
Senior Member
That's what I am trying, but it doesn't appear to be working...
"If I have seen further it is by standing on the shoulders of giants." Isaac Newton
------------------------------------------------------------------------------
-
-
Senior Member
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
}
}
"If I have seen further it is by standing on the shoulders of giants." Isaac Newton
------------------------------------------------------------------------------
-
Pumpkin Carving 2008
is photo one tracing something besides "undefined"?
The 'Boose':
ASUS Sabertooth P67 TUF
Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
8GB G.Skill Ripjaws 1600 DDR3
ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
New addition: OCZ Vertex 240GB SATA III SSD
WEI Score: 7.6
-
Hype over content...
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.
-
Senior Member
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?
"If I have seen further it is by standing on the shoulders of giants." Isaac Newton
------------------------------------------------------------------------------
-
Pumpkin Carving 2008
 Originally Posted by ImprisonedPride
Today, 05:03 PM
 Originally Posted by Squize
Today, 05:04 PM
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. 
.png loads fine for me, though I did not test from a database... but it works fine.
The 'Boose':
ASUS Sabertooth P67 TUF
Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
8GB G.Skill Ripjaws 1600 DDR3
ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
New addition: OCZ Vertex 240GB SATA III SSD
WEI Score: 7.6
-
Senior Member
hm... not sure what the deal was then... Thanks anyways.
"If I have seen further it is by standing on the shoulders of giants." Isaac Newton
------------------------------------------------------------------------------
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
|