ActionScript 3.0 :: Load Multiple Images And Captions With XML
Aug 11, 2009
I'm having a hard time figuring out how to do something with xml in flash and don't even know where to begin.I'm building a flash piece for the header of a website that will contain six images and six captions. I plan on integrating the xml file with a cms so that the user can simply upload images and type in captions and the xml file will dynamically populate the swf.I know how to execute the back-end development with the cms and xml file, but I'm not quite sure how to tie the pieces I need from the xml to the flash file.
Ok basically i wana make a list box and when u click somethign in the list box it shows a thumbnailed image and a caption under it. i found this script which i think is the script im lookin for
var loadText = new LoadVars(); loadText.load("infolist.txt"); loadText.onLoad = function(success) {
I am trying to load multiple images into a scene and then cycle through the images one at a time.So, here are the essentials what I've put together in AS3:First I set up a counter and a Loader
[code]....
Then, after loading a list of images from an XML file, I call a function that I called "createImages". This function then takes the list of images and creates a bunch of loaders:
[code]....
So far, so good! I now have a bunch of loaders each with a different name "img1","img2","img3" etc.
I have 24 movie clips on the stage: my_menu.image_holder_mc1 thru my_menu.image_holder_mc24. I want to load an image in each one. How do I identify the holder which to add a child.
The Code I have so far is....
Code: for (var i:Number=1; i<=24;i++){ var myLoader:Loader = new Loader(); myLoader.name = "image_"+i;
I need help adding captions to images in a swf and picture gallery. I have added a dynamic text box in the flash file and have managed to import the text from XML but I have been unable to attatch it to different images to display different caption messages. I have followed a tutorial to make this gallery and only have the very basics so far. I am using XML to pull the information for the location and size of the images and gallery into the flash file.
Using Flash CS3, v9, AS 3. I have got a Flash movie that I have set up to have captions display over it.I am using the included FLVPlayback component for the movie, and the included FLVPlaybackCaptioning component to set up the captions. My movie uses the included
An image, like a jpeg, has a bunch of metadata stored in it. The "IPTC Core" metadata usually includes the photographers name, address, title, description, etc. Is there any way to access this information using AS3 so that, say, captions for images in a flash gallery could be generated automatically?
I am trying to build a flash slideshow that uses XML to call up images and text captions. I 've found a good example of what I am looking for on macromedia's website.found here: http:[url]...
I would like to add the ability to fade between images and have a button that creates a larger jpg version in a popup window for whatever image is being displayed as current in the slideshow.Would I need 2 XML files for this or can I just use one? I prefer one. Sorry I am quite new to XML, this is my first foray into it.I can build this thing w/o XML, but it seems to be so much easier if I did it with XML.
I've been doing a lot of thinking about how best to construct classes that load multiple images, e.g. photo galleries and such.
What is everyone's take (or the general agreement, if there is one) on how to load those images? The 2 ways I am thinking about are these (after you've already got all the filepaths or urls to be loaded):
1)Create a for loop [code]...
Here, you are creating anywhere from one to a billion loaders, depending on the number of photos in your gallery, but they will load simultaneously. Is that a terribly bad approach?
The only other way I know of doing it is to add an event listener that re-calls the loading function when the loading of one image completes.
I have the basic XML which loads an image onto a page but how do I add 2 more next to it, in the actionscript?
I have tried everything that I could think of, including adding extra image[ii] nodes etc.
Below is the code I am using.
I have also created an instance of image2 and and instance of image3 which should hold the 2nd and third pic. So when clicking on the next button it would change out all three images from the images.xml file...or if there are 5 images it would just show the next 2 in the image and image2 movieclip holders...
function loadXML(loaded) { if (loaded) { xmlNode = this.firstChild; image = [];
I am trying to modify the hover caption tutorial from here at Kirupa to load the text in the caption from an external text file. Could anyone give me a hand trying to figure this out?I tried the simple way of loading external text but because the text is loaded in a MovieClip this does not work. Here is my code for the hover menu that currently loads the text dynamically through ActionScript:
MovieClip.prototype.resize = function() { var w = box.caption.textWidth+0 var h = box.caption.textHeight+0;
I have been looking for a complete example of FileReferenceList but haven't found anything as of yetEverything I found was either incomplete or I didn't understand it as there was not any FLA source files with i
I have a project to do and I'm not sure how to get it done. I have some experience using xml to load images into flash but that was one at a time. the project that i'm currently working on needs to work like something like this.
I need flash to load in three images at one time(from an xml file) and display them in a horizontal line, and then move across the stage from one side to the other.
i know how to load one image at a time but not multiple. and i don't know how to make the images slide across the stage in a line.
The current code I have works great for one image -- but how do I edit the code to allow for more than one? Every time I try and add an extra button / link to the code I mess the whole thing up.
Here's the code:
ActionScript Code: import fl.controls.ProgressBar; var myLoader:Loader = new Loader(); myLoader.x = 322;
Is there a way to load multiple images with a loop and an array... i mean without using xml as said all forums that i've already read... i have 15 images and i want to know if it's possible to load all of them without a loader and a URLRequest for each one... there is the position problem too.[code]...
As far as I can tell, it's convinced that I'm trying to use the load() method from the scrollpane class (that's where the context help takes me). How do I specify that I want to use the loader class method?
If you load say 3 external images in AS3 and want to run a function "useImages()" only once all three images have loaded what is the best way of listening for them to complete loading.
Basically my aim is to use SharedObject to save the basically what I am doing is I have a list of buttons each has a name which when clicked the name is added to an array which is stored in a SharedObject. In another movie clip I am calling back the SharedObject and using the array information to display the images corresponding to the name in the array. And I got everything working except I don't know how I can load my images in. Because the same images are not always selected it means that I can't just load each image to a specific Loader because then I would end up with blank loaders.
Which is the best way to load many images with the movieClipLoader class?do I have to create one instance of moveClipLoader for each image or is it possible to use the same for all the images?
I'm a more desperate search for answers and need to load multiple images at the same time. I'm trying to use the same loader but don't know if this is best practice (and it isn't working). Ami I close?
I am trying to load multiple images by iterating through a for loop. For each image I instantiate a loader and send a loader request. I want to stop the iteration of the loop and cancel all loader requests sent, in case a user navigates out of the screen. How can I do this?
I am designing a game that has different rooms and each room has multiple unique images in it in addition to the background. For the record, the size is about 300K or less for each room background image and 1 - 100 K per graphic. What I am currently doing is importing all of the images into my Flash file, making symbols of them and then loading them as needed with ActionScript. Assuming this game will have many many rooms (maybe up to 100 or more), is this the most efficient (and quick) way to load the graphics? Or would I need to load everything from the graphic files when starting the program or perhaps load the graphics from files dynamically as needed?
So I made a drag and drop app where I can drop in an image, it get's resized and saved automatically on the desktop.
But now I want to do the same when there are multiple images dragged in. This is where I'm stuck...
private function onDrop(e:NativeDragEvent):void { trace("Dropped!"); var dropfiles:Array = e.clipboard.getData(ClipboardFormats.FILE_LIST_FORMAT) as Array;
[Code]....
The problem is that I want the completeHandler() to run after every ldr.load() but in my code it only runs once right after the for each loop.
I've been following along with this tutorial, which works except it uses an array to store the image path, and then later converts/saves the loaded Bitmap to a variable.
For cleaner more reusable code though, I'd like the images to come from an XML file.
Now, I'm assuming that if I have my image paths in an XMLList, I need to separate each item so that each is an XML object -- then convert it to a string so it can be saved as a Bitmap?
I'm not quite conversant with classes and loading external pictures so be patient My intention is the following: a sort of slide show which dynamically loads all pictures of a certain directory and displays them one after the other. To do so I want to get the number of images of a certain diretory (img) by using a PHP script (done), then the PHP-Script sends the data to the Flash file (done) which stores it in a variable (done). I've created a class called PHPLoading for doing this (finally it creates an array which stores the links dynamically created (pictures are named 0.jpg, 1.jpg, [code]...
how to create a image gallery that uses arrays from a text file rather than xml (this is because the project I have now generates alot of html coding and stores it within a DB, it doesn't have any set html pages so using flash and xml is out of the question as it needs to be relative to the html page).
I have got as far as including my own way to get captions to be displayed as well....but here comes the problem, no matter what loop i have tried the captions seem to stay on the 1st caption and not change as the different thumbnails are clicked..
here is my code
Code: var locVar = new Array(); locVar = imgLoc.split(","); var tmbVar = new Array();