ActionScript 2.0 :: Button Does Not Carry Out Two Functions?
Apr 26, 2011
i have a button which should generate two different variables, but it only carries out 1 function and not the other. If i put another button calling the second function it just overwrites the mc generated from the first function.
Also, I need the functions to be on the main timeline as i also need to remove the mcs when needed.
View 1 Replies
Similar Posts:
Aug 19, 2009
I've found an example of this [URl] If you click on the mute button at the top, then navigate to another page, the mute button stays clicked. I have a decompiler, and pulled the code out of it. See below:
[Code]...
View 1 Replies
Aug 19, 2009
I've found an example of this [URL] If you click on the mute button at the top, then navigate to another page, the mute button stays clicked. I have a decompiler, and pulled the code out of it. See below:
[Code]...
View 3 Replies
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
Jul 21, 2009
im looking for a way to carry through an affiliate banner tag within a download link with my flash MC. the initial php script is
<a href="http://download.site.com/download.asp?file_name=site.exe&ul=<?php echo $_SESSION['language']; ?>〈=<?php echo $_SESSION['language']; ?>&banner_tag=<?php echo $_SESSION['btag']; ?>"><img src="images/download.gif" width="410" height="89" border="0" alt="Download site" /></a>
I would need to add some variable I guess to the flash?
View 2 Replies
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
Sep 3, 2011
I've been trying to carry out hitTest with the two child.They are namely enemy and weapon. However,it seems not working.I had been attempting to sort it out myself and searched the Internet but I got no idea of how to solve it.
stage.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
function enterFrameHandler(event:Event)
{[code]...........
View 10 Replies
Jul 5, 2010
in my script, when a button is clicked it loads a movie clip from the library onto the stage
but what that movie clip does is supposed to be dependant on what button is being pressed. however that movie clip being loaded onto the stage doesn't seem to recognize or load any of the variables from the stage.
its as if, since the movie clip does not exist when the fla is initially run, the movie clip doesnt recognize previously existing variables.. or doesnt recognize any variables outside of itself
View 6 Replies
Nov 23, 2009
Flash CS3, AS 2.0 so I have an XML file containing the number 72, and this script:
Code:
var imageNumber = new XML();
imageNumber.load("imageNumber.xml");
Then later, this script:
[Code]...
The problem is, the variable doesn't carry into my second bit of code. I can add a button and use trace to display the correct variable in the output box, so I know it's getting into Flash. The problem is that it's not applying itself to the second piece of script. Triple checked that the code with by putting in the number manually and using a normal variable, only when I use the XML file as a variable does it refuse to work. I'm very new to Flash so sorry if I've left any important information out, but can anybody shed some light on this?
View 6 Replies
May 15, 2009
I want a black box to fade out the rest of my site when a user clicks on a section in my portfolio, but I want it to go outside of my stage, for when people have larger screen.
If you click on Web/Interactive on the post it you can see what I mean:
[Code]....
View 11 Replies
Aug 10, 2007
I have a movieclip called MC1 and within that 2 frames each containing movieclips called MC2 and MC3. The user can change between the two movieclips and MC3 has a animation within it. Once MC3 is activated, its animation plays but when the user changes to MC2 and then to MC3, the animation is back at the beginning, I want it to keep going even when the user changes to MC2 so when he switches back, the animation is still carrying on.
So basically, I need to know if there is way to have the movieclip playing even if it is not on stage.
View 2 Replies
Aug 30, 2009
I've made a button that presents a movie clip (a window) on the screen, you can move this window by grabbing the tab on the top of the window. But when you exit this window and open another (duplicate is made), you cannot move the window at all.My guess is that the code is lost when the duplicate is made, can someone tell me how to transfer my code to all my duplicates? For more info, visit I sent this about a year ago, and still havent got a responce.
View 1 Replies
Dec 16, 2003
I know im a pain asking you all questions about c++ but we all know your all good enough to do anything so thought id give it a shot. I'm creating a naughts and crosses game (tic tac toe for you americans!!) for uni and am getting a little stuck! The game runs and a winner can be decided but when the game ends i want it to ask whether another game wants to be played.
Then i want it to carry on as a new game and loop until the players dont want to play again. i've included the source file in notepad form also could anyone tell me how to carry out a check on the array so that once a value has been entered into that co-ordinate (O or X) another value cannot overwrite it???
View 2 Replies
Nov 20, 2003
ive got a c++ program that im writing, its a simple calculator, the way it runs is by the user entering a number then another number, then the operand..what i need to know is how to carry out a check on the two integers so that only a number can be input, if anything else is then the program returns to the "insert first integer" code.
View 1 Replies
Jan 29, 2007
I have a player which I have created with play/pause, rewind,forward buttons, and a progress bar on it. How can I link these buttons to carry out actions on an externally loaded movie?I have searched on the forum and can only find answers for buttons for embedded movies.
View 4 Replies
Apr 26, 2011
i want to make a ball move at a constant speed into a wall and bounce of, initially it should move back but then It should carry on moving towards the wall.
I managed to make it bounce but once it hits the wall it carries on in the opposite direction!
View 4 Replies
Sep 8, 2005
I have a function which contains some code and about half way through calls another function. Only problem is it stops the main function from running so the code following it snt executed. What I want to know is is there anyway to go back into the original function at the point at where I left and carry on executing? I've thought of one solution but its a bit long winded and I just wanted to know if there was a quick and easy method, before anyone asks the code needs to be in its current order.
View 3 Replies
Sep 3, 2009
Let's say I have 3 buttons (movieclips) and, using AS2, I want that when mouse is over a button, that button changes its state, something like
[Code]...
so that the same thing happens for each button when the mouse is rolled over it, by simply calling for each button a function inside which I refer to the button by using "this". And the problem is I cannot (don't know) how to do this in AS3. I mean if I use "this" inside a function, this refers to the main timeline. So is there a possibility to write a function like
[Code]...
View 3 Replies
May 2, 2006
i have to scripts each in a different movieclip, i have
Code:
_root.navigation_n_logo["next_btn"].onRelease = function() {
nextImage();
};
and
Code:
_root.navigation_n_logo["next_btn"].onRelease = function() {
galleryChoice(2);
};
so as you see, I want both functions to execute on the same button but it only does 1. how can i fix this? so that both functions execute on the same button/movieclip
View 4 Replies
Jul 14, 2009
How could I code one button to do this
var showpage:Loader = new Loader();
var url:URLRequest = new URLRequest("fade.swf");
on1.addEventListener(MouseEvent.CLICK, showPage);
[code]....
And the Very Same button when clicked again to do this removeChild(showpage);Pretty much, What I have is a lightswitch, and when you click it, A black Fade appears arounf my FLVplayback.. And I want it, to where you click it again, the Black fade goes away..I can do this with two different buttons.. But was wondering if at all possible with one button.
View 1 Replies
Apr 25, 2011
I have a button which should generate a salt mc and statin mc, but when i put the generating loop on the main timeline and run the function from the button it doesnt work. PS. i need the generating funcion on the maintime line as I need to remove the mc when I click the 'reset' button and also do hittests with the mcs
View 1 Replies
Jun 18, 2009
I can't figure out how to get a button to toggle between to functions?It has to be more simple than an if()...else().. statement right?example:
myBtn_mc.addEventListener(MouseEvent.MOUSE_UP, what goes here?);
/* if the MOUSE_UP event is called and the chalkboard is blank, then write to the chalkboard
else erase the chalkboard */[code].......
View 3 Replies
Aug 30, 2009
This time I am trying to use button functions with in IF statements. However I am having trouble with the if statements regonizing the currentFrame(); or currentFrameLabel();. I want diffrent button functions depending on what frame the playhead is in. But the frames are in diffrent movieclips and what not.The next problem is that I do not full understand the way to do frame paths (IE Root.Movieclip.Movieclip) in AS3. series of tutorials that I could read and follow,
View 12 Replies
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
Oct 31, 2011
I have used the loader script to load an external swf into current project. I have added a button to unload the external file when wanted, and was wondering if you could have multiple functions for that button, so that when you click it to unload it works as a 'home' button as well, and takes the user back to the mainpage again?Might be wise to mention that im kinda new to adobe flash and as3, and not sure if the way i have used to load the external swf was the easiest. Seems like a few have had some issues with this subject before me as well.
View 8 Replies
May 8, 2008
How would I manage to enable a button to perform several operations? I want a button to do the following.
I want it to change colour etc, when it is hovered over, I also want it to activate anther flash file on the page via local connection on release. How do I allow the button to set up different actions? Do I need to make 2 separate invisible buttons? And have action script applied to both of them for the 2 commands? How for example would I be able to extend this so that I can have the button doing several things? Say:
1) On rollover it changes colour
2) On rollover it activates a flash mc on the page
3) On Click it changes colour
4) On release it takes the user to another page
View 2 Replies
Sep 20, 2009
How to add multi functions to a button ?[code]...
and by first_btn I wanna to disable one of the second_btn functions on press .
but the rest of second_btn functions remain work.how to do this ?
View 3 Replies
Jun 8, 2010
I have written two arrays for two separate functions and trying to have a button call both. How is this done properly? The function calls, collection() and left() are conflicting.[code]...
View 1 Replies
Feb 25, 2012
[Code].....
Even though I pressed only one button. The main menu button. PS: The faces are Colon and a P.
View 9 Replies
Feb 5, 2009
I am having trouble with defining buttons I have on a separate frame. I define the buttons in my main class on my first frame fine, I have a mc called buttons and then on frame 1 I have some buttons and on frame 2 I have a button called btspin.
so when I have the following:
buttons.btspin.addEventListener(MouseEvent.CLICK, spinmouseclick);
function spinmouseclick()...
in the class it doesn't work. And that makes complete sense to me.
So what I did instead was keep those functions still there, but I moved the listener into a function that is called once you get to the second frame. The function is called fine but when referencing the button inside that function I have a problem:
function spinmouseout(e:MouseEvent):void {
//Change BT Color
buttons.btspin.buttoncolor.transform.colorTransform = new ColorTransform();
}
when called mc-buttons is on the right frame it gives the error:
TypeError: Error #1010: A term is undefined and has no properties.
at MethodInfo-11()
View 1 Replies