ActionScript Code:
button1.addEventListener(MouseEvent.MOUSE_UP , Button1Click );
function Button1Click(event:MouseEvent):void {
var pictureLoader:Loader = new Loader();
//var pictureURL:String = "dude.jpg"; this works but if I put the name as an array it does not work
[Code] .....
I have an array with 20 elements and a shuffle function applied. Now i need to screen only 4 elements from that, which then should be deleted from the array in order to avoid repetition (next play will pick other 4 images and so on) Anyone knows if there a class i can use?
ActionScript Code: function processXML(e:Event):void { var my_xml:XML=new XML(e.target.data); my_speed=my_xml.@SPEED;
var filePaths:Array=["thmb1.swf","thmb2.swf","thmb3.swf","thmb4.swf", "thmb5.swf", "thmb6.swf", "thmb7.swf","thmb8.swf", "thmb9.swf", "thmb10.swf", "thmb11.swf" ]; function loadImages3(event:MouseEvent):void {
[code]....
My problem is that I can't figure out how to decouple the loader from this loadNewRow function. Ideally, I'd like to figure out how to load all the swf's give them dynamic names... like thmb1loaded, thmb2loaded, thmb3loaded.. push into an a ("loaded") array and then have that be used to build the grid.Right now, its loading them every time the loadnewrow function fires. I'm sure its a simple matter of iterating a .name within a contentloaderinfo .onComplete when each swf is loaded...
I'm making a Matching Game in Flex. I want to have images from one array on my left and images from the second array on my right, so that user can drag&drop images from the left onto matching images on the right.I have mx:HBox and two mx:VBox inside. Now, how can I display images in VBox that I have in my gameArray, if the length of my array (amount of images) may differ? I would have to create as many mx:Image as the length of my gameArray, but how do I do it in MXML?
I have a loader with the array function. When you click on different buttons on top of the loader, images and text load into the loaders. I would like the images and text to fade in and out instead of just flashing.
I want to return an array of images from a sql server through a web service written in asp dot net . I could return a single file by sending the byte array back . How to return an array of byte arrays or an image images back to the flex application?
Is there anyway to create a GIF animation from an array already loaded with bitmap images?I would like to simply create the animation in the order the images currently are in.
P.S. -- how would I display it? Just addChild() I'm assuming, correct?
I've been fighting with this for a while now, I am trying preload several jpgs who's locations are stored in an XML file and then display them sequentially (building a vertical list of thumbnails). What I'm having trouble to figure out is how to preload all the images with one preloader and only when all the iloading is done, to start building the list...I saw something similar here on the Forums, but couldn't manage alter it to fit my needsHere's the code I'm using:
How can i add preloader to images from my array ? I have couple of panels on stage , everyone have place for images, everything is loading nice. I only need to add preloader in every image holder.
Right now I am working on a game where I need to have 19 pieces revolving with 19 different MCs in them. The code I have can accommodate the movement and 19 pieces, but how to get 19 different ones in there - just one with 19 duplicates.
I thought if I addressed them in an array, I could tell my emptyMovieClip to load them into itself with individual MCs. I'm sure I'm on the right path, but it's not working yet.
My array: anames = new Array (mcAnniePiece, mcAlbertPiece, mcAshleyPiece,
I'm making an array of clickable images, based on kirupas gallery tutorial.I want images in rows and columns. To show images in rows and columns i need to change the ._y and ._x coordinate everytime the image hits the end of the screen.....Here is the code:
When the image's x-coordinate is > than 400 the image should shift down (using ._y + 70), and the x-coordinate should be reset to zero to place the images right underneath another.BUT, when i set ._x to zero it stays at zero throughout the rest of the loop...
I know there are tons of tutorials out there about loading images from an xml file and creating a slide show. I can plug and play with those pretty good. However I would prefer it if I could start writing code myself. I am starting basic and each day working on adding code to a project.
Here is a made up app. Basically I have created three loaders that add an image to each one which I put into an array, cause why not. I have two event listeners one for an on stage click to load an image, and one a timer to load an image. The next thing I would like to try and do is load one image for a period of time, then load another etc.
So would I need a loop that loops through the array somehow connected with a timer?
public class array extends Sprite { //Create Loaders private var imageOne:Loader= new Loader;
Got another problem here I just try to load images from a small xml-list and put them into an array, but I only get a message like this: TypeError: Error #1009: Cannot access a property or method of a null object reference. at thumbHolder/placePics() It really tells me nothing! What am I doing wrong? the code is here. I put a comment where the problem is (I left out the imports & stuff):
I'm creating an image gallery (similar to the one that is posted in the tutorials at kirupa) but with one difference. Rather than loading each file individually when they are called, I want to preload the whole array of images first and then let the user sift through them. I've tried attaching them into a nested movie clip that has a preloader on it, but it seems that Flash is too quick and will decide the file is loaded before the JPGs are imported.
So I've got an array of images, Code: pixArray = ["Images/Architecture/Hospitality/01.jpg", "Images/Architecture/Mixed/01.jpg", "Images/Architecture/Office/01.jpg", "Images/Architecture/Performing/01.jpg"];
It's part of a slideshow, loading one image, waiting 4 seconds, then it loads another, etc etc. The problem is, between each image, it has to load. I'm trying to find a way to get flash to keep loading all the images in the array until they're all loaded, something to the effect of: On the completion of the loading of the first image, start loading the second image in the array. On completion of loading that, load the third image, etc, until there are no more.
I already have a variable that tells it how many items there are as well: Code: var total:Number = 4;
I have a project that was dumped on my lap, and my knowledge of Actionscript is very limited.
The scenario is that the user is presented with a floormap of a building that should show a red dot denoting where each employee sits (based on X,Y coordinates on the floormap).
The employees' profiles (name, telephone, X/Y coordinates) are stored in a database.
One our our programmers managed to load the users into a Flash object array. Now, it's my turn to add some actionscript to place a red dot on the floormap for each and every user in that array based on their x/y coordinates.[code]...
I am loading my images into an Array after my url is loaded Code: function urlLoaded(event:Event):void { urlLoader.removeEventListener(Event.COMPLETE,urlLoaded); xml=XML(event.target.data); xmlList=xml.children(); [Code] ....
It is arrayThumb I am interested in, I wanted each each to be placed into a location within this Array. I then wanted to do Code: thumbArray[0].addEventListener(MouseEvent.CLICK, click_handler1); function click_handler1(e:MouseEvent) { trace("IMAGE CLICKED"); }
But when I try this, I get TypeError: Error #1010: A term is undefined and has no properties.
Is it possible to export an array of images to some sort of movie animation? The array has bitmaps that I would like to be exported to some sort of video fileIt could be gif, avi, swf, mov, or anything really
I have a flash file that loads images from an xml file. Is there a way to make the images load randomly? I would like a different image to start every time it loads. here is where the xml is pulled in...
I just try to load images from a small xml-list and put them into an array, but I only get a message like this: TypeError: Error #1009: Cannot access a property or method of a null object reference. at thumbHolder/placePics() It really tells me nothing! What am I doing wrong? the code is here. I put a comment where the problem is (I left out the imports & stuff):
I am trying to take ten images, load them into an array, and then show them one at a time,fading out each one in turn. I keep getting this error.
ReferenceError: Error #1056: Cannot create property alpha on String. at fl.transitions::Tween/setPosition() at fl.transitions::Tween/set position() at fl.transitions::Tween()