ActionScript 3.0 :: Control Two Functions On One Button Click?

Jan 10, 2009

how I can control two events on one (the same) button click. On click, the first function must jump the user to a particular frame label and at the same time trigger a second function which is a movie clip on that particular frame. I must note that the event listener is attached to an actual Button and not a movie clip.

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Multiple Button Functions - When Click The Button, The Mc Does Not Stop Playing And The Text Does Not Show Up?

Nov 8, 2009

I'm designing an interface for a class, and the buttons that I am using all have multiple functions.For example, when the story button is clicked, I need the mc to stop playing and change to text (in the same window/screen, just no mc playing).  The mc is 31 frames long, but if there's a way to just make it loop continuously until told not to, Currently, my code looks like this:

stop();
story_btn.addEventListener(MouseEvent.CLICK,story);
function story(event:MouseEvent):void { gotoAndStop(32);}credits_btn.addEventListener(MouseEvent.CLICK,credits);[code]...

When I click the button, the mc does not stop playing and the text does not show up. 

View 6 Replies

Flex :: Menu Control - Click A Button And A Menu Is Displayed. Click That Button A Second Time And Hide That Menu?

Jun 20, 2010

Basically, I have a button and on click it displays a menu. I want to click that menu a second time and the menu closes. Currently, every time you click the button, the menu reopens. I pasted the Flex livedoc example below. If you click the button, the menu keeps reopening.Now, I rigged it up by setting a var to open and closed, so when clicking the button it does a check. However, if you click away from the screen, the HIDE event gets dispatched, and the menu closes. This messed up the open close var being set.

How could I make this Flex example below show the menu on button click, and then on a second button click, it closes the menu? Take into affect that if you click away from the menu, it closes it.Also, I played around with the MOUSE_DOWN_OUTSIDE event for the button and set the preventDefault, and the FlexMouseEvent event.cancelable is set to false.Changing to a PopUpMenuButton is not an option. I have to much skinning involved.Here is the Flex example:

