ActionScript 2.0 :: Loop Images And Then Reload Xml?
Apr 16, 2011
I am working on a Digital Signage-type application. I am attempting to change the script below so that the slideshow loads using the variables set in the slides.xml file, plays 3 times and then reloads the slides.xml to pick up any changes to it.
The script below is a sample file supplied by Cisco. It loads the slides.xml once and loops the slides indefinitely. I am attempting to modify it to allow it to pick up new slides that are added throughout the day. I know I need a loop, but not sure where to put it so it works correctly.
[Code]...
View 0 Replies
Similar Posts:
Dec 22, 2005
i couldn't find a tutorial on this matter so i sorta started making my own hypothesis... what i'm trying to do is: have a gallery of images automatically scrolling horizontally while having the set of images loop. like at[URL]..
here are a couple of my theories and questions for AS commands to have this work:
1) display a range of pixels of an image at certain positions, i.e. if gallery is scrolling to the left, leftmost image when its parts are disappearing out of the viewing area, they become visible at the right.
2) have two instances of each image and when an image is disappearing on left, the second instance of that image comes visible on the right. this I imagine would take up more HD space.
i guess what i was wondering more about is how jager did their gallery where there's only enough images are in a set to be viewed in the viewing area.
View 3 Replies
Jan 22, 2009
do anyone know how i can loop an array of images that I load external and each last for 5 seconds
View 2 Replies
Mar 29, 2011
I'm trying to load a couple of images and store them in an array. After this process is complete, I want to loop through the array and add these pictures to the stage.Here is my code:
Code:
var imagePaths:Array = new Array("1.jpg","2.jpg");
var imageArray:Array = new Array();
[code].....
View 1 Replies
Apr 22, 2009
iam creating a pallete in that i have a class movieclip with 1 image and 2 text (title, desc). Here iam connecting a xml and creating the same class and adding it to the scrollpane. in that each item (movieclip) i need to load images and fill the text. iam filling the text and loading the images. but i need to scale the pictures to 35x35. actual size of the pic is 70x70.my code is :
function fillitem() { var ypos:Number = 10; //reptitle.text = myxml.toptitle;
reptitle.text = options[0][0].tit; var tf1:TextFormat = new TextFormat(); tf1.color = options[0][0].col; tf1.size = options[0][0].siz; tf1.bold =
[code].....
View 1 Replies
Oct 6, 2010
I want my XML driven pic gallery to showup each of my 15 images one after the other. I'm getting 'undefined' at the start.
_root.myImages = myGalleryXML.firstChild.childNodes;
_root.myImagesTotal = myImages.length;
function myShow() {
myURLA = myImages[myNumber].attributes.full_url;
myTitleA = myImages[myNumber].attributes.heading;
myCaptionA = myImages[myNumber].attributes.title;
[Code] .....
View 17 Replies
Nov 3, 2010
I'm making a highscore table in flash using AS3, I have successfully got working code that displays the names and the scores but also part of my high score table it needs to display the users country flag. The images for the flags are stored on a remote server.
Now I know how to load in a single image and add it to my movie clip but things get very complicated when I want to load in 20+ by iterating through a loop. I've looked at many examples and just cant adopt the sample code to work for me. Anyway without a further a do here is what I have so far.
[Code]....
View 1 Replies
Sep 18, 2009
I need to load a bunch of images using a for loop looping through xml. This will be called over and over for various groups of images. Memory management is a major concern. In the for loop I create a loader
ActionScript Code:
var thumb_loader:Loader = new Loader();
var thumbContainer:Sprite = new Sprite();
thumb_loader.load (new URLRequest (panelViewer [categoryPanels [indexCategoryPanels][i]].@pathName));
// set the thumb node from xml
thumb_loader.contentLoaderInfo.addEventListener(Event.INIT, thumbLoaded);
thumbContainer.addChild(thumb_loader);
I also add the thumb loader as a child now in the init handler
ActionScript Code:
function thumbLoaded(e:Event):void {
//when all thumbs are loaded I set them alpha to 0 and then to 1, for a nice effect
var thumbTarget:Object = e.target.content;
thumbTarget.alpha = 0;
Tweener.addTween(thumbTarget, { time:1, alpha:1, transition:"easeOutSine"} );
}
The issue I have I keep adding sprites and loaders and this keeps sucking resources this is for an air app that has to run for several days cycling through hundreds of images. How to keep my resources low and load a group of images delete the loaders and then on the next cycle delete the previous group.
View 5 Replies
Nov 10, 2009
I have 8 sprites and I want to load png for my buttons but I don't want to have to type all that loader stuff 8 times, so i wanted to try to create a loop with it.
Hopefully that makes sense, This is me trying to do it with just two but the plan is to have 8 buttons.[code]...
View 9 Replies
Apr 15, 2010
I am modifying the Flashr wrapper for the Flickr API by [URL]
the code below uses a loop to arrange thumbnails gallery along x. I have changed the wrapper so it is now loading medium sized images rather than the thumbnails.
The flickr thumbnails are the same size so "360" is used in the code below to space them along x. Now im using images that are different widths i need to set this value dynamically so the next image is placed along side the previous one with space in between no matter the width, but i dont know how.
ActionScript Code:
function onPhotosSearch(resultsSet:ResultsSet)
{
var currentPhotoIndex:Number = 0;
[Code].....
View 3 Replies
Mar 13, 2011
I am trying to load 10 images through an array using a loop. I have the images loaded as movieclips and this set up but nothing is working. Any suggestions?
var picArray:Array = new Array[img1,img2,img3,img4,img5,img6,img7,img8,img9,img10];
for (var i:Number=0; i<10; i++) {
}
View 1 Replies
May 17, 2011
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]...
View 9 Replies
Apr 5, 2006
i'd like to make a loop of 3 images that fade in one after another with some time between the fades, i'd like to do it in code.
View 8 Replies
Aug 14, 2009
I've made a script which loads in, at intervals, images in a sequence (image1.jpg, image2.jpg ). However I've being doing my nut as to how to remove the preceeding image from memory as looking a the Windows Task Manager, each image gets added again and again, accumulating memory usage. I've tried removeChild, and null; stuff, but to no avail.I want it to go through the 10 images, and with each step to the next image, remove the last one from memory.[code]
View 2 Replies
Mar 2, 2009
I've always struggled with this for some reason, but say I have 5 images loading from XML. How would I make it so they would cross fade each other on an endless loop? I can make it so it gets to the end by loading them on top of each other and then fading each one out, but once I get to the end I'm lost.
View 1 Replies
Aug 3, 2009
I have an image which i am attaching, it is the white portion of the image( i saved it on a black background so it is easy to see, but it is on a transparent background saved as a gif and imported to flash). When my for loop runs, i am trying to position this image on stage programatically, but it seems as it is not doing it right. It scales the image, and positions some all over the place.I wanted the images (8 of them) to appear in 2 colums each one spaced out evenly, but it fails to do that. The movie clip holds the image below. Also since it is a irregular shape, it seems to make the edges look really rought.
1) Why is the for loop generating these images all over the place like that?
2) Would it be more ideal to draw this shape with flash, rather then using a gif image? Is such a shape even possible to draw?This is the code:
import fl.transitions.*;import fl.transitions.easing.*;import flash.events.TimerEvent;
var imageLoader:Loader;
var xmlData:XML;[CODE]............
View 5 Replies
Mar 1, 2010
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?
View 2 Replies
May 5, 2010
I am loading several images using a loop. My question is, would it be better to put the "contentLoaderInfo.addEventListener(Event.COMPLETE..." in the loop so it loads the complete handler each time it goes through the loop, or is it fine to put it outside of the loop at the end?
View 5 Replies
Dec 22, 2010
I made a movie clip with infinite loop in which there are images that move from right to left something simple like a marquee, and each image has a blank space between them, but between last and first image there is a more space, how I can do to make all images have an equal space between each one and that the motion never stops.
View 5 Replies
Apr 3, 2011
I am 1 step away from finishing my for loop. I have a item mc I have duplicated 8 items (indexarray.length) and what my loop currently does is display these 8 blank movieclips on the screen positioned 4 in each row. Inside this blank item mc I have a dynamic text field name_text within this item that call on names from a previously declared array. I also have a empty movieclip called image_holder with property name imageHolder. So far the below displays my 8 items with names but without the image:
function displayItems()
{
var xPos = 0;
var yPos = 0;
[Code]...
All my images are in my library in movieclips name item0 to item 7 to fit in accordingly. What do I need to add to the above code to get these images inside my image_holder mc?
View 5 Replies
Feb 9, 2009
I've got a weird problem that could probably be easily fixed if I weren't such a novice coder. I'm loading external jpegs into movie clips that are within a movie clip which is within another movie clip (because they are animated as a whole within the other movie clips). The XML loads fine. The "Image" class I've made up is defined. The attributes from the XML load into the array of images.
However, I can't loop through the movieclips to actually load the images. But if I define manually the movie clip loads it loads perfectly. Here is the code that loads the images successfully, but not 100% dynamically:
ActionScript Code:
// Define the Images Array
var ImageArray:Array = new Array();
[Code]....
View 9 Replies
Jul 23, 2011
I want to create an endless loop of images through a timer.On the fla I have an MovieClip �ImageClip� Yousing a timer I will repeat the call to imageArea.addChild() with the next image.My question is am I going to run out of memory as addChild() implies this.I want to replace the image not add more images to a collection.
View 5 Replies
Sep 18, 2006
I'm trying to create a slideshow which loads images dynamically from a folder on my server. The number of images in the folder will change on a daily basis, so I'm guessing that this needs some kind of array to predetermine the contents of the folder. The files will not have a regimented naming structure.
Basically, I need to display all of the images in the folder one by one and then loop back to the start.
Has anyone managed to do this before?
View 1 Replies
Mar 26, 2009
I'm loading in a bunch of images with a for loop. The images do appear on stage so that part works, however, spacing them is the problem. this is what the following code traces out:
[Code]...
View 5 Replies
May 29, 2010
I have a file with existing MovieClips on the stage that I want to add Loaders to that will call external .jpgs from an XML file. I have the code working, but currently I have to add the Loaders one by one to the MovieClips. I'm sure there's a way to do this more easily by using a Loop, but I can't seem to get it to work no matter what I've tried.
I also want to be able to call a larger version of the image by clicking on the MovieClip/thumbnail. I've got the code working just fine, but when I tried to add a preloader to the full size image Loader, I got an error: Error #1009: Cannot access a property or method of a null object reference. Flash indicates this is happening at the callFull function so its definitely an error with my preloader code. [code]...
View 4 Replies
Mar 2, 2012
I 'm checking to see if an image file exist but I don't think the code checks but the last iteration in the loop. Here's my code:
[Code]....
fix this or if you know a better way to check if an image file exist could you let me know.
View 1 Replies
Jun 10, 2010
I'm trying to dynamically stack images that are being pulled in via an xml file. Below is what I'm doing, and it almost works. The problem is that it only seems to fire off the event complete function on the very last one, instead of going for all of them. Is there a way to make it run the even.complete function for each image?
function aboutfileLoaded(event:Event):void {
aboutXML = new XML(aboutTextLoader.data);
for(var l:int = 0; l < aboutXML.aboutimages.image.length(); l++)
[Code]....
View 2 Replies
Jan 21, 2009
I have an xml file and i would just like to write a loop that runs for every number of contribution attributes.data/images.xml
Code:
<images>
<image source = "source/image1.jpg" thumb = "thumb/image1.jpg" contribution1 = "title1"
[code].......
View 4 Replies
Feb 5, 2012
[Code].....
I have a group of 16 images that I would like to load 1 of each into each movieclip. I want image1 to be inside of visual1, image 2 inside of visual2, and so on. the images are named like, 1960s_(1).png where the 1960 (year) part is coming from the rangeNum variable. The above gives me this error: 1061: Call to a possibly undefined method addChild through a reference with static type int.
View 4 Replies
Sep 2, 2010
i have been building a library that has thumbnails which you click to view the full image. i have built the application it works but i want to change the way the image on the actual thumbnail loads using code instead of manually adding the value to the url loader component.
var myX;var instanceN:String;trace(instanceN);var currentLoad:uint = 0;// current loader and image loadingvar thumbnailURL:String;//Thumbnail URLvar thumbReq:URLRequest;// Thumbnail url requestfor(var k:uint = 0;k < iL_btn.length; k++)[code].....
the loop runs fine without the last line of code which i've commented out.the make up of these thumbnails are a uiLoader component which are each inside there own movieClip.what i wanted this to do was every time the loop runs it currentLoad adds 1 to its value then that value is subbed into instanceN:String and thumbnailURL address that bit works the trace statements read correctly.but my issue is using the instanceN value as the instance name path which then loads the current thumbnailURL value which is the URL address for the thumbnail picture.when i try to load the url address using the commented out code above i got the error .TypeError: Error #1010: A term is undefined and has no properties.the trace statements correct values below
the first value is the currentLoad value.
the second value is the instance name path.
the third is is the URL address for the thumbnail.[code].....
View 3 Replies