ActionScript 2.0 :: Load Multiple Jpg's From Xml Doc?
Jul 13, 2004
how I can load multiple jpgs into a flash movie from a xml document? I need to create a movie clip on the fly.. well, this I have managed, but lets say I have 5 images I want to display from a xml doc at different positions in the movie at the same time. To create this I do a for-loop on all the images in the xml file and get the image file paths, then I create an unique filename (ex. var movieClipName:String = "newFileName" + j (j is the iterator in the for-loop), then I create a new movieclip (ex. _root.createEmptyMovieClip(movieClipName, j);
...here the problem starts.. you see, now I want to position the new movieClip.
Ideally I would see this work:
_root.movieClipName._x = 40 * j;
_root.movieClipName._y = 40 * j;
loadMovie(path, movieClipName);
...but this doesnt work. I cant find ANY way to position the new movie clip.
View 1 Replies
Similar Posts:
Oct 26, 2009
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;
[Code].....
View 2 Replies
Mar 12, 2010
How do i load multiple of xml but load them after the other. So the other one will start loading after before it done loading.
View 1 Replies
Jan 6, 2010
this doesnt work?is there a way to pull this somehow?
Code:
var _xmlURLArr:Array;
var _xmlArr:Array;
var _xmlV1:XML;
var _xmlV2:XML;
[code]....
View 1 Replies
Jul 13, 2004
how I can load multiple jpgs into a flash movie from a xml document? I need to create a movie clip on the fly.. well, this I have managed, but lets say I have 5 images I want to display from a xml doc at different positions in the movie at the same time. To create this I do a for-loop on all the images in the xml file and get the image file paths, then I create an unique filename (ex. var movieClipName:String = "newFileName" + j (j is the iterator in the for-loop), then I create a new movieclip (ex. _root.createEmptyMovieClip(movieClipName, j);
...here the problem starts.. you see, now I want to position the new movieClip. Ideally I would see this work: _root.movieClipName._x = 40 * j; _root.movieClipName._y = 40 * j; loadMovie(path, movieClipName); ...but this doesnt work. I cant find ANY way to position the new movie clip.
View 1 Replies
Apr 4, 2009
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.
View 10 Replies
Mar 24, 2010
I want to load multiple pictures using ActionScript. I can do it in AS2 easily. But AS3 is driving me nuts.
I am loading all the images, but I am seeing only the last one. [code]...
View 3 Replies
Sep 29, 2009
I'm having a heck of a time trying to get a number of external SWFs loaded into one main SWF in successive order, the next one playing after the other has ended. To complicate matters, the external SWFs have FLV files in them.
using Flash CS3
Actionscript 3.0
So, here's essentially what I'm looking to do: - I have one main SWF file (call it main.swf)- load several SWF files into this file so they play in order (let's call them movie1.swf, movie2.swf, movie3.swf, and so on) - these external SWF files all have FLV progressive downloads (not embedded, becuase then my audio doesn't sync up) - I want movie1.swf to load and play in the main file, then detect when the movie is complete, and unload that audio/video then load in movie2.swf, and so on.
This script seemed promising, but loads all of my SWFs on top of each other, making for some ::interesting:: audio... (i have it pasted in actions on first frame in main.swf)
var a:Array = new Array("movie1.swf", "movie2.swf", "movie3.swf");var tl:MovieClip=this
var index:uint=0;
loadF(new Event("nada"));
[Code]....
Maybe there's some code that can be pasted in the individual SWFs?
View 2 Replies
Oct 16, 2009
How can I load multiple conditional MC's in to my stage?What I am trying to do is use nams stored in an array that corrispond to MC's and have it place the MC's on the stage in a way similar to a gallery. However the array is generated by clicking a selection of buttons so the buttons that aren't clicked are not added to the array hence IF statements are used when looking at the array. [code]...
View 4 Replies
Jun 27, 2011
I have a image of a person that I would like to load a certain number of times in a row to show a total of how many people took part in this particular event. In total I need 166 replications of this image, is there any actionscript I can use to do this without having to create a key frame for every separate image?
View 7 Replies
Sep 29, 2011
I try to load multiple rss feed ( xml) and put them into an array ...
var adress : Array = ["http://www.lamoooche.com/getRSS.php?idnews=1500","http://www.lamoooche.com/getRSS.php?idnews=17594",
"http://agro-business-conseil.blogspot.com/feeds/posts/default"]
var feedTxt : Array = new Array //array of feed
var arrayDUrlLoader:Array = new Array ; // array of url loader
[code]....
View 2 Replies
Apr 28, 2010
How can I load the same image in to multiple mc's without have to load for each one.
View 1 Replies
Mar 9, 2011
had the task to load a single model that has a dozen small models - everything is fine - but it would be split into separate models for faster downloading, type model1, model2 ..., the question arose as can be written so that would not be repeated with the code
[Code]..
View 1 Replies
Aug 14, 2009
I bought a template from flashmo which comes one main flash file and photoalbum fl. file. The main flash file plays swf. file from photoalbum. I like to create many photoalbums and play them on the main file.I have no idea how to do that. I spend hours and hours searching online but I cannot find information.The actionscript that is related to playing movie is below.
import mx.transitions.*;
import mx.transitions.easing.*;
//
var numMenuX = 605;
[code]....
View 0 Replies
Sep 2, 2009
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 = [];
[Code]......
View 1 Replies
Oct 15, 2009
I have a array of names corresponding to buttons selected the names allow me to load specific MC's in to a UI Loader in a new Flash movie by using SharedObject. My problem is that I have quite a few buttons but I'm only loading the MC's of the ones that were selected and I don't know how to load multiple MC's in to one Loader. Kind of like a gallery of thumbnails but the order depends on what items have been selected to show.Can anyone please explain how I could load each MC?this is how I am loading my array and thensome how I need to add these to a loader.
Code:
var selectedButtons:Array = loadButtons();
for each( var buttonName:String in selectedButtons )
[code].....
View 0 Replies
Dec 4, 2010
I have this type of XML file name "test.xml"[code]...
I have to get the "post" title as button. if post doesnt have "post_child" then it will show the value inside other container_movieclip. But if it has post_child then it will show button withpost_child title as text on button inside the other container_movieclip.
View 0 Replies
Oct 23, 2006
im making a little flash game and im wondering if this is possible.. I want to (just because) create one file which contains all the data that i want to load into my flash movie.
say i place all the files/sounds/external swf's in one folder and sort them how i like.. Then i zip that folder and place it on my webbserver.
is it now possible to load in that zip file and retrieve the contents of it using only flash?
it offcourse does not have to be zip format.. i just want that general concept.
View 2 Replies
Dec 11, 2007
var myObjArray = new Array;
myXML = new XML();
myXML.load("test.xml");
[code].....
View 4 Replies
Dec 20, 2007
I have 3 videos to load into a single flv component. I want to be able to load these movies randomly. How would I go about doing that? I have no idea how to start
View 1 Replies
Jun 24, 2008
How could I load multiple swfs?I mean, after the first .swf is done streaming, just then load the second swf.
View 2 Replies
Oct 26, 2009
I'm trying to load multiple external swf files into my main movie and arrange them on the stage (talking about 20 or more mc-s) So far I figured out how to load one single mc like this:
Code:
// Make request and loader
var request:URLRequest = new URLRequest("pano1.swf");
var loader:Loader = new Loader();
[Code].....
load an array of swf files and add them all to the stage?
View 11 Replies
Mar 8, 2010
I'm new to the group and to Flash coding. I'm working on a proof of concept for work and I am completely stumped. With my limited knowledge and a lot of questions I have been able to get my template working but now the tricky part, it loads from 1 XML file just fine, but I need to cycle through 3-4 files that are identical in format, just different feeds.[CODE]...
View 1 Replies
Jul 14, 2005
I have an array filled with xml files locations. I want to load each one in and then attach the result to a variable, which describes its content, e.g. contact, home, support etc.Is there a wau of doing this with a loop? Also I would like to know the total size of all the files and how much is loaded whilst loading, for the preloader.
View 2 Replies
Oct 5, 2010
What I have is one swf with buttons, pressing one loads another swf containing several thumbnails (all thumbnails should be images loaded externally). Pressing one of the thumbnails should load yet another swf containing a large image of that thumbnail.This is what I have done so far (this is for the swf containing all the thumbnails):[code]This ActionScript automatically loads the 1.swf containing the larger image of the first thumbnails without waiting for the user to click the mouse.
View 2 Replies
May 16, 2011
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
View 7 Replies
Oct 28, 2008
how to load multiple movie clips on the stage? My ActionScript 3 are as below:
I declared a movie clip - "mcPhotoFrame" (i.e. an instance of "mcPhoto" movie clip) and would like to load all the pictures on the stage but after finished loading, only the last photo shows on the stage.
View 4 Replies
Jul 11, 2009
I'm trying to go through a for loop, create a movieclip for each database entry, add the image by url stored. The problem is the code I have only does the last image. I know it's because something is not incrementing and they all have the same name. Do I need to increment the name of my loader?[code]...
View 11 Replies
Jun 26, 2010
Is there any way to load an external image and add it to more than one movie clip?
View 3 Replies
Feb 2, 2011
Trying to load several images to timeline keyframes,managed to load one, how to load several.[code]...
View 12 Replies