<mx:Script>
<![CDATA[
// Import the Menu control.
import mx.controls.Menu;

[code]....

View 1 Replies

ActionScript 3.0 :: 2 CLICK Functions On 1 Button?

Feb 23, 2010

I'm making a menu in flash and I want that when I CLICK the button/movieclip moves up and when I CLICK again it moves down again. I allready did it with MOUSE_OVER and MOUSE_OUT but that gave me problems.
 
Here is the Code:
 
//Eventlistenersmenu_over.buttonMode = true;menu_over.addEventListener(MouseEvent.MOUSE_OVER,onOver,false,0,true);menu_over.addEventListener(MouseEvent.CLICK,onOut,false,0,true);//Functionsfunction onOver(e:MouseEvent):void {menu_over.gotoAndPlay("menu_op");}function onOut(e:MouseEvent):void {menu_over.gotoAndPlay("menu_beneden");}

View 3 Replies

IDE :: Get A Button To Do Two Different Functions With One CLICK Event?

Sep 30, 2009

I have attached a sample fla file of what i am talking about. I am trying to get a button to do two different functions with one CLICK event. depending were you are on the time line a window should open on close when button is clicked. The problem is it dose it once, opens then closes. I would like it to work every time the button is clicked either open or close depending on the state.

View 5 Replies

ActionScript 3.0 :: Button (MovieClip) With Two Click Functions

Aug 9, 2009

I'm almost 100% sure that I have to write an if, else statement for this. Below is the code I have for a button(movieclip) I created. It is suppose to play an animation when you click on it. Then when you click it again it's suppose to play a second animation that will take it back to the original state. What is happening is, it goes straight to the clicked state without playing the animation. However when you click the second time it plays the animation that takes you back to the original state. Am I correct in believing the only way to get the animation to play on both clicks is to use an if, else statement.

function clickPlus(event:MouseEvent):void {btn1.gotoAndPlay("clickOpen"); }btn1.addEventListener(MouseEvent.CLICK, clickPlus);
function clickX(event:MouseEvent):void {btn1.gotoAndPlay("clickClose"); }btn1.addEventListener(MouseEvent.CLICK, clickX);
btn1.removeEventListener(MouseEvent.CLICK, clickPlus);

View 3 Replies

ActionScript 3.0 :: Flash Menu - Two Click Functions On One Button

Feb 23, 2010

I'm making a menu in flash and I want that when I Click the button/movieclip moves up and when I Click again it moves down again. I already did it with MOUSE_OVER and MOUSE_OUT but that gave me problems.

Here is the Code:
Actionscript Code:
//Eventlistenersmenu_over.buttonMode = true;
menu_over.addEventListener(MouseEvent.MOUSE_OVER,onOver,false,0,true);
menu_over.addEventListener(MouseEvent.CLICK,onOut,false,0,true);
//Functionsfunction onOver(e:MouseEvent):void {menu_over.gotoAndPlay("menu_op");
}function onOut(e:MouseEvent):void {menu_over.gotoAndPlay("menu_beneden");
}

View 1 Replies

Control Swf By A Click Of A Button From Other?

Sep 1, 2005

How to control the other sef by a click of a button from other swf?

i wanna create a website with multiple swfs inside a main big swf. and i wanna like, click a button at swf C that moves something at swf G.

View 3 Replies

ActionScript 2.0 :: Click On A Button In A Swf And Control What Stream Is Played Through The Media Player On The Same Asp Page

May 20, 2009

I have 2 swf's and a activex media player on an asp page. I want the buttons on my swf to control what live stream the activex player plays. The stream urls are in a webservice that i connect with one swf then send to the other swf using "localconnection". So when you click on a button on the first swf, it then sends a list of available streams to the other swf, displaying them in their designated dynamic text fields, which are located on top of their corresponding buttons. In my "localconnection" i send both the name and the url from the first swf to the second. Basically I want to know if its possible to click on a button in a swf and control what stream is played through the media player on the same asp page.

View 1 Replies

ActionScript 2.0 :: Functions And Sub-functions - Button Doesn't Work OnRelease?

Jun 17, 2004

I have one function that puts text in a text field and makes a button goto a url onRelease.The code is like this:

Code:
item.onRelease = function() {
myButton.onRelease = function() {
getURL("http://google.com", "_blank");
}
talk = this.txt;
}
the only problem is that the button doesn't work onRelease. i think that it is because there are too many functions there, but at the same time,

View 5 Replies

ActionScript 1/2 :: Click A Button On 2 Different Ways Shift Click Or Ctrl Click?

May 12, 2010

Lets say i have a button on frame 1. And if you press it normal, you ll get to frame 2. But then if you click it on another way, you ll get to frame 3. How do i do that easy?! With another way i mean like shift click or ctrl click or is it an easier way?

View 3 Replies

PHP :: Flash MP3 Player With Control Functions For Website?

Mar 6, 2011

I am building a php-based website. I want when the main page loads, then play a random song from a folder of songs. there should be a play, pause, stop control for the song. a flash player would do that. But I cannot find a suitable one.

View 3 Replies

ActionScript 2.0 :: Use Functions To Disable And Re-enable Container SWF's Control?

Aug 10, 2009

I supplied a flash ad to a digital publication, the magazine ones where the pages flip. My ad has different pages you can view when you hover over the top tabs. On each of these pages are words or buttons that you can click on to direct you to a URL. I used the simple code (Actionscript 1.0, Macromedia Flash MX) below to achieve this:

PHP Code:

on(release){
getURL("www.link.com","_blank");
}

[Code].....

View 4 Replies

ActionScript 3.0 :: Cancelling Functions - Control Bar Doesn't Reposition When In Full Screen

Aug 28, 2009

I'm working on a video player with full screen capabilities. I have the control bar set to tween in and out of the video screen with a mouse event. I'm also trying to position the control bar at the bottom of the screen when it's in full screen mode. My problem is that the control bar doesn't reposition when in full screen because of the tween functions. I'm thinking that whatever solution comes up that I might go in the if statement of the full screen code.

[Code]...

View 8 Replies

ActionScript 2.0 :: Calling Multiple Functions From A Click Cs2

May 20, 2009

Is it not possible to call more than one function at a time?, this is my problem:-

btn.onRelease = function()
{
blah();
something();
jump();
}

When I run something like the one above, jump is executed but everything else is ignored, would really like to run all functions at the same time.

View 6 Replies

Actionscript 3.0 :: SWFAddress - CLICK Functions Firing Twice?

Sep 21, 2009

Has anyone noticed that if you go from one page to another the new selected navigational item's CLICK function fires twice? Put a trace into each CLICK function to see this happening. This is because the CLICK function is being called by the button and the SWFAddressEvent.CHANGE too.

View 1 Replies

Professional :: Interactive Slideshow With Hover And Click Functions

Mar 22, 2011

I am a multimedia student and I want to create an interactive slide show to put in the Portfolio section of my web site. How would I do that? Would it be easier to do in Dreamweaver CS5 or create in After effects then import in Dreamweaver? I have never done slideshows. What I want; is a slide show of my work to scroll on the screen, when the person hovers their mouse over the picture from left to right, the slideshow moves, when you click on a specific image, you are able to see the image in a bigger size.

View 1 Replies

ActionScript 3.0 :: Launch Two Functions With One Mouse Event CLICK?

Aug 12, 2009

Is it possible to launch two functions with one mouse event CLICK?

if so, what is the syntax?

View 11 Replies

ActionScript 3.0 :: Click On The First Button Loads Ok But When Click On Second Still Showing The First Movie Clip In The Back

Dec 14, 2011

I have read all threads and can not find a solution but i am not somebody with a lots of knowledge about actionscript so here is my problem i am using this script .

[code]....

the problem is that when i click on the first button loads ok but when click on second still showing the first movie clip in the back ,,,,, i have try everything without luck ,,,, i guess i need to keep reading but will like to find an answer to this situation ,

View 3 Replies

Actionscript 3.0 :: If Function - When Click On The Button Takes To Another Page Without Showing The Click Animation

Sep 11, 2010

I created a movieclip animation that only activates when i rollover the movieclip button. I further extended the frames and created another frame animation that i active only when user clicks the button. So i have a roll over/out animation and click animation in the same movieclip in the same layer. Now the problem is that when i click on the button, its supposed to take me to another page, and it does, unfortunately without the click animation. That means after i click on the button its supposed to first finish the click animation and then go to another page. But when i click, it takes me to another page without showing the click animation

SO I tried the If function, but i seem to make a mistake somewhere and i dont know what to do. Now there is no error in script, but onw there is a problem in link, the button finishes the click animation but it does not go to the tarrgeted"about" frame. here's the code

[Code]...

View 1 Replies

ActionScript 2.0 :: CS3 Movieclip Button - Click To Play, Click To Stop?

Jun 21, 2010

I am building a flash interface and I would like a menu where it is hidden to begin with (just a tab). You click the tab to expand it, and click again to collapse it. I've made a movieclip with animation of the menu opening up and closing, but I can't seem to work out how I'd go about making the movieclip open and close properly.

View 4 Replies

Actionscript 2.0 :: Counter Click Button That Can Storage Every Click On A Txt File?

May 18, 2011

I need a counter click button that can storage every click on a txt file or something..

View 1 Replies

ActionScript 2.0 :: Click To Activate And Use Control

Nov 10, 2009

I have created swf file, with buttons, actionscrip version 8.whet I open my file in internet explorer browser, it works correctly, but when i open it in opera browser, I need to click on my flash animation to activate the controls, buttonsHow can I resolve that problem?

View 3 Replies

ActionScript 1/2 :: Click Button To Play And Click To Reverse?

Nov 12, 2009

I have a test button i would like to have play a movie where a graphic expands. Once stopped, I would like to be able to click that same button and have the graphic go backwards. I would prefer to have timeline reverse, rather than lengthen the timeline of the mc because then i have to line up the start and end, and if one changes, i have to remember to change the other.

btn_test.onRelease = function(){  if (_root.adinstance._currentframe != 1) {  while(_root.adinstance._currentframe != 1) {  _root.adinstance.prevFrame();  else {    _root.adinstance.play();  }}

[code].....

View 3 Replies

ActionScript 3.0 :: Click On The Red Button And Click Back And Previous?

Jul 26, 2010

I am trying to work out this issue in as3 and I'm sure its simple but can't seem to get my head around it. If anyone can see a sollution I would be very happy to hear from you. [URL]..If you click on the red button and click back and previous you will notice that the speed it goes back when you click previous is much slower the further through the slides you go?

[Code]...

This is a simplified version on the code, I'm sure its in this chunk somewhere.

View 4 Replies

Data Integration :: Click To Activate And Use This Control?

May 6, 2006

Click to Activate and Use this Control. upgrade to Studio 8 has been rendered anemic by the requirements of "more security" by Microsoft and others. Now Flash has an error message and you have to click the little sucker to get it to work. Someone dropped the ball BIG TIME on this one. Surely there is a fix for this for a non-programmer such as myself. I thought I was just stupid until I went on Taco Bell's [URL]..

View 1 Replies

Professional :: Click To Activate And Use Control Message In IE?

Oct 11, 2010

I have this message popping up only on the IE "Click To Activate and Use this control message". I googled it and there are a few solutions but somehow they did not really work for me. Is really that complicated to get a fix on that message. Does anyone have a good working solution?

View 1 Replies

ActionScript 3.0 :: Frame Control On Mouseover/click?

May 19, 2009

I've been brought in at the last minute to finish off someone elses code on a project and having some trouble getting something to work....The following is from an AS3 applet which slides 4 panels, populated with photos & links from the CMS. I need the timer to pause & reset when I rollover the tab that is open at the time. I onlny have a couplle hours to figure this out!

Code:
var tempo:Timer = new Timer(7000);
tempo.addEventListener(TimerEvent.TIMER, nextTAB);

[code].....

View 3 Replies

ActionScript 3.0 :: Click And Drag To Control Frame Advance?

Jun 16, 2011

I have a layer that contains a movie clip, instance name wwr_mc, which has nineteen frames. I have figured out how to script a roll-over function to continously move from one frame to another by rolling over the prev, or next buttons, using this code:

wwr_mc.gotoAndStop(10);
var t:Timer=new Timer(250,0);var dir:int;
t.addEventListener(TimerEvent.TIMER,onNextFrame);[code]...............

This type of navigation, while functional, is not really codusive to what I'm trying to accomplish. I would like to be able to click and drag the mouse and have the frames advance forward or backward depending on the direction of the mouse movement.I tried using the MOUSE_Move event with very limited success.

View 5 Replies

ActionScript 2.0 :: Setup A Click And Drag To Control A Movie Symbol?

Jul 21, 2011

Basically what I have is a 31 frame, frame-by-frame animation that plays(no stop() command at all currently) in a continuous loop on one "page" of a flash presentation. What I need to be able to do is set it up in actionscript 2.0 so that when a viewer has his mouse over the movie symbol and then clicks and drags to the right, the movie plays forward, click and drag to the left and it plays in reverse, and on release stops on the frame it is currently on.

I need it set up so that if someone is dragging it to the right and reverses direction, the frames are played in reverse from that point (frame) and vice versa and releasing the mouse button stops the movie on that frame: e.g. if the viewer is dragging right up to frame 20 then starts dragging to the left the animation will play backwards from frame 20 to frame 1 so long as the mouse button is held down) I can't use playback buttons, I have to set this up this way for a specific reason for a work project. I'm not even sure if I explained it correctly If I can set this up on the frame the symbol is nested in, fine. If it has to be done within the symbols' animation, fine. Doesn't matter really, the end result is what counts.

View 3 Replies







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