•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Graphics and Multimedia section within the Web Development category of DaniWeb, a massive community of 427,196 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,186 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Graphics and Multimedia advertiser: Programming Forums
Views: 817 | Replies: 4
![]() |
Hi everybody,
I would like to create a slideshow template through actionscript, loading images which are embedded in the same swf as the script.
I've tried creating an array and populating it with the names of the images, but I can't find a way to create movieclips containing those images: I know it can be done by loading files from a separate folder, but I would do this with selfcontained images.
Anyone can help?
Thanks in advance and bye all,
s
I would like to create a slideshow template through actionscript, loading images which are embedded in the same swf as the script.
I've tried creating an array and populating it with the names of the images, but I can't find a way to create movieclips containing those images: I know it can be done by loading files from a separate folder, but I would do this with selfcontained images.
Anyone can help?
Thanks in advance and bye all,
s
IT goes green
(sustainable informatic development)
(sustainable informatic development)
Hello Vishesh,
I meant exactly that: pictures embedded in the flash file, as library clips, to be dynamically loaded through actionscript. Sorry for having been inaccurate.
Apparently, I succeded using "BitmapData.loadBitmap()". This is the example I found on Flash Help:
What is annoying is that I have to set a Linkage manually, for each bitmap image I have in the library. I've tried selecting multiple files and right-clicking, but the command "linkage..." becomes unclickable. Let's say I have a slideshow with fifty images: I have to right-click and set linkage fifty times!
The new question is: can multiple files' linkage be done in an automated (smart) way? I would just say to Flash that all the bitmaps in the library must have a linkage name equal to the files'names.
bye,
s
I meant exactly that: pictures embedded in the flash file, as library clips, to be dynamically loaded through actionscript. Sorry for having been inaccurate.
Apparently, I succeded using "BitmapData.loadBitmap()". This is the example I found on Flash Help:
import flash.display.BitmapData;
var linkageId:String = "libraryBitmap";
var myBitmapData:BitmapData = BitmapData.loadBitmap(linkageId);
trace(myBitmapData instanceof BitmapData); // true
var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mc.attachBitmap(myBitmapData, this.getNextHighestDepth());What is annoying is that I have to set a Linkage manually, for each bitmap image I have in the library. I've tried selecting multiple files and right-clicking, but the command "linkage..." becomes unclickable. Let's say I have a slideshow with fifty images: I have to right-click and set linkage fifty times!
The new question is: can multiple files' linkage be done in an automated (smart) way? I would just say to Flash that all the bitmaps in the library must have a linkage name equal to the files'names.
bye,
s
IT goes green
(sustainable informatic development)
(sustainable informatic development)
>can multiple files' linkage be done in an automated (smart) way?
I think and am pretty sure that isn't possible.
But one thing I want to say is that you shouldn't put 50 images in one swf. If will increase file size, loading time. You should use a XML file to put links and captions of all images and load images dynamically.
I think and am pretty sure that isn't possible.
But one thing I want to say is that you shouldn't put 50 images in one swf. If will increase file size, loading time. You should use a XML file to put links and captions of all images and load images dynamically.
Hi Vishesh,
I know (and agree) that my solution would be insane for a website, but I'm preparing swf files to be embedded in a pdf presentation, than I'd prefere not to have external link (neither I'm sure that connection via XML would work).
Thanks anyway for your reply.
p.s.
By the way I found a rough method not to have to reassign linkage every time:
1 - batch rename of the images: 0.jpg, 1.jpg, 2.jpg, ...
2 - replace a group of images with the same name, with pre-assigned linkage, in a template file.
Not that elegant, but it does the job
I know (and agree) that my solution would be insane for a website, but I'm preparing swf files to be embedded in a pdf presentation, than I'd prefere not to have external link (neither I'm sure that connection via XML would work).
Thanks anyway for your reply.
p.s.
By the way I found a rough method not to have to reassign linkage every time:
1 - batch rename of the images: 0.jpg, 1.jpg, 2.jpg, ...
2 - replace a group of images with the same name, with pre-assigned linkage, in a template file.
Not that elegant, but it does the job
Last edited by isotope : Mar 8th, 2008 at 11:44 am.
IT goes green
(sustainable informatic development)
(sustainable informatic development)
![]() |
•
•
•
•
•
•
•
•
DaniWeb Graphics and Multimedia Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the Graphics and Multimedia Forum
- Previous Thread: Seeking advice on feeding RSS news to webpage
- Next Thread: Help with flash image adding email link



Linear Mode