ActionScript 3.0 :: Determining Thumbnail Placement From Array?
Nov 23, 2010
This thumbnail loader has been the bane of my existence for the past several days. I finally have the images loading in correctly from the XML through an Array.
However, I can NOT for the life of me get them to load with equal distance from one another that corresponds with the varying image widths. I have set up a contentLoaderInfo in order to trace the widths of the images, but can't figure out how to associate them with their respective images in the array to appropriately define the x location.
ActionScript Code:
//XML Load in XML
var XMLURLLoader:URLLoader = new URLLoader();
XMLURLLoader.load(new URLRequest ("ggcelebrity.xml"));
[Code]....
View 2 Replies
Similar Posts:
Jan 15, 2012
I need to "arrange" an array item by using the up/down arrow keys. Each item in the array is represented by a movieclip on the screen, and the idea is to select one, and then move it up and down through the array. For example say you have 7 items in your inventory and want to move item nr 6 ( array[6] ) to the top of the visual representation list ( array[0] ). So it would move through the array and when you hit the top it jumps back down to 7 again. one jump for each keystroke.
View 3 Replies
Nov 18, 2008
I have an array with 8 items, and I want them to be randomly placed on the stage with each load, or when a "shuffle" button is pressed. Just a simple puzzle where the pieces are to be scrambled and then dragged and dropped by the user.Current code that isn't working:
Code:
var myArray:Array = new Array();
myArray[0] = puzzle1;
[code].....
View 1 Replies
May 26, 2009
I have a page that I'm trying to build that has a scrolling image bar at the bottom but I want to also show the full size image in flash above the images that come up in the thumbnail array when you mouse over each image in the array. I found some code that makes the thumbnail array work but I have no idea how to display the second larger image on mouse over because its loading the images externally... what can I do? Feel free to email me back.
View 1 Replies
May 6, 2005
I use this code to try to create a photo thumbnail slider from an array loaded with the images names. The problem is that I can create one thumbnail with my code as shown, but I get in trouble when I try to make thumbnails of more than one image from the array. How should I work around this?
I want the thumbnails to create a nice row, that I can use in a "infinite image slider"...
Code:
//image array
//the array that holds the images names
imgArray = _root.getCurrentArray();
//the path to the images folder
[Code].....
View 14 Replies
Nov 28, 2007
I have made a image-viewer. I've this AS for the viewer:
Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
function loadXML(loaded) {[code].....
Now i would like to make a loop for the thumbnails so they don't have a beginning or end(Now when i scroll to the right the thumbnails stop at the last thumbnail, i want it to begin at the first thumb again).I'm also trying to make that the middle thumbnail represents the photo in target_mc.
View 1 Replies
Jul 10, 2007
I am making a gallery, which you can view here:[URL]ok, firstly, when you click a thumbnail, you cannot scroll them until you roll off the click thumbnail, and I'm not sure why. is it just a movieclip thing? or can I put some code in to re-get focus of something? ok, now for the two general questions:
1. When you roll over the thumbs, they go up, sometimes they flick back down though, even though you are rolled over them still. is this just because they are moving?
2. Does anyone know why when I add this:
[Code]...
View 1 Replies
Oct 11, 2009
Im trying to create via xml and a for() loop a thumbnails wiewer and each thumbnail have a simple onrelease function.....but my probleme is that my 'container' movieClip and 'BT' movieClip dont show when I export the movie...also when i trace()them the output is empty. maybe is because they are inside x.onLoad(xml){} function ? At the end of the script you can remove // before the trace() function for ckecking in the output panel. here is my code:
xml file: TumbLoader.xml
<?xml version="1.0" encoding="ISO-8859-1"?><slideshow><photos thumbnail="thumbnail/1.jpg" /><photos thumbnail="thumbnail/2.jpg" /><photos thumbnail="thumbnail/3.jpg" /><photos[code]...
View 8 Replies
Oct 13, 2003
is it possible to get an uh... "absolute" X and Y for _root.dropDown1MC.listMC.item? As is stands, I'm placing dropDown2MC on the stage using the following code: [AS]_root.attachMovie("dropDown2", "dropDown2", 30, {_x:_xmouse, _y:_ymouse});[/AS] and that gets it on the stage, but it doesn't function as I need it. In a perfect world, I'd like to place dropDown2MC at the X and Y of item, BUT, there is a mask to only show a certain area of listMC (it's how I'm making a scrollable dynamically populated list).
So, is there a way to get some sort of absolute value, relative to root or something, of item's X and Y coordinates? Sorry if this is a bit complicated... I'm trying to be as clear as possible, but you know how hard that can be when you're connected to Flash directly though a firewire cable to the brain
View 4 Replies
Jul 5, 2007
Yes, I'm making a photo gallery like everyone else. I'm making it so people can order pics from the site. There are going to be about 500 photos per album in 5 different categories. The photos can be shrunk down to about 60kb a piece. If I use the actual pictures as thumbnails, just scaled down, the total size of all the pics will be about 30mb. I know this is a lot.
Either way, the people looking at the album will most likely look at nearly all the pics so they will be using up bandwidth either way. Plus, if I use the actual pics as thumbs the user will not have to wait to see actual pic when it's clicked on because it's already loaded. A preloader is annoying to me. I do realize a preloader would be wise when loading the thumbs. Just dislike them after you click one for the big picture.
So is using shrunken thumbs a necessity or if the big pic is under a certain size it shouldn't matter if I use it for a thumb also?
View 1 Replies
Nov 20, 2009
I have an array of 10 buttons 2 rows of 5 buttons each.
I was wondering how I might randomize the button placement,each time a randomizeButton function is called.What I mean is keep the rows but how they are lined up and showing will be different each time.
View 3 Replies
Nov 23, 2009
what i m trying to do is load a image form xml and resize it to fixed height and then to centre the image on stage...however the following code is not resizing the image and neither is it centering the image...i used trace commands to check its width but i get the output as undefined also on load the images r coming rotated 90 degree.
here's my code
Code:
var slidexml:XML = new XML();
slidexml.ignoreWhite = true;
var currentIndex:Number = 0;
[code]...
View 1 Replies
Jun 1, 2011
I managed to make some code that works perfectly which, when the flash game is launched it randomly inserts a picture from the list you give it (word1.png, word2.png etc.)It works fine! But the problem is the place in which it appears, when i start the pictures appear in the top left corner of my flash game, but I want them to appear at preferably the location of a symbol or the x & y coordinates I specify (In actions obviously, i dont want to type these coordinates in game :P).Btw here is the code
var _loader:Loader = new Loader;
var _pictureArray:Array = ["word1.png", "word2.png", "word3.png"];
var _whatPicture:Number = Math.floor(Math.random()*3);
[code].....
View 5 Replies
Sep 12, 2009
When you make a movie clip, and have it open, does it have a physical 'place' on your pasteboard or main timeline?
For instance, when I test my 'scene' (as opposed to movie) my clip will be out of whack and off to the side of my movie viewer.
Then when I place the clip in my main timeline, i have to monkey around with it to get it to line up. I get a circle and a blue line at the top, but not sure what that space corresponds to.
Is there a good tut out there for movie clip creation and placement? It feels really sloppy the way Im doing it.
View 1 Replies
Jan 31, 2012
looking for the correct way to arrange this. So this below works. But instead of using the y coordinate of the wst, wsa, and wsm, is it possible to have it equal the mc itself? so wsa1.y==wsablank3(mc)
[Code]...
View 1 Replies
Jun 22, 2009
I would like to be able to specify the placement of a legend for a linechart. Currently, it continues to appear to the right of the chart. I have tried playing with the width/height of the chart to no avail... Putting the legend before the linechart in the mxml causes it to appear to the left. I can't seem to get it appear at the bottom though. I can't seem to find any good examples for this. They don't seem to specify anything but the legend usually shows up below the chart, I can't seem to do it.
View 1 Replies
Dec 24, 2009
My flex app has various Custom components. I want the tooltips for all of them to show at the top-right corner.Is there a Application setting that I can do this with? Or do I have to do this at the component level.
View 1 Replies
Aug 10, 2011
I need to have an object randomly appear on the stage, but only controlling the "y" to be random, "x" is not needed.
View 2 Replies
Nov 17, 2005
I'm trying to find out how to set the placement on the stage for an external swf or flv.oh and i've tryed to loop an external flv with a listener object but i can't seem to get it to work.
View 2 Replies
Dec 11, 2006
I have the following code below hard-coding the x/y coordinates of 8 movie clips. I am trying to write some code that will generate this so that it will accomodate any number of content clips so that I do not have to go back in and create new x/y corrdinates for additional clips.[code]
View 3 Replies
Dec 18, 2006
In the code below, I am loading in multiple images from based on an xml file. I am looking for a way to dynamically place the images depending on how many results are brought back. I have the starting points for the first image in each section in the code, I am trying to basically add about 40 pixels to those numbers for each image
Code:
var xml = new XML();
xml.ignoreWhite = true;
[code]....
View 1 Replies
Nov 27, 2003
Picture the scene, my trees are grown, the sun is in the sky and the birds are singing, as you move the mouse over one of the empty fields, tiny pretty flowers begin to grow where your mouse has been.
View 1 Replies
Feb 28, 2012
Determining the value of a bit in a byte? Hence at a current position?It's something with bitwise but im not entirely getting it. I know how preset a uint's value (a 32 bit's value)Just not....able to take part of a bit (say the 3rd, 4th, 5th, and 6th position of byte A into a new byte(byte B))etter example:001101000101110100101110101011101000Let's say that's a 32 bit segment.
View 6 Replies
Dec 21, 2005
i know there is a code that determines which of two values is larger and returns the larger value.i cannot seem to find it in the actionscript help.i know you can do it with
[code]...
but there is an easier way and i cannot find the file that i used it in previuosly.
View 3 Replies
Mar 5, 2006
I have a container_mc that loads in a external MovieClip, lets call it video1.swf using the MovieClipLoader class (it actually contains a video of a 180sx drifting but thats neither here or there). What I'm trying to figure out, is a way to find out when this externally loaded clip terminates, then preload and then display another clip, called video2.swf. I call my preloader and load my external clips into the MCL class using a version I learnt in Senoculars preloader tutorials here [URL]
View 3 Replies
Apr 10, 2007
i have 3 variables and im executing a block of code depending which on has the highestow do i determine has the highest and the execute the code which ever has the highest
View 3 Replies
Apr 16, 2007
I'm trying to test something out in flash with XML and waswondering if anyoone could point me in the rght direction of atutorial.I'm working on a project where I need to be able to pin pointseveral shots that were taken on a golf course. I Need to be ableto load in several jpegs and then on these plot the points at whichthe ball landed.I know this can be done using XML to load in the images buthow do I go about then ploting points over the top of the image
View 2 Replies
Mar 17, 2009
I'm looking to create an AS3 utility that will place frame labels (about 200), on the main timeline, to save the time it takes to do it manually. The label would be very simple like "page" + i. Is there AS3 code that addresses utility methods of this sort?
View 2 Replies
Mar 17, 2009
I'm looking to create an AS3 utility that will place frame labels (about 200), on the main timeline, to save the time it takes to do it manually. The label would be very simple like "page" + i. Is there AS3 code that addresses utility methods of this sort?
View 4 Replies
Jan 17, 2012
I've made a image slider Class and works fine up to the position of the mask. In my Home Class I make an instance of the image slider Class and position it accordingly. The images in the slider Class are position at 0, 0 as well as the shape I use for the mask. Here is the problem the mask placement is at stage.x = 0 , stage.y = 0 rather then the slider's Class x:0, x:0. Why is the slider instance showing the in right position but the mask in the instance isn't?[code]
View 1 Replies