Actionscript 3.0 :: Cycling Through Slideshow With Next/prev Button Using Array
Aug 26, 2009
I have a simple slideshow with images beside each other with a mask on top of them. I currently have it where I can click on the images and they will move with a switch/case statement. I'm puzzled on how I can do it so simple so I can use a next button so the images will be clickable for other reasons!
Here is my code:
Code: Select all
import flash.display.Sprite;
import flash.display.StageAlign;
But when the videos player is initiated, the first video is paused at the start, and a faded black screen overlays the video with a description of the content of the video.Also, there's a for loop that links each video of the array to a numbered button which also sits on the back screen along with the description, in case the user wants to view the second video not the first.Everything works perfectly fine as I want it, but I have next and previous buttons that are always there, so in case the user wants to go from one video to another, they can click next or prev.
I have been struggling with this for a week, and can't get it to work.I tried setting up a _global variable, but the prob is, the results of the XML array, gets stored in the for loop for the numbered buttons, and I don't know how I can get the next and prev buttons to know which video is playing and go through the index of the array to trigger the next or prev video.Here's the code that I have so far:
Code: var videolist:XML = new XML(); videolist.ignoreWhite = true;
I still can not get a basic slideshow with the either thumbnails or prev/next buttons to work. It seems that every tutorial either assumes I downloaded the correct libraries or understand when they are using AS2 or AS3.point me to a "FOOL" proof tutorial or template..I understand the basic part of what is going on but do not know enough AS yet to hammer out the actions myself.
how to make this file go from Image 3 to Image 1 when clicking the right arrow, and from image 1 to image 3 when clicking the left arrow, like a continuous loop:
showjing.net84.net/slideshow (the file is called index2.fla)
instead of cycling through the images in the array, it jumps right to the last one. import fl.transitions.Tween; import fl.transitions.easing.*; play_btn.addEventListener(MouseEvent.CLICK, goPlay)
I have made an array that creates a menu within a sidebar (this is embeded in a MovieClip, so that it can be tweened in and out dynamically). When you click a menu item created by the array, it loads a swf and plays it. This all works fine. My problem is this: I would like to use that same array to have a "fast forward" and "rewind" feature that plays the next or previous .swf in the array. The other kink is that the swfs need to "autoplay", as in, when one swf is done, the next in the array should start. I am stumped on how to do the fast forward, rewind, and autoplay stuff using the array...
Code: var menu_itemArray:Array = [ {itemName:"When is it used?",itemType:1,itemSwf:"01whenused.swf"}, {itemName:"Why is it used?",itemType:1,itemSwf:"02whyused.swf"},
I've been able to add those buttons, but they only work if I don't click on a thumb, as I click on a thumb they stop working. In the code there is a function called loadGImage which loads the full size images, originally that function accepted 2 parameters, I've added a 3rd one which store the current image's index inside an array, so that I can use my buttons to call that function with index+1 for next and index-1 for prev.In addition to this I've added a variable which is updated everytime a full image is shown, that variable contains the image's index.
Clicking on thumb the buttons stop working because the current image's index turns to "undefined" so they can't pass a correct value to loadGImage.I've checked the code of the gallery, but I can't find where is said to the thumbs to call loadGImage, if I'd found that code I could add the index parameter and my buttons would work.I'm sure that the thumbs call loadGImage because I've put a trace() inside the function to see when it is activated.[URL]
Im trying to make a next and prev button for my thumbnails in my gallery using xml.Problem is that everytime I add a new entry into my xml I keeps making a new thumbnail and I only want 6 thumbnails loaded and when i click the next btn I want a new set of 6 thumbnails to appear same for the prev button.
Code: for (j=0; j<70; j++) { var links = thumbsss.attachMovie("pt"+String(j), "pth"+String(j), j); posX = xIni+ln*int(j%18)-70;
[Code]....
i'm trying to create next/previous buttons for externally loading movies. it works ok except a situation that when i load some movie first then i click the next button, it loads the same movie, when i clicked 2nd time it loads the next movie..
I have tryed to ad a next and prev. page buttom .I also want to have one function that you press your left key on your keyboard and you go to previous page.
What I'm talking about is that instead of randomly cycling letters (random variable that's being displayed in a dynamic text box), I want to cycle between random Movie Clips, i.e. I have one movieclip in display and it cycles between random other movieclips (replacing itself with a random MC) until it shows a specific MovieClip that I specify.
The reason I need this is because I wanted this special font that uses unique characters but I couldn't find it anywhere... However I found images of it, so I've imported the image into Flash and created vector shapes that correspond to the font in the image. (I'm feeling that I'm sweerling this a bit too much...)
how to make a sliding content with a next and previous button in AS3? I know how to do it in AS1 but in this particular project I made use of Tweenlite, which requires AS3. Basically, I have a vertical movieclip navigation that toggles back and forth, and in each movieclip i want to insert a sliding image gallery with the next and previous button.It's similar to this onebut instead of having individual links, i just want to have a NEXT and PREVIOUS buttonIs it also possible to have links in each image? Anyway, in case I'm not making myself clear I attached a sample fla. and jpeg file of what I'd like to happen.[URL]
I really dont get whats going on here in the code.... It looks fine and even trace the values that i need but it just does not work. In overall, i have an Empty MC which is populated with 8 thumb via a for loop each time i click the next button. When i press next it must go forward and show the next set of thumb of the xml file which have been loaded into a variable at very first.
The previous button works opnly when i am on the 2 nd set of thumbs but as soon as i am on the 3 or 4rth set then its a mess. the function does populate my array but does not show them... it says undefined
I am loading swf file on prev and next in my image gallery. its an xml driven gallery..its working fine.Now i want when i click on next and prev button it loads the swf but with different url.I came to know that it can be done by using deep linking.
openMenu.addEventListener(MouseEvent.CLICK, openSubMenu); function openSubMenu(event:MouseEvent):void { this.openMenu.nextFrame(); } openMenu.closeMenu.addEventListener(MouseEvent.CLICK, closeSub); function closeSub(event:MouseEvent):void { this.openMenu.prevFrame(); } stop();
I've got the above code on my first frame, and was hoping that it would open a menu when a button was clicked, and once the button within the MC is clicked it would then close. Hence the nextFrame and prevFrame actions.
I keep getting TypeError: Error #1009: Cannot access a property or method of a null object reference.
this is my code for photogallery.there will be 61 images loaded in this array.how can i make an AUTO button which will make a slideshow,showing all the images in array?
arrayrow = new Array() arrayrow=[ ["00.jpg","0","sajkad","hjsgadhj"],[code].....
I have made a 3dCube and each face has 4 boxes fitted in that will display a slideshow of pictures. The trouble is that it skips striaght to the last box leaving the others blank. here is my code:
I already have an array set up with a navigation and tween on the MC's when the navigation is pressed. My question is, how would I apply a simple automated play to it. The functions are already there that make the navigation bring up my corresponding MC, i just need some autoplay to it.
Here is my source: Code: this.scrollIcons = function(p_offset:Number) { // Scrolls the icon list this.setIcon(this.currentIcon + p_offset); [Code] .....
i've made a script for slideshow an array of images, with fading images. I'm trying to figure out what's wrong with my script, why it has small pauses between images.
here is the script, on the first (and only) frame of the movie:
I've constructed a dynamic slideshow using ActionScript 2.0 and PHP/MySQL. The reason for this, aside from update purposes, is that the slideshow will eventually display over 200 images. Thus, to save loading time and bandwidth, I decided to use PHP to pull ten images from an SQL database, formatting the output in XML. The slideshow itself works fine. Unfortunately, there are a couple of issues I need to address; my ActionScript is extremely rusty, so much of my work's patchy.
The code's displayed below: import mx.transitions.Tween; import mx.transitions.easing.*; var myShowXML = new XML(); myShowXML.ignoreWhite = true; myShowXML.load("getData.php"); [Code] .....
The code in red is my main focus. It's the loop which loads all images as movie clips using the XML information from an array. The loop loads all of the images, making them transparent before the presentation begins. What I would like to do instead, to save loading time, is to load the next image while the current one is displaying. The function "moveSlide" controls the transition of the images, so I'd imaging it'd be best to plade it in there.
There's already an incremental variable being used, with _root.target_mc, for removing transparency from the current slide. The code in blue is also nagging me quite severely. I retrieve the next chain of slides by simply contacting the PHP script again. The only way I could think of doing that was to refresh the slideshow (this is done COMPLETELY in ActionScript, with nothing on the stage). Unfortunately, I could only work out how to reload the whole video.
I have been trying to create an automatic slideshow at a click of a button. I have tried a few ways using timer class to show images(stored in an array) for a few seconds but i can't seem to get it working. Below is the code that i am trying to get it working..if there is any kind soul out there,
I have a movie clip in frame 1 of a scene. The movie clip continues to cycle. I've tried everything I can think of but I can't get it to stop. where to put the script and what it should say?
I have a swf gallery (it's actually part of a larger swf that does other things). I send an array of image url's the swf and it will fade them in and out to display them in turn.The problem I have is that if there is just 1 image it just keeps fading in and out and looks a bit silly. I would just like to have the one image displayed statically if there's only 1 image.The code that is under the 'gallery' heading in the actionscript is:
I am a complete newbie at flash(it took me 10 minutes just to figure out where to put actionscript code lol). Anyway I'm trying to make a flash where you can cycle through images using a slider bar. They are images of a persons face from 13 angles starting from looking 90 degress left, to center, to 90 degrees right. I want to be able to rotate the face using the slider. What I'm trying to do is similar to another thread I was reading(though not exactly the same goal) so I took the code from there just to start myself off. Currently when I test the movie the face is moving back and forth(in loop play) and the slider bar does not interact with the images/frames at all. This is the code I have in Layer 1 Frame 1. I'm aware this code might be completely wrong for what I want to do since I pulled it from someone elses project.
I've got an interesting one for ya. How do I make a random XML auto gallery. The actionscript is for my auto gallery, which loads and changes every 15 seconds. How do I make it so that it loads from the XML file randomly?!See code below...
Code: // set up variable and constants var pathToPics = new String();
May I noe if there is any flash example or anyone noe how to make images cycling very fast,then one of the images will zoom out for a while, then continue the procedure again but now display out another image.... Something like random letter cycling..
How do I make a random XML auto gallery. The actionscript is for my auto gallery, which loads and changes every 15 seconds. How do I make it so that it loads from the XML file randomly?!
See code below...
Code: // set up variable and constants var pathToPics = new String(); var pArray = new Array();