Slideshow - Controlling MovieClip Using Simple Buttons
Aug 19, 2009
I'm trying to build a simple slideshow with AS3 consisting of one movie clip which should be controlled backwards and forwards using simple buttons. I can get the slideshow to play forward once but, apart from getting slide 2 to go back to slide 1, I can't get it to work with the remaining slides.
View 11 Replies
Similar Posts:
Apr 26, 2004
I have a text movieclip (service_mc) on the stage for which I need to control 4 different _xpositions (_x = 0, _x = -700, _x = -1400, x = -2100) with 4 button mc's (btn_one, btn_two, btn_three, btn_four).
For these four buttons I already declared the Over, Out, Release and Restore stage in a function:
Code]...
What I like to accomplish is to control the _x positions of "service_mc" with the same buttons. I mean when btn_one is pressed service_mc should go to _x = 0, when btn_two is pressed the _x position from service_mc should change to _x = -700 etc, etc
How to integrate this possibility in the existing function?
View 10 Replies
Apr 26, 2004
I have a text movieclip (service_mc) on the stage for which I need to control 4 different _xpositions (_x = 0, _x = -700, _x = -1400, x = -2100) with 4 button mc's (btn_one, btn_two, btn_three, btn_four).For these four buttons I already declared the Over, Out, Release and Restore stage in a function:
Code:
for (var i in this) {
if (this[i]._name.substr(0, 4) == "btn_") {
[code].....
View 10 Replies
Feb 25, 2011
This is my first time coding a website using ActionScript. So far everything has went very well, I designed the website in Photoshop, and imported to Flash CS5. Then I cleaned everything up, and started adding navigation to the various pages using buttons.The website is constructed in a very simple manner, there are five main pages and they are connected by buttons on a static navigation bar (the first page, home, doesn't have a corresponding button). Then there are nine sub pages, that each contain information on a character of the game, and are connected to corresponding buttons in the 'Character' layer/MovieClip. My four menu buttons (Story, The World, Characters, Extras) all navigate correctly without problems.
The problem arises because inside my Characters page (a movie clip) are nine buttons, each linking to a different page. These buttons should bring the timeline to the frame specified, but when the buttons are clicked nothing happens. I've spent hours searching for a solution to this, but with no avail, and I have a feeling the answer is prettysimple.gotoAndStop("gowang", "Scene 1");line in the Gowang character button function with:MovieClip(root).gotoAndStop("gowang");
View 3 Replies
Feb 6, 2011
This is part of a large quiz I am building. The three choices here are part of a group of three from which you should only choose one. If so the other two are enabled=false. I can't change the method only modify since it is part of a much larger app that is runnung fine. So no radio buttons or codeing on maintimeline. If you run the attached simple FLA and select the first choice you can see the enabled=false that is on the voted and pass framesworks fine, however if you choose the second the first is only disabled and the third is enabled and as logic would have it if you choose the third the first and second are enabled. The idea is to make it so the user can only choose one the other two are disabled while still having the choice to deselect.
View 1 Replies
Jul 27, 2010
What I have is a SWF file that calls out to 3 different SWF files via the following code:
// Array of external clips to use. Variable index refers to next clip to be displayed.var clips:Array = ["page1.swf", "page2.swf", "page3.swf"];var index:int = 0;
// Stuff to load swf filesvar thisLoader:Loader = new Loader();
[code].......
View 11 Replies
Oct 24, 2010
I have this little slideshow, it is for practise for my students. It always worked well in as 2.0, 5 slides, and two buttons: back and next.The script in2.0 has: prevFrame and nextFrame in the code and for the exceptions in frame 1, and frame 5 we made a new frame 1 in the actions layer, and coded the back button, gotoAndStop(5); and a new frame 5, and coded the next button: gotoAndStop(1); Works.
Now I put the thing over tot as 3.0: And I can not get it to work properly....the buttons work, but when I am on frame 5, and go back to 4, it will go no further than 4, evenso when I go back to frame 1 from 5, I can not go further up than frame 1.
import flash.events.MouseEvent;
stop();
next_btn.addEventListener(MouseEvent.CLICK, volgendFrame);//next_btn.addEventListener(MouseEvent.CLICK,[code].....
View 5 Replies
Sep 4, 2008
I'm doing the very simplest of slideshows which will later be exported to .swf and converted to a .scr.
The code I'm working off allowed the .swf to use a small bit of actionscipt to run through the bitmaps contained in the file. Looks like this:
with (_root.image.pics) {
gotoAndStop( Math.round( Math.random()* 20 ) );
}
Alas, what I don't know how to do is get these damn images to play IN ORDER. I'm sure it's simple, but my searches have turned up zilch. I've tried increments (++) and I'm too much a Newb to know how to use arrays (like how I would call the images in my folder within an array - way over my head.)Is there a simple way to get these images to get called in a range of some kind? Like "gotoAndStop(range 1-20)"?
View 7 Replies
Jun 25, 2009
i need is a simple slideshow. already have images ready but when it start it only shows images for one second and goes to the next.i want it to stay on screen for ten seconds (i am new) (cs4) and needs to work when uploaded to website not just on my computer
View 3 Replies
Jul 14, 2009
I was wondering how would i go about making a simple application that can be run on a website that can:
-show a opening page that will stay for 5 seconds (for advertisments)
-show random pictures (well they will only be text)
-can change slide by clicking on screen.
View 1 Replies
Jul 18, 2011
I would like to create a simple slideshow for my Web site that is populated with images from a database. All I want it to do is pull the 6 most recent photos using ColdFusion, fade from one image to the next and loop.
View 1 Replies
Sep 23, 2009
share with me a source of Simple XML image slideshow. I just want to see the method of loading pictures and switching between previos and next of the current one.
View 1 Replies
Apr 8, 2011
It's caused by memory leak. Every time a slide is shown, the memory usage increases a few hundred kB. I've tried everything I could come up with, but even if I kick a whole lot of movieclips out, disable basically all AS3 and let only one slide loop, the memory usage still increases everytime the slide is shown again.Of course it helped to make the movieclips simpler, but the main problem remains: if you keep running the slideshow, it will slow down.
edit 1: #&^%@! Even when i copy one of the slides to a completely new file, with no external classes whatsoever, the problem remains. I think I know now what goes wrong:I make the movieclip loop by saying this.gotoAndPlay(1);Frame 1 is empty, the slide placed on frame 2. If I'd put the slide on frame 1, the mc wouldn't begin at the start and there is no animation (and no memory increase) because the mc has ended.I already figured that maybe every time the mc is shown again, Flash casts a new instance. To prevent that, everytime a slide ends, I remove it with removeChild(clip). That has no effect however, so I think that's unnecessary.
edit 2: even when the MCs are constantly on the stage and are restarted with clip.gotoAndPlay(1), the memory usage keeps growing.
View 4 Replies
Dec 27, 2009
I am very new to flash CS4. I am preparing to develop a simple photo slideshow, set to music (3 minute song), with three buttons containing pull down menus which will link to pdf files. This is a project I have taken on to develop an informational CD for the High School I work at.
Here is my question:
When building a photo slidshow with 35-40 photos what is the best practice? Is it to place them all on one layer, or each on its own layer? Also I did see the set interval method from tutvid placing the photos in frames next to each other.
View 6 Replies
May 3, 2011
I'm trying to create a simple fading RSS reader. I'm using PHP to create an XML document. Then I'm calling the XML into Flash using the following code.
ActionScript Code:
function postXML (loaded){
if (loaded){
postNode = this.firstChild;
newsID = [];
newsHeadline = [];
[Code] .....
I display this information in a movieclip that has several dynamic textfields. My problem is this. PHP calls the information in descending order. I want the most recent post to display first, that's why I do it that way. How can I reverse cycle through the nodes. There will be five. I'd like to use the id attribute as the reference to cycle through the nodes. I'd also like there to be a 15 second delay for each slide. I guess I'm basically creating a text slideshow. 15 seconds with an option to pause.
View 1 Replies
Aug 19, 2009
I have a simple slideshow composed of 4 images repeating themselves. Basically, the movie loads the first one, increases a numeric variable, and then unloads it with remove child, and loads another one corresponding to what the numeric variable is. When the 4th image is about to go away, it resets the variable back to 1 to signify the 1st image, then loads the 1st image and the process repeats. I've attached the .fla if my explaining skills are subpar.
The code for loading the photo depending on what the variable is below. (In a previous frame, "photoload" is set as a new Loader and the numeric variable "whichphoto" is set to 1.)
Code:
if (whichphoto == 1){
photoholder_mc.removeChildAt(0);
photoload.load(new URLRequest('homebg01.jpg'));
[Code]....
My question is when I have flash load the 1st image for the 2nd time, does it use up more bandwidth (as if it was loading the image for the first time)? Or is the image already saved in the viewers memory once all 4 images have been loaded for the first time?
View 6 Replies
Nov 4, 2009
I downloaded the trial of flash cs4 and have created a simnple flash.I am creating a simple slideshow, each of the slides should be clickable and redirect the browser.I created images then imported them and they were automatically converted to symbols.I combined the symbols using some motion tweens.I then created an actions layer and created clasic tween wher I want the user to be able to click.My problem is I cant get it working. I think I am not referencing the right objects.[code]I have tried setting the object reference to the motion tween instance name, the classic tween name on the actions layer and the symbol name none seem to work
View 1 Replies
Aug 16, 2010
I am trying to use the "simple photo album" template that comes with Flash Prof. CS5. I have it working except I want it to play by default. The actionscript that came with the template is below (in blue), but if I set var autoStart:Boolean = true; I get the following error and the controls do not work:
TypeError: Error #1009: Cannot access a property or method of a null object reference.at nt_fla::MainTimeline/fl_startSlideShow()at nt_fla::MainTimeline/frame1()
// USER CONFIG SETTINGS =====var autoStart:Boolean = false; //true, falsevar
[code]....
View 5 Replies
Oct 27, 2011
i have dynamic buttons in movieclip and i want the movieclip goto 2nd frame once some one click single movieclip while rest remains in 1st frame.the movieclips can be in arrayi have some code here:
Actionscript Code:
var mc:MovieClip = new MovieClip();for(var i:int = 0 ; i < numberOfButtons;i++){ var btn:MovieClip = new button();
[code]....
View 5 Replies
Dec 10, 2010
I have this slideshow that I'm so close to having completed, but there's one issue I'm having with it not resuming after certain buttons are used. I've tried to figure out what could be causing this but I just can't see what it could be. I feel I'm so very close to having this completed if it weren't for this one issue.
In the slideshow buttons '1' and '2' work perfectly, however buttons '3' to '6' are not working completely as they should. During the slideshow, as it plays through the slides if you click on button '1' or '2' you are taken to the corresponding slide and then the slideshow automatically resumes, which is correct. However, if you click on any of buttons '3' to '6' you are still taken to the corresponding slide, but the slideshow does not resume and stays on that particular slide. I've looked over the Action Script 3 code several times and I just don't see what could be causing this but I'm not too experienced so there could be some error, no matter how minor, that I am missing.
View 9 Replies
Dec 5, 2007
I followed the xml slide show tutorial here on the site, and wanted to add buttons to it.(I did the autoplay tutorial) I have the buttons working, but the autoplay feature seems not to be agreeing with the buttons whenever I press left or right arrows on the keyboard it goes to it, but then the autoplayer becomes erratic and suddenly goes to various frames at random.I think the problem is that the timer which is set to 3000 miliseconds is not resetting. I was wondering how to reset this variable each time the user presses the left or right arrow.
View 1 Replies
Nov 11, 2004
I am loading an external swf into an empty movie clip by use of a button.The movieclip is a sort of menu that begins with an animation of the menu opening, there are multiple different movieclips I am using with this format.What I am trying to accomplish is this.When another button is pressed, I want the movieclip (regardless of which one is loaded) to either:Go to a specific frame and play a closing animation within the movieclip, BEFORE a new movieclip is loaded. OR reverse the animation BEFORE loading new movieclip.Since there are 4 or 5 buttons all loading different clips, I need all the buttons to work this way regardless of which movieclip is loaded.
View 3 Replies
Feb 23, 2010
I am trying to control my main Scene 1 via a navigation bar within a movie clip.
I am using the following code for each button:
btn_2.addEventListener(MouseEvent.CLICK,btnClickHa ndler);
function btnClickHandler(event:MouseEvent):void{
MovieClip(root).gotoAndPlay("frametwo","Scene 1");
}
If I just put that code in for one button, that one button will work, but once I add another line of code for my next button, the only one that works is the first one, then the rest of them don't do anything.
View 4 Replies
Apr 3, 2010
i have forward/back buttons to control the timeline. what happens in the following code is that if the button is clicked while in the < or > range of frames, it gets buggy. heres the code.
[Code].....
this doesnt seem to go to the exact frame i need if i click while the current sample is still animating in. It would be much better if i could tell flash to a specific frame instead of asking flash to determine a range. that way, if a button is pressed during an animation it wont just advance one frame, it would jump to a specific frame.
I wish i could just do this:
[Code].....
i thought about creating a var that would be a string. i could then add a number to the name of that string each time the button is clicked. then i could make frame labels the name of the string. but i couldnt get my head around it. also, i didnt know how to make the button stop adding to the string name once it reach a certain value (6 in this case). or how to make it play the last sample animation if the user kept clicking the advance button at the end of the samples.
View 1 Replies
Mar 22, 2011
I'm making a section in my production with 4 audio files which are controlled with a play and stop button. I've managed to make the first one work on the page with this code -
Code:
import flash.media.SoundChannel;
var mySoundReq:URLRequest = new URLRequest("audio/track1.mp3");
var mySound:Sound = new Sound();
[Code].....
What would I need to copy to control 3 other files the same way? (i.e "audio/track2.mp3" with play_btn2/stop_btn2). I've tried copying part of the code and changing the instant names but I keep getting errors so I'd rather ask somebody who knows what they're doing.
View 3 Replies
Nov 27, 2003
I am trying to make ThumbNail Highlite via button and MC.
Each of the Thumbnails has a same button with instance named "item" 1 to 40. Also, I have the highlite MC instance named "highlite" 1 to 40 as well
I am able to triggar the "highlite" MC with the following:
=================================
onClipEvent (enterFrame) {
_root.main_nav_mov.item1.onRelease = function() {
_root.main_nav_mov.highlite1.gotoAndPlay("play_lit e");
[Code]....
View 3 Replies
Feb 6, 2009
I have created a presentation which is mostly graphics and voiceover. I have created a few custom buttons to allow the user to pause, start over, etc. (not video). In a few places I am calling to external flv files which have been placed inside movieclips. I want to be use my custom pause button to pause the flv as well, as opposed to using a flv player/controller. I have made several attempts such as:
_on (release) {
_root.myvideo_mc.pause();
}
[Code]....
and trying stop/play instead of pause, etc...all to no avail. the appropriate scripting to control an flv with a custom button?
View 5 Replies
Nov 27, 2003
I am trying to make ThumbNail Highlite via button and MC.Each of the Thumbnails has a same button with instance named "item" 1 to 40.Also, I have the highlite MC instance named "highlite" 1 to 40 as wellI am able to triggar the "highlite" MC with the following:
onClipEvent (enterFrame) {
_root.main_nav_mov.item1.onRelease = function() {
_root.main_nav_mov.highlite1.gotoAndPlay("play_lit e");
[code].....
View 3 Replies
Oct 28, 2009
I'm trying to link all the images in my slideshow to their respective pages in AS2. With the code below:
Code:
stop();
next_btn.onRelease = function() {
if (_root._currentframe == 19) {
[Code].....
it does not work. Do I need separate frames in the action layer or?
LINK to .fla since it's just over the limit.
View 1 Replies
Dec 14, 2005
First off let me say that this forum is a lifesaver. I managed to figure out the links in xml file myself, but I cant seem to get the next/previous buttons working the way I want them to. I have got them to work to the point where they will bring up the next image, this is until it gets to the end of the xml node, then it wont start over from the beginning if I hit next. Here is my code:
[Code]...
View 7 Replies