ActionScript 2.0 :: Link Two Key Press Events To One Button?
May 10, 2011
I am looking to have a button respond to both the Page Up button and the right arrow button.Basically we have a slideshow that we want the user to be able to either click on the button itself, hit the right arrow on the keyboard or use a handheld presentation clicker.I know you can't have two on (keyPress) events, but I wasn't sure what the work around for it was. I don't want to get into having multiple buttons with the same code if that is possible.
View 2 Replies
Similar Posts:
Mar 26, 2003
If I have 5 links when you are on link 1 and want to go to link 2 can I make it so when you click link 1 it tells it to play a set animation e.g. Movie1 then load link 2 section. But say you on link 1 and want to go to link 3 can you make it play Movie1 then go to link 3. Basically ever time you press a button it plays a set animation first before it goes to that link.
View 2 Replies
Feb 17, 2008
I've got an XML document that holds the info for a Press section I'm doing for a client. The XML holds the path to a thumbnail, the headline text and a link to the original article. I'm having no problem getting the thumbnails to load in and the headline was a breeze too. Put them both in holders so I could position them later. My trouble comes when I try to pass the link attributes to a button that also gets attached to each press clipping. I can trace out the link array that I create to hold my XML data but when I try to pass it to a getURL function inside a button in the same For loop "i" is never passed.
Code:
var yPos:Number = 0;
var xPos:Number = 0;
var spacer:Number = 6;
var imgPathArr:Array = new Array();
var headlineArr:Array = new Array();
var linkArr:Array = new Array();
[Code] .....
View 7 Replies
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
Mar 13, 2009
There's no problem in my computer at work on this issue. When I press on something that is draggable, it's dragged. When I realease it (or realease it outside), it stops being dragged. But it does happen in my boss' computer! what a coincidence! It happens to be something related to very quick double clicks. Sometimes, the draggable movieclip gets stuck to the mouse movement even if it has been released. Is there something to take control on this? or is it any issue from an old version of the flash plugin?
View 2 Replies
Jan 7, 2007
I've in my flash scene main page and sub pages scattered in different ereas at the scene, but the scene start from main page and that what will show only, now if I clicked any link the scene carry us to the link page in the same scene, and from that page I can press any other link to start moving over the scene to different pages.
View 6 Replies
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
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
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
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
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
Dec 17, 2009
i created my subMenu buttons fine, however i only know how to link them to a picture/url address, my goal is to have the user click the subMenu button and open the image or page right below the menu bar in the "stage" area of flash. I read about IFrames but i'd rather create the whole site in flash .Here is the code for my subMenu...
btn_34th.addEventListener(MouseEvent.CLICK, buttonClickHandler);
function buttonClickHandler(event:MouseEvent):void {
navigateToURL(new URLRequest("images/34th.jpg"));
trace("I'm Clicked!");
Again, this works fine, i just want to have the image take up the "white" space on the stage area, very similar to an IFrame.
View 1 Replies
Sep 10, 2011
I'm trying to make a program for an e-commerce project I'm involved in that will allow our users to listen to sample clips from a given CD. I've listed all the tracks in an array called trackList. Here's the code to play a given track from that array:
function playTrack(event:MouseEvent):void{
switch(event.currentTarget.name){
case "track01":[code]....
The event target that I've bolded is the given movie clip button that the user has clicked; at frame two, the button turns yellow. When the clip is finished, the button should return to frame 1, but I can't get that to happen.
I suspect I need to put the event listener to make the button's color change back on the sound channel (sndChan), but I don't know how I could write that function so that it will apply to which ever button happens to be active.
View 2 Replies
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
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
Feb 16, 2010
I would like to create my page links so when I roll over the text(link) enlarges and then once pressed a swf animation plays.When it stops it automatically directs to the desired page.
View 5 Replies
Jan 3, 2003
Ok when you press link one it olads great! when i press link 2, it plays the closing animation, but not the entire animation, thats the problem.My closing animation is a red square going from one end to another ( for the hell of it).But you see content number two will load b4 the red square gets all the way across!!
View 2 Replies
Mar 26, 2009
I've trawled the web, everyone with different ideas on how to call up a mailto link in AS3. What I'm looking for is this: I have a box, that is coverted to a button symbol given the name 'mailto'I have another layer for the actionscript I have imported 'flash.net.navigateToURL' and 'flash.net.URLRequest'
I know I need to create a function or a variable to link in the already created button. Do I also need to import the MouseEvents?
I created this FLA to get used to CS4 (i was previously using8)Everything works wonderfully, I would just like to know how to use AS3 properly, without having to call defeat and create the FLA again using AS2.
View 4 Replies
Oct 28, 2010
TextFiled is not receiving mouseEvents, coz of the sprite on top:
[Code]...
View 3 Replies
Jan 19, 2012
I know how to make a button and all.. but what do I do to make it go to the next scene?
scene 1: Startsidan
scene 2: Sidan
I made a frontpage and when I click on the picture I want it to go to scene 2, where it enters the inside.
the button is called PortalenKnappen, I want to be able to just press on it and it will go to the "sidan(scene 2)" that's empty at the moment.
what would I have to write? I've tried "portalenKnappen.onPress nextScene("sidan", 1"); but it doesn't work.
View 1 Replies
Jun 12, 2006
I know theres a way to do this.how to press a button with AS[code]...
View 7 Replies
Aug 11, 2009
OK, say I have a button that does something, like go to the next frame, is there anyway to have it play a simple sound located in the library without looping?
View 8 Replies
Apr 28, 2010
How can i do that when you press on a button you will go to another frame of the layer?I am using Macrome6dia Flash Professional 8!
View 1 Replies
Aug 1, 2011
i want the main page to drop off after button press
View 2 Replies
Apr 15, 2010
when i press on Button and hold down i want to increment.[code]
View 6 Replies
May 20, 2010
I'm still struggling with a move from AS2 to AS3 so please be gentle with me I have this code for a submit button used with a log in form and I'd like to allow users to press the enter key as well as clicking the button.
[Code]...
View 5 Replies
Mar 2, 2012
I have a TextArea with undo/redo which is performed via ctrl+z, ctrl+y. My app is a mobile app with no cntrl on the soft keyboard so I want to make an undo and a redo button which simulates the keypresses. How do you simulate keys in Flex?
View 1 Replies
Sep 19, 2010
how can i run a php script when i press a button in flash? i have a php script that save data to database.. and i want to control this script by a button in the flash.. so the data saved only if i press the button in flash.. what function i must use in AS3?
View 1 Replies
Mar 1, 2011
I am developing a application which loads different swf's on press of a button. I am using flash.display.Loader class. This works fine in normal scenario. When the network is slow, and the user clicks on the button several times, it tries to load many swf's. This results in ambiguous results such as showing up a different swf. How do I make sure only one swf is loaded at a time?I found a method Loader.close() which closes the connection, the problem I face with that is how do I know if the load is happening. There is a property connected in URLStream, which I cannot use here since i am using display.Loader.
View 1 Replies
Jul 9, 2005
I'm using a movie clip as a button, and I want actionscript to 'press' this when the site loads. I've searched the forums and have only come across using onPress to do so, but it doesn't work.
Code:
_root.Interface.Sculpture.Button01.onPress();
stop()
[code].....
View 1 Replies