ActionScript 2.0 :: Changing The Function Of A Button Depending On Previous Button Press?

Mar 14, 2007

I'm loading in 5 jpegs from an external file using "loadMovie" and i have 5 corresponding buttons (1-5) to load them with.

I want to change the jpeg the button loads in depending whether a separate navigation button has been pressed -

i.e.

navigation buttons:

-motorbike pics
-car pics
-lorry pics

If a user clicked on "car pics" then the loading buttons 1 to 5 would load "car1.jpg", "car2.jpg" and so on...

similarly if the user clicked on "lorry pics", the same loading buttons 1 to 5 would load "lorry1.jpg" and "lorry2.jpg"

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Press The Previous Button To Rewind The Timeline, The Movie Clip Does Not Stop?

Aug 5, 2009

I would like to create an image sliding effect using next and previous buttons. For example the sliding images on the homepage here: http:[url]....I know this is not in flash, but that's the effect I'm trying to create using flash.

I followed the help quoted below. However, when I press the Previous button to rewind the timeline, the movie clip does not stop. For example, if I am on image 3 in the slider and press the previous button...instead of going to image 2, it slides all the way back to image 1 without stopping.

Quote:
ActionScript 2:Notice how, in the link to the example, all of the images/slides are the same size. Create a few of those before you begin.

1. Convert each image/slide to it's own Movie Clip, so that you can go always go back and adjust them if needed....as well as other useful reasons.

2. You only need 2 layers for now, Actions & Container. On frame1, add a stop action to the frame on your actions layer. Then, place all of your Movie Clips on the stage, on the Container layer. Line them up horizontally, edge-to-edge. Select them all and convert to a Movie Clip named "container".

3. On the Container layer, Insert A Keyframe > move the Container Movie Clip to the left so that the next slide is now in place on the stage > Right click in between the two Keyframes and choose "Create Motion Tween". You should have the animation from slide 1 to slide 2 now. Repeat this process for 2 -3, 3-4, 4-5 ......(don't worry about the reverse!)

4. We need to create buttons to go to the next and previous slide. Make a new layer called Buttons. Create 2 buttons, one for Next and one for Previous. These can be Movie Clips OR Buttons, just place them on the stage give one an instance name of "next_btn" & "prev_btn" (no quotes) for the other.

5. All that's left is to add some actions to a few frames on the Actions layer.

a) Add a stop action to every frame where the slide will be static (still), you should already have one on the first frame from step 2.

b) Now here's where the magic happens. If we test the movie now, the slides will just play and over. So add this code to the frame 1 on the Actions layer:

