| | |
Dynamicaly loading JPG (or other format image) into an Actionscript 3.0 Movie clip
Please support our Graphics and Multimedia advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: May 2008
Posts: 231
Reputation:
Solved Threads: 19
Dynamicaly loading JPG (or other format image) into an Actionscript 3.0 Movie clip
0
#1 Oct 19th, 2009
Hi,
I have a movie clip called
I also have a variable with a .jpg file (Can be changed to any other though) defined as
How do I load this in to dsp_albumcover?
dsp_albumcover is 128 pixles high x wide and the image is the same dimentions.
Thanx,
Sam
P.S. Before anyone says that I should just include it in my libary, /albumcover.jpg?ID={ID} is the actual image that would be called and would be retrieved from a DB
I have a movie clip called
dsp_albumcover (Already created and on the stage, instance name is dsp_albumcover)I also have a variable with a .jpg file (Can be changed to any other though) defined as
actionscript Syntax (Toggle Plain Text)
var albumimg:String = '/albumcover.jpg';
How do I load this in to dsp_albumcover?
dsp_albumcover is 128 pixles high x wide and the image is the same dimentions.
Thanx,
Sam
P.S. Before anyone says that I should just include it in my libary, /albumcover.jpg?ID={ID} is the actual image that would be called and would be retrieved from a DB
My Blog, Life and everything that matters to me - SamRudge.co.uk
2x Macbook Pro's, 1x Mac Pro, 1x iMac, 2x Macbook's running Fedora linux - In conclusion, I hate windows =)
2x Macbook Pro's, 1x Mac Pro, 1x iMac, 2x Macbook's running Fedora linux - In conclusion, I hate windows =)
•
•
Join Date: May 2008
Posts: 231
Reputation:
Solved Threads: 19
0
#3 Oct 19th, 2009
I have been following tutorials all day and none of them work, I just thought that an WEB DESIGN FORUM might be able to help, I didn't see the point in saying "This has taken me the last 8 hours to do but it doesnt work "
Graphics and Multimedia Syntax (Toggle Plain Text)
Some Code
My Blog, Life and everything that matters to me - SamRudge.co.uk
2x Macbook Pro's, 1x Mac Pro, 1x iMac, 2x Macbook's running Fedora linux - In conclusion, I hate windows =)
2x Macbook Pro's, 1x Mac Pro, 1x iMac, 2x Macbook's running Fedora linux - In conclusion, I hate windows =)
2
#4 34 Days Ago
As Imthwee said, please try to find tutorials too.
Anyway Please follow this to get your work done:
1) Just create an empty movie clip with a instance name (emptyMC)
2) Place your jpeg file in the same location
use this code in timeline:
Hope this helps!
Note: Don't worry about the size of the movie clip, Just an empty movie clip thats it!
Anyway Please follow this to get your work done:
1) Just create an empty movie clip with a instance name (emptyMC)
2) Place your jpeg file in the same location
use this code in timeline:
Graphics and Multimedia Syntax (Toggle Plain Text)
const IMAGE_URL:String = "followme.png"; var ldr:Loader = new Loader(); ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, ldr_complete); ldr.load(new URLRequest(IMAGE_URL)); function ldr_complete(evt:Event):void { emptyMC.addChild(ldr); }
Hope this helps!
Note: Don't worry about the size of the movie clip, Just an empty movie clip thats it!
•
•
Join Date: May 2008
Posts: 231
Reputation:
Solved Threads: 19
0
#5 34 Days Ago
•
•
•
•
As Imthwee said, please try to find tutorials too.
Anyway Please follow this to get your work done:
1) Just create an empty movie clip with a instance name (emptyMC)
2) Place your jpeg file in the same location
use this code in timeline:
Graphics and Multimedia Syntax (Toggle Plain Text)
const IMAGE_URL:String = "followme.png"; var ldr:Loader = new Loader(); ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, ldr_complete); ldr.load(new URLRequest(IMAGE_URL)); function ldr_complete(evt:Event):void { emptyMC.addChild(ldr); }
Hope this helps!
Note: Don't worry about the size of the movie clip, Just an empty movie clip thats it!
My Blog, Life and everything that matters to me - SamRudge.co.uk
2x Macbook Pro's, 1x Mac Pro, 1x iMac, 2x Macbook's running Fedora linux - In conclusion, I hate windows =)
2x Macbook Pro's, 1x Mac Pro, 1x iMac, 2x Macbook's running Fedora linux - In conclusion, I hate windows =)
![]() |
Similar Threads
- Movie clip fades out when playhead goes to frame 300 (Graphics and Multimedia)
- navigation with a movie clip (Graphics and Multimedia)
- Word Automation Image save in jpg format (ASP.NET)
- movie clip in flash (Graphics and Multimedia)
- import JPG into Flash using FlashVars (Graphics and Multimedia)
- Can I place an image into the Flash movie box so appears when Flash blocked by browse (Graphics and Multimedia)
- Display a movie clip on a button click (Graphics and Multimedia)
- How To Save/Download A Short Movie Clip (Windows 95 / 98 / Me)
- Calling a movie clip (Graphics and Multimedia)
Other Threads in the Graphics and Multimedia Forum
- Previous Thread: Display products
- Next Thread: Rollover button with hyperlink??
| Thread Tools | Search this Thread |
3d 10 actionscript3 adobe adobeacrobat adobereader air ajax amazon amf apple button cart childprotection cloud dashboard dell design dojofoundation dreamweaver ebay eclipse ecommerce elasticcomputecloud embed endorsement extra family flash flash-develop flashlite flex free harddrive iamthwee ibm illustrator imflash intel interactivemap javafx javascript laptop legal map micron microsoft mobile monitoringsoftware moonlight multimedia myspace nand news novell panorama pdf pedophiles photoshop photosynth php safety sandisk security shopping silverlight solidstatedrive sproutcore ssd streaming swf table ukmap unload unwanted video vulnerability web white.space xml zend zephyr zeroday






