ActionScript 2.0 :: Flash8 : Properly Organize Dynamically Loaded Thumbnails From A Xml File?
May 28, 2009
how you properly organize dynamically loaded thumbnails from an xml file, into a grid.What I'd like is for the number of columns and rows to be set in the xml file also, and for the flash file to auotmatically fill out the rows / columns based on how many thumbs are in the xml file.
I've found examples of this type of thing in both as3 and as2, but I can't seem to get my as2 version working properly... how to create a thumbnail grid in as2...I don't really want the thumbs to link to a bigger version fo the image...
View 5 Replies
Similar Posts:
Nov 6, 2006
I'm working on a portfolio site that I'm pretty much done with, but I'm having trouble with the loading order of the thumbnails on the site. The work in the portfolio is grouped into clients, and within each client, there are thumbnails that display the selected work. This will probably make more sense if you can see what I'm talking about: [URL]. (Only the first two clients are enabled at the moment). Specifically, when the page is first loaded (from a web server) the thumbnails show up in the wrong order. When the page is refreshed, the thumbnails are displayed in the correct order.
The thumbnails always display in the correct order when being viewed locally, or in the Flash Test Movie environment. I'm pulling in the data from an xml file into an array, and iterating through the elements of the array with a for...next loop, I'm loading the thumbnail images with a MovieClipLoader instance. Using the onLoadInit event, I then set the horizontal position of each thumbnail clip. As much as I'm looking for reasons why the order could be switching. I suspect it has to do with which thumbnail image finishes loading first - in which case, how to force the images to load in the correct order. Maybe I should use if...then and load the next thumbnail only when onLoadComplete fires?
View 2 Replies
Apr 7, 2007
This question has probably been asked a number of times in this forum. I searched and searched, read every reply, but there is nothing satisfactory posted till now. I tried out all solutions posted, but almost every implementation was incomplete. So, here is my question: In the xml photogallery tutorial, if I want to have a border around a thumbnail (which is dynamically loaded), how do I do that?
[Code]....
View 6 Replies
Mar 10, 2011
I'm creating a banner advertisement in Flash. It pulls all information from an XML file. Images for each product are also loaded externally. Everything is working fine except for 1 thing.
I have an image separator i'm using as a background for each product container to lend a bit of separation to each product. But when I try to add it using code it's only added to the last item. Doesn't matter if it's 10 items or 2 items...it's only being added to the last one and i'm not sure why. Anyways, i've zipped up the associated files and put it on my webserver. I'm using the Tweener class and have included that in the archive as well.
Here's a link to the archive : Project Files
View 1 Replies
Mar 9, 2012
Can anyone have some time to look into why in these fla the xml file is not loaded properly. If possible please take a look. As the file size is very big kindly download the same from this link.url...
View 2 Replies
Jun 29, 2009
I need to create two combo boxes that are populated by an XML file. In the first combo box there are 13 choices and depending on what the user selects I need to populate the second combo box with the correct information. Now I can create the first combo box just fine but when I try to dynamically create the XML file name for the second combo box it doesn�t seem to work. What I am doing so far is taking the data from the first combo box and adding the quotes and .xml with this piece of code:
PHP Code:
pModCombo = '"'+event_obj.target.selectedItem.data+"Combo"+".xml"+'"';
pModComboXML = new XML();
pModComboXML.ignoreWhite = true;
pModComboXML.load(pModCombo);
If you trace that code it creates the file name just fine however the xml file will not load. If I replace that code with the normal xml code like this:
PHP Code:
pModComboXML = new XML();
pModComboXML.ignoreWhite = true;
pModComboXML.load("new.xml");
The second xml file seems to load just fine. However, if I create an if statement with all the different xml file names I will have to update the swf every time I add a new choice in the first combo box. So my question is does anyone know how to dynamically create the xml file name?
PHP Code:
pmComboXML = new XML();
pmComboXML.ignoreWhite = true;
pmComboXML.load("brands combo.xml");
[code]...
View 6 Replies
Aug 18, 2006
I have a flash file (a flash navigation bar actually, which gets loaded in all the webpages inside the website). What I am trying to do is place an external swf file on it in a desired position when the corresponding page is being loaded. I am using FlashVars (variable name -> 'movieName') to pass the name of the movie clips. These variables are read by the navigation swf file and the corresponding swf file should be loaded in the area specified. Now, to create a container, I am using createEmptyMovieClip() method which will host all the external swf files.
The swf files are all being loaded but with a lot of problems. First, no matter what I try, the swf file comes at a fixed place (which is way off from where it is supposed to be). I have tried checking if the container loaded the movie before fixing its position but it changed nothing. Although it did change the position of a weird background colour box I am getting when the movie starts loading - which brings me to the second problem.
A rectangular box flashes once when the external swf is loaded, and its position is being affected by whatever I am setting the _x & _y values of the container movies to. I have no idea why it is happening as it doesn't happen when I test that swf seperately.
[Code]...
View 1 Replies
Jul 30, 2009
I made some general useful functions for my project that I use in many different parts of the code.
I broke the code down into classes.
I can't seem to call the functions I want from each class.. right now I simply copy and paste the code of these functions into each class I need them in.
Is there any easy way to make a big file with all the general functions that are not class spesific to keep things easier?
View 2 Replies
Jul 23, 2011
I'm working on a small game project with some friends and I need some advice on loading files. The program initially loads an XML file which describes all of the external files needed by the various classes; images, sound clips, movie clips etc.
View 8 Replies
Feb 17, 2011
I tried to change dynamically loaded xml file. Example: default loaded xml file is books.xml, now if I push button named CDs then it loads cd.xml. Do I need to use listener and trace? I have to files Script.as and Page.swf
Script.as file
Actionscript Code:
package {
import flash.display.Sprite;
import flash.display.MovieClip;
import flash.display.DisplayObject;
import flash.display.SimpleButton;
[Code] .....
View 5 Replies
Apr 2, 2012
I have done a simple code for a slideshow that dynamicly loads images from a subfolder, depending on what is listet in a text file.
the code:
import flash.display.MovieClip;
import flash.events.Event;
import flash.display.Loader;
import flash.net.URLLoader;
[Code]...
View 1 Replies
May 16, 2009
in (swfA.fla) I have this code in frame1
var module1:Loader = new Loader();
var admin = new MovieClip();
addChild(admin);
[Code]....
(my thought here is that 'admin' contains swfB.swf?) - this would seem very simple... but it...
...does not work and gives me this [seriously unhelpful] error:
TypeError: Error #1010: A term is undefined and has no properties.
at swfA_fla::MainTimeline/frame1()
View 7 Replies
Apr 19, 2005
I'm trying to get a dynamically loaded swf to load into an empty mc behind a particular mc on the stage. I used actionscript to create an empty movie clip using the createEmptyMovieClip command. But, how can i get it to create it, then load the external .swf into it behind a exsisting mc on the stage?
View 1 Replies
Nov 23, 2009
I have made a presentation with voice over, in which the images and audio files are loaded externelly from the folder where the swf was placed. the voice over files are in MP3 format, loaded with the script follows
mysound = new Sound();
mysound.loadSound("voice1.mp3");
mysound.start(0,0);
It works well in IE but not in Firefox.
View 1 Replies
Nov 23, 2009
I have made a presentation with voice over, in which the images and audio files are loaded externelly from the folder where the swf was placed. the voice over files are in MP3 format, loaded with the script follows
mysound = new Sound();
mysound.loadSound("voice1.mp3");
mysound.start(0,0);
[code]....
View 1 Replies
Sep 1, 2005
i ve problem in adding hyperlinks to dynamically loaded text from an xml file..
View 1 Replies
May 27, 2003
i have a text box in flash which has text loaded dynamically from a .txt file. and its html enabled.. the text file has a variable name. notes but it doesnt have an instant name.... the problem i have is. that when i snap a flash mx scroll bar component. it gives it an instant name but the scroll bar doesnt work.
View 11 Replies
Jun 8, 2005
I am trying to preload an mp3 file dynamically while showing the typical 'percentage loaded' in a dynamic text box. However for some reason, the percentage just doesn't count up - it freezes on 100% even though the mp3 file is still loading. I have included the code that I'm using below. Also, does anyone know what would be the best way to adjust this code so that I could preload multiple mp3 files at the same time or one after another?
[Code]...
View 2 Replies
Jul 12, 2010
I'm trying to set thumbs/movie clips in a layout where on resizing the browser window, the thumbs dynamically re-set themselves to fit in the new size. An example of what I'm trying to achieve is on hereI have followed the tutorials on Liquid GUI's
View 1 Replies
Oct 6, 2010
Actually I have made a photogallary. I load thumbnails from a folder to my stage using xml. All my thumbnails are placed in one line at the bottum of stage. Now i want to scroll these thumbnails left and right. I have used the mathod
function moveImg():void {
img[1].x+=5;
img[2].x+=5;
[code]....
this function moves every img 5 pixels to right, and i can call this function countinuously and same with some negative sign to move it to left but its quality is not good. how can i scroll all these images using some good machenism.
View 2 Replies
Feb 10, 2009
Suppose I want to dyanamically load 10 jpeg thumbnails. I have given them files names "image0.jpg", "image1.jpg", "image2.jpg", image3.jpg" and so on.Now, I might write out the code to do it ten times, like this:
var image0:loader = new Loader ();
image0.load(new URLRequest ("images/image0.jpg);
var image1:loader = new Loader ();
image1.load(new URLRequest ("images/image1.jpg");
But it would be much better if I could write out it out in a loop, and have the actionScript assign names to the variables. I don't know actionscript so well, but I feel I want to have something like this:
var [name+i] :loader = new Loader();
[name+i].load(new URLRequest ("images/"+[name+i]+".jpg");
Now I've just made that code up, but there is some logic in it, which I hope makes my question clearer.
View 12 Replies
Apr 12, 2005
The main thing that intrigues me about the project is that it can create FLV thumbnails on the fly using the VideoThumb.as file included in the project download. Unfortunately, the project was made to be used on Flash Communication Server, and I am using Progressive FLVs on my site. I have been trying to figure out how to convert the VideoThumb.as file to work with progressive FLV instead of streamed FLV. I must say that I'm quite surprised no one has done this yet, as I think it would be a valuable contribution to the Flash FLV community.Anyways, as far as the code in the VideoThumb.as file, the main part I don't understand is this snippet...ok, so it's a pretty big snippet
Code:
// str is the suggested string to render from the tree (based on the node)
// node is the entire XMLNode for the row
[code].....
View 1 Replies
May 2, 2009
I'd like to dynamically load thumbnails into a horizontal movieclip at the bottom of an image gallery to then allow me to load an image by clicking the thumbnails. I found a tutorial tooad the thumbnails to the stage but I am not sure how to load them into the thumbs movieclip. Here is the code I am using:
var imageLoader:Loader;var xml:XML;var xmlList:XMLList;var xmlLoader:URLLoader = new URLLoader();xmlLoader.load(new URLRequest("xml/murals.xml"));
xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
View 18 Replies
May 16, 2005
I have created a gallery with thumbnails (using various tutorials) howver the thumbnails all load on one line.. I would like to able to brake up the thumbnails so that after say 4 tbm load the next 4 will go below I have tried various methods. Here is my script
images = new Array ();
xml_file = ("Gallery/Range/images.xml");
//xml_file = "images.xml";
xmlload = new XML ();
[code]....
This didn't work
View 3 Replies
Aug 15, 2009
ive built it based off of an example we made in class last year that i had lying around..
as you can see here everything works fine.
The only problem is I want to add some roll over effects to the thumbnail but im not sure how to go about this as they are all dynamically added to the stage..
The way I tried was adding an event listener to each thumb via the function that adds the thumbs to the stage (see the "createThumbs()" function below). The event listener works fine and calls to the function i assigned to it ("thumbRoll") but im not sure what to put in this function to effect the thumb that is moused over as im unable to access "btn_thumb" from "thumbRoll".
ps. sorry if the code is a bit messy, bit of an experiment for me to get everything working..
gallery.as
ActionScript Code:
package{
//imports go here
import flash.display.*;
[Code]....
View 6 Replies
Nov 19, 2010
I'm developing an app that needs to dynamically load in .png files as thumbnails for an image gallery. I have studied up on the bitmapData.hitTest() method for being able to setup an alpha test in order work around the .png bounding box issue, but have a problem.
I get an as3 error 2005, which OK I can understand in some cases, but it is pointing to a parameter that makes no sense at all. Here's the error:
ArgumentError: Error #2005: Parameter 0 is of the incorrect type. Should be type BitmapData.
at flash.display::BitmapData/hitTest()
at folio_fla::MainTimeline/checkAlphaForHit()
View 2 Replies
Feb 12, 2011
I have a .fla which loads thumb nails and when clicked shows the large image. It all works fine. I would like to have a reflection for each thumb how would I go about doing this, or how would amend my code to add the reflection.
Code:
var holder:thumbNail = new thumbNail();
var thumb:Loader;
var container:MovieClip = new MovieClip();
[code]...
View 3 Replies
Apr 6, 2010
i am trying to do the following: in a tile-based game i want to attach a bunch of tiles which are movieclips the tiles are all similar in function, only the graphics are different. so i created one basic class for all of them:
Code:
package {
import flash.display.MovieClip;
public class TileMC extends MovieClip {
[Code].....
View 6 Replies
Apr 28, 2009
I was wondering if there was a way a user could click a button to record a sound that would be stored to a sound clip and played back by the click of a button?
In other words, can I dynamically record a sound from my mic into a sound clip in an .swf?
View 1 Replies
Sep 22, 2009
What I'm trying to do build an FLV player which will take the size of the FLV movie and dynamically adjust the stage width/height to match the FLV.
View 2 Replies