ActionScript 2.0 :: Sequential Thumbnail Loader From A Xml File?
Jun 22, 2007
I have set up an xml thumbnail gallery using some of the great tuts on this site (I'm a designer so this dev stuff tends to get a little confusing). Basic setup is quite simple:
xml holds titles, thumb urls and details set up thumbs as a grid system, so they're loading in as columns, all of which is working great.
I have run into a bit of a brick wall though, and that is how to get the thumbs to sequentially load in, instead of random as they currently are.
Code:
...
function GeneratePortfolio(portfolio_xml) {
var portfolioTitle = portfolio_xml.childNodes[0].attributes.title;
var rootUrl = portfolio_xml.childNodes[0].childNodes[0].attributes.rooturl;
[Code].....
View 12 Replies
Similar Posts:
Jul 23, 2010
I have found out that I can not use loaderInfo.getBytesLoaded in as3. I have a gallery located here: [URL]the functionality is almost complete, but my gallery still has issues loading all the thumbnails. It seems that sometimes they wont load while sometimes they do. I have split my thumbnail process into:
LoadThumbs: Loads the thumbs
Callthumbs:Arranges the thumbs
Each function is called once per thumbnail. My problem is that I can not find the bytes loaded information for the thumbnail as it loads. Event completion and preloaders dont seem to help. I doubt it's my alpha tween because the thumbs are un click-able when they are not there. This is the info for my function, with the comments indicating the parts that bring up errors.
Code:
function loadThumbs()
{
x_counter = 0;
y_counter = 0;
[code]...
How do I get the loaded info of each thumb as it loads? Do i need to make a new class file?
View 2 Replies
Sep 12, 2010
i am currently working with flash based fashion website. here i am uploading large image and thumbnail from xml. i also have menu navigation at top. my code structure is detail below:
[Code]...
my problem here is like i have home button with 5 thumbnail and handbags with 2 thumbnail when i click home button will display 5 thumb with large image and again when i click hangbags buttom it will display 2 thumb which is what i want but 5 home thumbs keeps on remain at back. dont know how to remove them upon new button click
View 5 Replies
Jul 2, 2009
Intro:I started a flash-based website a few years ago. Back in 2006 I was able to get a xml scrolling thumbnail, image loader to work without a glitch.For numerous reasons I had to put the project on hold until now. [one was that my 30 day trial of flash expired and only recently was I able to purchase the Adobe Web Suite CS4 as well as a new computer which could run the apps.]
Last Friday saw a bump in the road in the development of my site as two, rather straightforward task, turned into something short of a nightmare as I have been unable to get past these two, seemingly, relatively simple task.I have posted in 4 other flash forums the issues, in detail, that I am facing - and have quite a bit of interest/views in the topic as the numbers suggest - yet no response/answer as of yet. [Which confirms other messages I have seen which seem to state that working with buttons has become increasingly difficult with the newer version of flash - something Im a bit surprised with actually from Adobe. - I would have thought there would be a palette where you could set parameters...]
Screenshot of Site/Timeline: Before getting into the two questions I have, I would like to post an image of the site as it looks whenever an swf file is saved out, as well as a piece of the timeline in the back for reference.As of now when the swf file is saved out you get exactly what you see above:
a: A scrolling thumbnail
b: ...which loads a large image when clicked on it - PEFECT...
BUT...1a: I need for the buttons to load in this action, not for it to just load on its own.[i.e., the silk_paintings gallery is what is open, so I need the "silk_paintings" button to call up this action]
note: Initially I had attacked this problem by taking out the actions layer you see above and applying it directly to the individual buttons with some crude MouseEvent Listener/Handerls... that did not work - at all.Im sure it may be "easier" to make an array out of it, but with my coding level it may be "easier" to apply it to the buttons.
1b: How I currently see it, I would take the xml-list and duplicate it for the number of galleries I have.[I would then re-name the xml-list to reflect the name of the galleries they are to represent, i.e. "silk_paintings"][also, I would have to rename the folders to "thumbnails1,2,3, etc., & "images 1,2,3, etc"
From there I would duplicate the actions and paste it into the buttons, changing the xml-list name to that of "silk_paintings", etc., as well as write in the MouseEvent listener Handler to make it work. [ah, ha, but what is that magic phrase, I have tried to implement various code from other tutorials, and all in vein.]
At this point I would be tickled pink just to get this to basic function to work.However, once the buttons are working and calling up the xml, etc., then I need the buttons to stay on the semi-transparent blue color it is whenever in the 'hit' state. [note: NOT pictured above.]With the way the buttons are currently set up, and with wanting to use scripting to get them to interact with the thumbnail gallery, it will have to be some miraculous code to tell that button what color to stay as whenever its clicked, and of course it going back to white when another button is clicked.
Conclusion:Since this is an Adobe Forum I would like to make a few additional statements in hopes that the developers, etc. may take heed.Adobes products are not cheap, and when I went to purchase the websuite I went in as a designer needing a program as not to need to program.I understand the flexibility that coding gives, but something as simple as linking buttons should not be in the realms of rocket science.
stop();
fscommand(allowscale, false);//keep SWF display at 100%
var x:XML = new XML ();//Define XML Object[code]....
View 31 Replies
Jul 28, 2010
I have a sliding thumbnail gallery which when a thumbnail is clicked loads an external .png into a container with an instance name of mycontainer which I have on the stage in the .fla. Its added like such:
When the Loader's (which I gave an instance name of imgLoader) complete event is called the function onLoaded loads it -like this: mycontainer.addChild(imgLoader);
I also added a mask(stageMask2) to mycontainer which is the same size as the external .png--I then used this code imgLoader.mask=stageMask2; to mask the .png. I did this because I added a zoommc function which enlarges the imgLoader and wanted to keep the visible size of the container the same. I would also like to be able to drag the zoomed image. I don't want to drag mycontainer as it contains the mask and I cant drag the imgLoader as it doesn't have that property--Do I need to put the imgLoader in another container?
Here's the problematic code:
var stageMask2:Sprite = new Sprite();
stageMask2.graphics.beginFill(0x183045,0);
stageMask2.graphics.drawRect(swfX,swfY,604,403);
stageMask2.graphics.endFill();
var closeWin:TextField=new TextField();
[Code] .....
View 9 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
Mar 13, 2005
I've tried applying Ilyas' infinite menu to the Senocular's XML portfolio. However, the movement looks bad--you can see where the thumbs stop and begin. I was wondering how this could be fixed??
Also, would it be possible that when you click on a thumbnail, a PDF file is launched? How could I do this from the XML file?
I'm trying to create a continuous scrolling horizontal menu. The menu would contain pictures of news articles and when you click on the picture, you could read the article in the PDF!
Since each article is pretty long, like news clippings, I don't think having this info in a flash pop-up box would work?
View 14 Replies
May 25, 2010
iam using a template, i designed everything alright but need to know how to click a thumbnail to open a file in the root directory.The XML file for the thumbnails looks like this currently and everything in the flash movie work and the explorer window opens to he link:
<?xml version="1.0" encoding="utf-8"?>
<thumbnails>
<thumbnail filename="ms.jpg" url="http://www.myspace.com/XXXX" [code]...
but instead of a URL I want a file to be opened (a mp3 or wmv or swf or exe) in its own window or default player...What is the code i would use? A similar flash template would be this http:[url]....but when you click each of the thumbnails, i want 1 to open a mp3, one ar flash movie etc
View 1 Replies
Oct 16, 2003
How to call an external jpeg file in a thumbnail and on click event showing the same image with greater dimension along with the text file
View 11 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
Mar 19, 2010
i've designed a strip of thumbnails in flash to go in a Wordpress site i'm working on, which when clicked need to open up images and videos using Lightbox 2. (Lightbox is already setup and working.) The problem is that i'm importing the links for each of the thumbnail buttons from a .txt file which works like this:
[Code]...
View 5 Replies
Feb 1, 2004
I would like to give two actions to one movie clip. I mean when I push a button a movie clip has to execute two sequential function. The second function has to wait for the first function to complete before it starts.To see an example click the following link:
Link Entering the site and clicking on one of the bottom buttons gives the result where I'm looking for.After the first time clicking on, let's say annoucements, clicking on one of the other buttons is giving the result the the white mask cover the stage and the opens again and an other mc becomes visible.
View 3 Replies
Feb 28, 2003
I was just wondering if there is a nicer way than setting flag variables etc. to accomplish this.Example: trying to have a pannel slide closed, then it opens with the text. The text is changed and displayed by the time it opens.When I have something like
movie.gotoAndPlay("CloseWindow"); //line 1
text.gotoAndPlay("ShowText"); //line 2
The problem is both processes start and you see the new text as the window closes.Is there a way to have your code not execute the next line until the previous line is complete?e.g. if movie was finished playing, then perform line 2.
View 8 Replies
Apr 15, 2006
is it possible to sneak in your images for a slideshow,
View 2 Replies
Nov 26, 2009
What I want to do is have a menu where the user navigates by clicking buttons in a sequential order. For example, if the user clicks button 1, then 2, then 3, they are taken to page 1. If they click button 2, then 3, then 1 they are taken to page 3, etc.
I'm really just not sure where to start or what terms i could use to search for info on this. I have tried many combinations with "sequence" and "sequential" with no luck so far.
View 3 Replies
Dec 23, 2003
Here is a script that allows a random color to be displayed, how do I alter the script to make it not random but, sequential from white through all the colors to black.
Here is the script:
onEnterFrame = function () {
myCol = Math.round(Math.random()*Math.pow(6, 16));
beginFill(myCol, 50);
moveTo(100, 100);
lineTo(200, 100);
lineTo(200, 200);
lineTo(100, 200);
lineTo(100, 100);
endFill();
};
View 6 Replies
Feb 19, 2009
In AS2 I used to be able to set up a FOR loop that would program sequential buttons. Now, I'm trying to do it with AS3 and I can't seem to get the function-part right. The last function is the only one that works. Here's some sample code...
PHP Code:
for (var i:Number = 0; i<3; i++) {
this["quiz"+i+"_mc"].go_btn.addEventListener(MouseEvent.CLICK, goButtonEvent);
[code].....
View 5 Replies
Aug 27, 2009
I'm trying to play 3 flv video, one right after the other but is unsuccessful. All it does is skip the other 1st 2 videos and play the last video in the array.
Here's my code:
var myArray = new Array("commercial.flv", "intro.flv", "sleep.flv");
this.attachMovie("videoHolder","mcVideoHolder",this.getNextHighestDepth());
mcVideoHolder.swapDepths(preloader);
var nc:NetConnection = new NetConnection();
nc.connect(null);
[Code] .....
View 2 Replies
Aug 30, 2008
In my .fla Library are 10 audio files named "Beep0",
var btnSnd:Array = new Array();
for(var d:Number=0;d<10;d++){
btnSnd.push(d);
[code]....
View 3 Replies
Sep 8, 2009
It is possible to loop through buttons in a movie clip that do not have sequential names.For instance, they are all named by the date they are for reference to a database.
View 1 Replies
Sep 11, 2009
I'm doing a flash movie in as3 where there are two or three swfs. What I want to do is play them in a sequential order, wherein when one finishes, the second one starts. The swfs are called movie1, movie2, etc. The best way is probably to use an array and load swfs into the 'overall' fla file that will play them. I use a variable called movieNum that keeps track of each movie. I am also using a Loader command which is just called loader. My loadSWF function works fine, but my eFrame function is flawed. I cannot find a way to recognize the end of the last frame of movie1.
var request:URLRequest;
var loader:Loader;
var myMovies:Array = ["movie1.swf", "movie2.swf"];
//my movie array
var movieNum:int = 0;
//start at 0
function loadSWF():void
[Code] .....
So, two or more SWFs called movie1, movie2 etc., and having movie2 start after movie1 finishes in an overall fla.
View 3 Replies
Feb 2, 2012
I have a button that needs to goes back to the last frame. But the user can get to each frame in different configuations so back is not a sequential frame. Is there a way to go to the last frame that was accessed?
View 6 Replies
Oct 13, 2003
I am trying to make a script that will count up to the designated number...if the set number was 50 then you would see all the numbers 0 through 50...and to make things even more fun I also need it to be for currency so I need a decimile point i.e.. $50.00
View 1 Replies
Jun 17, 2008
say you have 10 thumbs and those thumbs are referenced from an XML file. You want to load each thumb onto the stage and give it a sequential id variable. So, you first go through a for loop to attach the container MCs to the stage, giving them each an id variable equal to i at the time of the for loop execution. Now, the problem is that when you load something into that container MC it over rides the id that you set using the for loop. I'm using MovieClipLoader so I can assign properties and variables and such once the thumb image has loaded, but how should I do it so that the thumb knows which id it is?
View 7 Replies
Jun 3, 2009
I'm not really looking for a specific answer but really more something that I can target my research around. Here is what I'm working with: -this all need to pre-load. -I need to build a flash image banner -When you click a image they take you to a corresponding HTML page. -The first few images in the banner sequence need to play in sequential order so for example image00, image01, image02 in order. -Then once the first few images have played in sequential order images will be selected and played at random. Now here is the tricky part the random image selection can't pick to of the same images in a row. -The universal transition from one image to the next should be an alpha fade down of the top image exposing the random or sequential image below. Yeah I know that a real mouth full.
View 7 Replies
Aug 17, 2009
- Flash CS4 Actionscript 2.0 internal training project- Main movie is a single frame project, containing just the interface. This includes a menu listing 80+ individual "chapters" for the training series.- Each "chapter" is its own project/swf. Once the main interface loads, it should begin to play the chapters sequentially without the user selecting anything from the menu. When one chapter finishes, the next should load. If the user DOES select a chapter in the menu, it should load that SWF, and continue auto-playing from that selection forward.- Each chapter has a built-in play/rewind/ff bar, various movie clips with animations, dialogue audio track and a fairly lengthy embedded FLV movie, and therefore a preloader before each chapter is mandatory.What I have so far works, but it's embarrassingly crafted:- First frame of main movie (let's call this main.fla) contains the following code (most of this code was taken from an online tutorial):
var slideName = "modules/intro.swf";
var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(this);
[code].....
View 1 Replies
Sep 13, 2009
Im trying to make a dynamic site banner that will load in swfs detailed in a XML file. I think the best way is to load them in separate MCs and then start the first one one it has preloaded then move to the next to preload and once the first swf has finished a piece of code tells the _root timeline to play the next... and so on.
I have got it so the container swf loads in the swfs but the preloader is not quite working and I have no idea how to get this sequential thing working especially with next/pev buttons. Currently it seems that the loader is not quite working with the first file and all files are loading in at once. I need the player to wait and load sequentially.
Following is my code and attached are the files. Please help and much appreciated.
Code:
stop();
/*******************************************************************/
/**********************UNIVERSAL VARIABLES AND SETUP****************/
// constants
[Code].....
View 1 Replies
May 9, 2009
Consider the function below:
function personal(Name:String,age:int,city:String):void{ trace(Name+" is "+age+ " years old and lives in "+city+ ".")}
The parameters can only(???) be passed in the order they are declared in the function as
[code].....
View 13 Replies
Aug 11, 2011
In my flash project I wanted to introduce small delays between actions performed by the code in a run.For example:
for(i=0; i<5; ++i) {
someMovieClip[i]._visible = false;
//One second of delay
[code]...
View 1 Replies