Code:
stop();//already have this stop action, just add the below
this.onEnterFrame = function(){[code]....

View 1 Replies

ActionScript 3.0 :: GotoNextpage - Click On A Next Button To Go The The Nextpage And Previous Button To Go Back To The Previous Page?

Mar 18, 2011

Am creating a two page document in flash cs4. Each of these 2 page documents have links to a learning resource on a web server.All I want is for the user to be able to navigate to and fro this two page document. Infact, I want to be able to click on a NEXT button to go the the nextpage and PREVIOUS PAGE button to go back to the previous page.

View 1 Replies

Actionscript :: Changing Shape On Button Press?

Mar 2, 2011

I looked around through pages and pages on google and couldn't find anything somewhat related. I got a lot of help, but I still can't seem to get this part of my ActionScript working. I have a program, that when running, allows me to paint random color squares on mouse click. I added a button, that is supposed to be able to change the shape being painted from rectangle to circle. I can't seem to get that button to work. This is what my code looks like so far.

[Code]...

View 1 Replies

Actionscript 3.0 :: Changing Scenes On Button Press

Mar 22, 2011

im using cs5 and trying to change scene on button press. the code im using is :

[Code]....

it brings up no errors, but does not change the scene.

View 4 Replies

ActionScript 2.0 :: Changing Quality - Press A Certian Button?

Nov 18, 2002

How do I change the quality of my movie when I press a certian button? I know you could just right click and change it, but some mac users have to go a step furthur and they might not know how to do it.

View 1 Replies

Make Next And Previous Button Function?

Jun 17, 2009

how to achieve next and previous button function such as the one at [URL]

View 5 Replies

ActionScript 3.0 :: Next And Previous Function On Button Through Xml?

Dec 6, 2010

here is the code (see below), i want to create a previous and next button on this script, which allows a user to cycle through the xml file ( that contains links to my images).I need a little bit of code in the 'button_mc.onRelease = function()' that makes sure im going to the next picture in my xml filehere is the current code:

// xml object for xml content (defines sources for selections)
var portfolio_xml = new XML();
portfolio_xml.ignoreWhite = true;

[code].....

View 3 Replies

ActionScript 3.0 :: Call A Function And Run It With Specific Properties Depending On Which Button Is Clicked?

Nov 25, 2008

How would I do this in AS3? I want to call a function and run it with specific properties depending on which button is clicked.So how do the "_this" statement work in as3? in as2 I would write something like this and "this" would stand for the instance name:

View 2 Replies

ActionScript 2.0 :: Delay GotoAndStop Function On Button Press?

Apr 15, 2011

I am trying to add a delay function to a btn action in actionscript AS2. I want to delay the gotoAndStop function.I want the attachMovie("glamour", "glamour2", 202); to play in full before the gotoandstop action say for about 3 secondsI want to be able to delay for as long or short as needed?below is the snippet of code for the btn im working with?

Code:
timer=0
btn.onRelease = Delegate.create(this,buttonHandler);

[code]......

View 1 Replies

ActionScript 2.0 :: Stop A Function From Running By The Press Of A Button?

Aug 7, 2003

I want to be able to stop a function from running by the press of a button. Is there such an inbuilt function? Like "stop function(myFunction);" or something..?

View 5 Replies

ActionScript 3.0 :: KeyboardEvent - Function Kdown Never Begins If Press A Button

Feb 10, 2009

I got some problem with this code:

[Code]....

There is a MovieClip with Instance name: ob The problem is that the function kdown never begins if I press a button. trace('CLEAR'); never showes.

View 2 Replies

ActionScript 3.0 :: Change Text Color In Previous Button When Click A New Button?

Mar 11, 2010

If I have say 7 buttons, each containing text that changes color on rollover using the "Up" "Over" and "Down" keyframes in the buttons' timeline.  Is there a simple way to get the button's text to change color when clicked, stay that way, and then change back to the original color once one of the other 6 buttons are clicked?
 
The only thing I can come up with is writing pages of code for each button that changes the color of every other button regardless of whether it was active.

View 13 Replies

ActionScript 3.0 :: Menu - When I Click On The Button , Alpha Return To 1 For The Previous Button?

Jan 12, 2011

i was making asimple menu .

ActionScript Code:
var currentLink:MovieClip = a_mc;
//buttons mode[code]...........

when i click on the button the alpha of this button will be 0.5 , when i click on another button the alpha of the previous button is still 0.5 , and so if i clicked on all buttons the alpha of all buttons will be 0.5,,,i didn't want that , i want when i click on the button , alpha return to 1 for the previous button .

View 5 Replies

Actionscript 2.0 :: Flash MP3 Player - Previous Button And A Volume Scrolling Button?

Apr 18, 2009

I am completely new to this with flash and action script. I checked the Flash MP3 Player tutorial and I wonder how I'm doing a previous button and a volume scrolling button in action script?

View 1 Replies

ActionScript 2.0 :: Next And Previous Button Is Not Back To Previous Loaded Movie

Jun 25, 2004

my program is i can choose several movie to load and the movies are save in an array... For example: i choose movie 1 , 2 and 3. Movie 1 was loaded. After i lick 'next 'button, movie 2 will be show .Beside that,if i click 'previous' button, movie 1 will be show. i facing a problem that my previous button is not back to my previous loaded movie but is trace my choices in arrays backward. The next problem is, my first movie load to the second movie load will be a bit lagging. but the rest 1 is ok.

View 14 Replies

ActionScript 2.0 :: Changing Button Function To Automatic?

Mar 7, 2011

There's a code I'm using,

ActionScript Code:
btnLoad.onRelease=function(){
loadDATA();
}

I want to change it from the function loading on release of the button to just starting straight away without the use of a button, seems simple yet nothing will work,

View 5 Replies

ActionScript 2.0 :: [MX] Changing Button Properties Using One Function

May 30, 2003

I have a mc (menu) with 9 btns:

+ bnt01
+ bnt02
+ bnt03
+ bnt04

[Code]....

For each btn I would have to change set.RGB

creating a function so that I would have to repeat this lines for each btn?

View 14 Replies

ActionScript 2.0 :: Snap - Press Button To Detect The Last Button Pressed And If The Shapes Match

Jan 12, 2009

I want the press button to detect the last button pressed and if the shapes match, make them do something...obviously. I think I'm going at it the wrong way. I need to stick a "triange" id into the button/mc then if compares that and then if there is a match works then... right?

[Code]...

View 1 Replies

ActionScript 2.0 :: Button - Go Only To Previous Scene, Instead Of Going To Previous Frame?

Mar 2, 2006

I have various movies clip within a movie and my back (mc = arr2_mc) and next (mc = arr1_mc) buttons are on the main scene.This is on my main scene on a first frame

ActionScript Code:
movieclip.prototype.playBackwards = function(arg){
if(arguments.length>0) {[code]....

when it goes back, it goes back frame by frame without stopping but I want it to go only to previous Scene. instead of going to previous frame.Do i have to create a unique button? which i did but i didn't work?

View 2 Replies

Professional :: When Press On The Button The Stars Will Be Flying From The Button And The Sound Will Play?

Jan 29, 2011

i'm designing a website in flash8... now i have created some buttons, and i want that when i click on the button stars will fly from them and there will be a sound... i have already created the animation of the stars seperatly and it's in the library, i have also the sound file.... i just can't remember how to put everything together.... when i'll press on the button the stars will be flying from the button and the sound will play?

View 3 Replies

ActionScript 2.0 :: When Press A Button Mc Starts A Countdown But Every Other Press Doesn’t Reset It?

Jan 13, 2009

How can i make it so a when you press a button it starts a countdown but every other press dosent reset it?

View 14 Replies

ActionScript 1/2 :: Rotate On Button Press Or Button Hold 180 Degree

May 14, 2010

here is my code,
 
[Code]....
 
This is running on Enterframe but  I want to ratate 180 degree and on button press and hold button

View 1 Replies

ActionScript 2.0 :: Simulated Button Press Of A Dynamically Created Button

May 29, 2008

i have a set of buttons cranked out from and XML file. how can i emulate, in code, a press on one of those buttons? i'd like to 'press' one of them for an initial state so that the list it controls will load first off instead of waiting for the person to click it manually and THEN show the list it's connected to. thing is, the first loaded list is going to be random, so i need to 'press' what on another day/load would be a button that the user would press themselves.

in other words, i have 3 buttons. on random, i have to 'press', say button 2, to start. users can press 1 or 3 and then 2 again if they like. another time, it's button 1 that gets 'pressed' on load, etc. make sense? i have a sneaking suspicion it might be easy... or stupidly convoluted.

View 5 Replies

ActionScript 2.0 :: Create A Previous Button If Already Have A Next Button?

Dec 3, 2010

This is an image rotator and I'm having trouble creating the previous button. My next buton works just fine but no way I can figure out how to make the previous button. I tried almost everything by duplicating etc ... Here is the class I'm using:

Actionscript Code:
class thumb{ var mcClip, listenerShowAuto, ref, intervalShowAuto, objXmlResult, dataXml, tabInfoToDisplay, tabItemToDisplay, marge, intervalAnim, target, href,

[Code].....

View 2 Replies

ActionScript 2.0 :: Disabled Button When One Of The Button Being Press

Dec 20, 2005

I have 6 button call m1-m6...ok my problem is how to disabled button when one of the button being press...and also stt.text will display crrently selected button...coz currently when I press the button it never stated and also 'stt.text ' also show nothing.

[Code]...

View 10 Replies

ActionScript 2.0 :: Disable Button By On Press Another Button

Dec 1, 2010

I have a button which on press will go to next frame. I want to disable this button by on press another button.[code]

View 2 Replies

ActionScript 2.0 :: Changing The Stop Button To A Pause Button?

Nov 13, 2011

I am basically creating an mp3, I want to change the stop button with a pause button but don't know how to do it.

[Code]...

View 2 Replies

ActionScript 2.0 :: Disable Previous Button In The First Image And The Next Button In The Last Image?

Sep 9, 2007

[URL]how I could disable previous button in the first image and the next button in the last image?

View 7 Replies

ActionScript 3.0 :: Load Different Swf Files Depending On Button?

Apr 13, 2009

im starting to get the hang of 3.0 now.. but i have a little problem loading different swf files related to witch button i click..
 
everything works just fine. when clicking on a button the movie plays and its listening for the end of each video playing.. but i cant get it to load different swfs depending on witch button is clicked. is it possible to do this using the same loader as i do now?
 
heres my code:
 
var compact:String = "axesse_mc.swf";var compactreq:URLRequest = new URLRequest("axesse_mc.swf"); 
var loader:Loader = new Loader();loader.load(compactreq);

[Code].....

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved