2 Actions -- 1 Button
Can one OnRelease command trigger 2 different things to happen?
ie. Load movie and load external swf?
FlashKit > Flash Help > Flash MX
Posted on: 02-14-2003, 04:29 PM
View Complete Forum Thread with Replies
Sponsored Links:
[F8] Rewriting Button Actions To This.on Actions
Evening! I could do with a little help if possible - basically I need to combine a number of different button commands into script for a movieclip button.
I want these actions
PHP Code:
on (rollOver) { // slider - Movie Clip's Instance Name. button_1 - Button's Instance Name. slider.xMove = button_1._x;}on (rollOver) { tellTarget ("_root.PC_Cursor") { gotoAndStop("Finger"); }}on (rollOut) { tellTarget ("_root.PC_Cursor") { gotoAndPlay(1); }}on (release) { if (_root.CENTERpages.clip._currentframe == 10) { _root.CENTERpages.clip.gotoAndPlay(11); }}on (release) { if (_root.world._currentframe == 2) { _root.world.gotoAndPlay(1); }}on (release) { tellTarget ("_root.CENTERpages") { gotoAndStop("name"); }}on (release) { unloadMovieNum(1);}on (release) { if (_root.CENTERpages.A1._currentframe == 1) { _root.CENTERpages.A1.gotoAndPlay(2); }}on (release) { if (_root.CENTERpages.A2._currentframe == 1) { _root.CENTERpages.A2.gotoAndPlay(2); }}on (release) { if (_root.CENTERpages.A3._currentframe == 1) { _root.CENTERpages.A3.gotoAndPlay(2); }}on (release) { if (_root.CENTERpages.A4._currentframe == 1) { _root.CENTERpages.A4.gotoAndPlay(2); }}
to work like this in a movieclip:
PHP Code:
this.onRollover = function() { // slider - Movie Clip's Instance Name. button_1 - Button's Instance Name. slider.xMove = button_1._x;}this.onRollover = function() { tellTarget ("_root.PC_Cursor") { gotoAndStop("Finger"); }this.onRollout = function() { tellTarget ("_root.PC_Cursor") { gotoAndPlay(1); }this.onRelease = function() { if (_root.CENTERpages.clip._currentframe == 10) { _root.CENTERpages.clip.gotoAndPlay(11); }this.onRelease = function() { if (_root.world._currentframe == 2) { _root.world.gotoAndPlay(1); }this.onRelease = function() { tellTarget ("_root.CENTERpages") { gotoAndStop("name"); }this.onRelease = function() { unloadMovieNum(1);}this.onRelease = function() { if (_root.CENTERpages.A1._currentframe == 1) { _root.CENTERpages.A1.gotoAndPlay(2); }this.onRelease = function() { if (_root.CENTERpages.A2._currentframe == 1) { _root.CENTERpages.A2.gotoAndPlay(2); }this.onRelease = function() { if (_root.CENTERpages.A3._currentframe == 1) { _root.CENTERpages.A3.gotoAndPlay(2); }this.onRelease = function() { if (_root.CENTERpages.A4._currentframe == 1) { _root.CENTERpages.A4.gotoAndPlay(2); }
but it doesn't work!!! period! am I supposed to be keeping all of the functions together after I call the action? ie; all of the onrelease functions run on after a single this.onrelease call?
or have I took the wrong approach altogether on this?
Any pointers welcome!
View Replies !
View Related
Button On Top Of A Button... Still Retain The Base Button Actions?
Hi there.... is it possible to still use the rollover / rollout buttons when a underneath another button??
I have been trying to have a slide in menu that basically slides away on rollout, but of course when you have buttons on this slide in menu, this triggers the rollout on the underlying movie or button and makes the menu dissapear.
Is there someway to avoid this or should I be using a different approach? Maybe a hit test on the mouse cursor perhaps?
Appreciate any help in advance,
Scott
View Replies !
View Related
Duplicating A Button And Making Each Button Have Different Actions
I have a movie where I have duplicated the button with a script to duplicate the button and when i put any code on the button that is getting duplicated all the code is all the same on the buttons. I tried the code below but it not working its making all the buttons act the same.
*The examples below and code is simpified of what I have, I hope it help you understand what I'm trying to do.
button1
duplicated button2
duplicated button3
*I want to target a different MC for each one of the
buttons above but I can't seem to do it?
*I tried using something like this but its not working
//----------code for my arrays
buttons=new Array("news","contact","products")
//----------code on the duplicated button
//on button1
on(release){
_root.movieclip1.gotoAndPlay(2)(buttons[0])
}
//on button2
on(release){
_root.movieclip2.gotoAndPlay(2)(buttons[1])
}
//on button3
on(release){
_root.movieclip3.gotoAndPlay(2)(buttons[2])
}
View Replies !
View Related
Button No Actions + Make Button Invisible
Hi all!
So right now I'm working on this website and realized I've been running into some button problems.
First one, why is it that every time I right click on the 'Actions' of the button it either just gives me the action of the current frame I'm in or it says the current selection cannot have any actions?
Secondly, I'm trying to work on a button so that when it is rollover, everything on the flash document is replaced. The problem I'm having is that some layers are on top of the rollover button in the main timeframe and so when the cursor is on the button, some layers are not replaced. How do I fix it so that when the button is rollovered the layers on top of it cannot be seen?
More specifically:
Main Timeframe -> 'Y' Button -> on it's Rollover it has a movie clip -> in the movie clip there is a modified 'X' button that is suppose to overlap the existing 'X' button in the main timeframe
How do I do it? I would really appreciate any help!!!
Thanks!
(PS I am currently using CS3 Professional if that matters)
View Replies !
View Related
Button Actions
Hey,
I'll try and explain this as well as i can!
K, i have a button and when it is clicked i want it to play an MC but when it is clicked again i want it to play a different MC, is this do-able?
L8
View Replies !
View Related
Button Actions
Hi guys,
What am I doing wrong? I select a button instance on the stage, open the actions window, select "Basic Actions" (or any other) and the actions are all grayed out. I've tried it from several different ways, but I can't seem to get past this.
Can anyone help?
Thanks,
Rose
View Replies !
View Related
Button Actions?
Hey !!!
describtion of my problem : OK (Scene1)Insert-> New Symbol -> MovieClip(Name:test1): Make two timelines, in the first any Tweening and in the second a Button (Name:test2)!
back to the Scene1 -> open the library and drag the MovieClip(test1) in the first Frame (FrameAction [Stop])!
Ok right make Scene2 and in the first Frame (FrameAction [Stop]) a simple Button (Name:test3) with the action [on(press)gotoandstop ("Scene1",1)]!!!
My Button test2 in the Scene1 must be change to the Scene2 !! (test2Action ????????????????????????????)
View Replies !
View Related
One Button - Two Actions
Hi,
I am new to actionscript-
I have made a linear animation with back/stop/play buttons -when the movie is stopped I would like the play button to go to the next frame and play but if the movie is already playing the play button should go to the next scene and play.
Is this possible?
Thanks in advance for any help with this one!
Tania
View Replies !
View Related
Two Actions Button
i vanna ask you how to go "fullscreen" and "fullscreen-off" with one button. so i need button with two actions. first - fullscreen/on, and second - fullscreen/off, but if it is possible that button be visible in fullscreen mode.
View Replies !
View Related
Button Actions
Okay, I have a Map of the city I live in. There are 188 listings, all of which I've turned into 188 movie instances. within each instance is button. Now, the listings are divided into four categories: restaurants, bar/venue, services, and shops. the naming convention I've used for each button based on the section it is in, i.e. restbutton1, restbutton2, service1, service2, you get the picture.
When you rollover each button, as it stands right now, on each button I have a roll over action to set alpha to zero, insert dynamic text into a label box on the main template, as well as set the alpha of an arrow pointing to this description to 100.
On rollout, it resets those settings. alpha to button = 100, the arrow goes back to zero, and the dynamic text box goes blank.
Here is the link if you're wondering what the heck i'm talking about. http://www.uga.edu/island
Here's the question: Is there a way to set a standard function of
on (rollOver){
this._alpha=o
downarrow._alpha=100
}
and do the corresponding function for roll out, but set this action up only in the first frame of the movie. instead of changing the actions of each instance 188 times.
View Replies !
View Related
Button Actions
Is it possible to assign more than one action to a button so they are carried out one after the other. Eg Click on a button, it plays a certain frame until the end of the timeline, then when it gets to the end, it loads another movie.
View Replies !
View Related
Help With Button Actions
Hello,
I have asked for help many times on this subject, but still haven't gotten it to work. I have a flash navagation bar for my site. What I want to know how to do is, how to make it so when the mouse scrolls over the button, It will jump to a different scene and play it. So that I can make appearing buttons when the button is scrolled over.
I would appreciate the help.
View Replies !
View Related
Button Actions In MC's -
hi, i had a problem loading a swish swf into a flash movie so i canned that idea . i made a button in a movie clip so it would jazz up the button a bit .. i have a rollOver & rollOut action on the button in the movie clip . i placed this button (actually 4 of them ) on the main timeleine but when i roll over them they go back to a frame in the main timeline and not the frame i want IN the clip ????? does this make sense ?? hope someone can offer a bit of hope this way !!
cheers
View Replies !
View Related
Button Actions
I have a nav bar set up in my movie. The nav bar is a movie symbol that contains 5 buttons. I am trying to link the buttons to frames in the main movie. I edited the nav bar movie and added an action to each button. The code looks like this:
on (release) {
gotoAndStop ("Scene 1", 120);
}
I also tried:
on (release){
_level0.gotoAndPlay ("Scene 1", 120);
}
I published the movie to test it out. When I press the buttons nothing happens.
View Replies !
View Related
On/off Button With Actions
I'd like to create an on/off button with actions within it.
I have no problem creating an on off button that after you click on it turns to off and on after you click off (dunno if that makes sense), but I would like to add actions to that that when they click it on, it makes another movie invisible and when you click it again it will make the movie visible again.
I have the code to make it visible/invisible fine, I have a on/off button but when I add the visibility code into it it won't work, any advise?
View Replies !
View Related
One Button, Two Actions...
I have a button (A) that when pressed, plays one clip displaying something. There are other buttons that when pressed will change what is displayed by (A)... Now, if (A) is currently displaying something and (A) is pressed again, it should play a different clip.
I've tried creating flags with different if cases, but either way, I run into a loop that plays both the first and second clip. I also tried putting the button on another frame and doing a goto if the criteria is satisfied... but no luck.
In short, how would one assign 2 different button mouseEvent behaviours to the same button?
View Replies !
View Related
Actions For A Button
I just started using MX and have difficulty figuring out how to attach an action to a button. I had no problem with 5, it was easy.
I want to go to a specific frame(ie.90) on release.
I use the onRelease(button)and get
<not set yet>.onRelease = function() {
};
Not sure what to do with the <not set yet> object.???##
With Flash 5 I would then get the "goto frame" action, type in frame 90 and it's done.
Could anyone help please?
View Replies !
View Related
2 Actions On A Button
I have a button that should perform 2 actions.
The first action is to start a movie clip (small animation) and then (when the movie clip is over) go to a frame on my main timeline.
The first works perfectly, when I try to include the second code, the movie clip doesn't play anymore !
That should be a simple thread but I'm losing my hair to do it !
Could somebody help me, PLEEEEEEAAAAAAASSSSSSEEEE !
Thanks so much
View Replies !
View Related
2 Actions For 1 Button
this is my situation:
i have a time line say...20 frames
on frame 10 i have a stop function with a few buttons which link to different scenes.
how do you script each button to play the rest of the timeline (i.e to frame 20) then when it reaches frame 20 goto the specified scene.
thanks
View Replies !
View Related
Button Actions
I have a problem with the buttons being used to animate an graphic symbol in a motion tween. The top button plays the clip so that the graphic symbol moves up, when the cursor rolls over the button. Then when the graphic symbol is to be moved back down the button on the bottom is pressed and the graphic moves appropriately. However, when I need to scroll the graphic back up the button on the top seems to be corrupt or doesn't work in the same manner as before.
Please help,
Jean
View Replies !
View Related
Button Actions...HELP
I'm getting a error message:
"Mouse events are permitted only for Button instances"
The problem is, they ARE button instances. Help!
The test file is at: (it's also attached)
http://www.qwurk.com/Equalizer_Test 2
Feel free to email me directly at:
metzdesign@aol.com
Thanks!!!!!
View Replies !
View Related
Button Actions - HELP
Should be an easy one for many.
When a user clicks a button a movie clip called main_mc is played.
However what i want is for the movie main_mc to play on release of the button and then the user to be diverted to a labelled frame within my main scene.
the first part of my code would be -
Code:
on (release) {
gotoAndPlay("main");
}
but how do i then get it to move to a labelled frame?
View Replies !
View Related
Button Actions
Is there a way to make a button play until the end of a scene, then go to another scene without assigning a Go To action to the final frame of the scene?
Thanks for your help.
View Replies !
View Related
Two Actions On One Button?
Action newbie here... What am I doing wrong? I want an "on rollOver"-"goto a frame#" action and a "on press"-"get URL" action on the same button.
Click-picking actions here's what I get:
on (rollOver) {gotoAndPlay(35);
}on (press) {getURL(http://www.nameofsite.com);
}
But the check syntax gives me this error:
Scene=Scene 1, Layer=button 1, Frame=1: Line 3: ')' or ',' expected
}on (press) {getURL(http://www.nameofsite.com);
Thx in advance
Doug
View Replies !
View Related
Button Actions
i am having a bit of a brain fart -- to go to a certain frame within a seperate swf file from a button action (on the root) it is as simple as
on release{
getURL("name.swf", 1);
gotoandPlay("home");
}
or should i use some other actionscript?
View Replies !
View Related
Button Actions
does anyone know of a tutorial or how to make a selector of this type?
http://www.bmwusa.com/
Go to Virtual center and choose a model.
Thanks for any help
Tim
View Replies !
View Related
Button Actions
Hi all... I'm new to this board and quite a newbie when it comes to Flash to or at least actionscripting. However I'm trying to follow the tutorial "How to build the peg puzzle game" and I have one problem. It says to make a button and put that in a movie clip... no problem so far. Then it says to go to the edit stage of the button and assign actions to it. BUT that is impossible for me because all the actions in the actionspanel are grey and "unpressable". What is the problem? hope for help cos' this schoolassignment should've been handed in yesterday
Here is the .fla if that helps
View Replies !
View Related
Button Actions...
I have a button in a movie clip.
The movie clip is in Scene 1.
What actions should I add so that when it is clicked, it will go to and play <frame label
umber> in <scene>???
i know to play it in the current scene i should use:
on (release) {
_root.play();
}
but what if i want to go to another frame number in another scene? what actions whould i use?
thanks in advance.
View Replies !
View Related
Button Actions
Hey everyone, i know all the basics of FLASH MX and i was wondering.. i did all the action for "over" the button and everything like that but i am not sure how to assign an action. i want to make a new animation take place when i click it for my website? could anyone help? thanks alot!
View Replies !
View Related
Button Actions
i have
on (rollOver) {
_root.moviebg2.gotoAndPlay(2);
}
on (rollOut) {
_root.moviebg2.gotoAndPlay(1);
}
applied to my MC.
how do i make the button say "on release send the user to scene2, frame 1 in the main swf" instead of taking the user to just frame 1 of the MC that i am working on
-doug
View Replies !
View Related
Button Actions
hi,
i was wondering if there is a button action that makes it so that when the button is held down something happens, i know there is an action called on press but it only works the moment the button is pressed rather then continue as the button is held, btw im using flash mx
View Replies !
View Related
Button Actions
I have this script in my button action window and it doesn't work:
on (release) {gotoAndPlay("2,1");
The button, when ckicked should jump to scene 2, frame 1.
is it right? why won't it work?
DD
I am using MX
View Replies !
View Related
Button Actions
I've created a little animated button but I don't want the animation to stop when you move the mouse away from the button I want the animation to play out to the end.Can someone tell me how to achieve this?
View Replies !
View Related
Button Actions Help...
Im sorry for posting this question but i havnt been able to find a tutorial or help otherwise on my specific question...
I would really like to create a button when the mouse goes ofer it that it duplicates itslef and the duplicate spreads out form the original position fading out... i kow how to use actions and alpha for this but i do not know how to make a button execute this action...
any help would be much appreciated...
thanks in advance
l3inaryl3urnout
View Replies !
View Related
Button Actions
Okie Dokie... I'm a total flash newbie so bear with me if I do not know what I am talking about....
I have a menu made with of course, different buttons. When I place the mouse over the button, there is an animation, a sound and the process is complete.
When I go to the end of the script, add the
on (release) {
getURL("index.html");
}
the link works but the animation does not execute. I'm thinking this is an icredibly simple fix but I'm missing it...
Thanks much
View Replies !
View Related
Button Actions
HI in making a site, i want to"fade out and in clips whenever I click a button to go some where else on the site. Right now I can make the sections fade in, however i dont know how to make them fade out when a button is pressed, is there some script i can ad to the button's action to accomplish this? If you know what im talking about or have any suggestions please respond. Thanks
View Replies !
View Related
One Button, Two Actions
i want the submenu MC to slide away when pressed and then go to the appropriate frame label.
the submenu has many buttons on it. each button needs to do the same "slide away menu" bit, but then each button has to go to a different frame label.
perhaps i am going at this the wrong way.
can you help me?
View Replies !
View Related
Button Actions
Hi, im new to Flash and i need to make text pop up when i mouse over a button. I have created the button, i just dont know the proper action to use, or whatever. thanks!
View Replies !
View Related
Button Actions
hey there guys, flash newb here. I'm reading the O'Reilly book on Actionscript and there is some mentioning that instead of using:
on (rollover) {
//some button property code here
}
I should open the button (which I made as an instance from the library) and put in some action code in the "over" state. But flash says that I cant put in any actions in there. Any insights? thanks.
View Replies !
View Related
More Actions For 1 Button?
description:
it has to work like this:
if i click on the button in the main menu ,
it will load the film in level 23.
but if i click on another button in the main menu ,
it will jump to the level23 ,frame 21 ,play the current swf,
(of the button before) with the animation
till the end.
then unload it and load the actually swf of the actually button:
is it possible?
button 1 AS:
on(release){
loadMovie("design.swf", 23);
} =(loadnext window code)
and also:
on(release){
_level23.gotoAndPlay(21);
}
button 2 AS example:
on(release){
loadMovie("contact.swf", 23);
}
on(release){
_level23.gotoAndPlay(21);
}
AS FOR LAST FRAME OF LEVEL23:
unloadMovieNum(23);
if somebody else can fit me the AS??
maybe it works somehow with the unloadMovieNum(23); at the last frame of each film in level23 after the outgoing animation...
View Replies !
View Related
Button Actions
Hello,
I just started playing with flash and I have a problem with a button.
How do you attach multiple actions to a button.
I am trying to have a button that on RollOver goes to a frame within the same movie and stops, but then on the rollOut it goes back to the same scene it was in before and then on Release it goes to the another scene and just plays it.
Seems simple but it doesn't work
This is what I have
on (rollOver) {
gotoAndStop("eth");
}
on (rollOut) {
gotoAndStop("end1");
}
on (release) {
gotoAndPlay("scene5", 1);
}
This is attached to the button in frame called eth and also in frame called end1.
What am I doing wrong?
View Replies !
View Related
Button Actions
Ok so I'm trying to make a header flash file which contains 5 buttons, which all open up a different web page. The trick is I also want a small line to move to under the clicked button.
As in this diagram:
HOME NEWS SERVICES WORK CONTACT
and say if work was clicked then the line underneath home would slide over to under work
HOME NEWS SERVICES WORK CONTACT
I've been reading through some tutorials on here and at actionscript.org and have copied some code from there that is supposed to adjust the X value of the line (which is a movie clip btw) over a period of frames.
The big problem (this may seem like a newbie question) is the buttons wont work when I go to test movie?
Even though when I have live preview + enable simple buttons ON, I can click it on the stage to see the over and down states.
I don't know what I'm doing. I've attached the fla file. Anyone willing to fix it up to get the button to work and re-upload it and explain what I'm doing wrong, it would be really appreciated. Thanks
View Replies !
View Related
Button Actions
If a movie is already at the frame I want it at, how can I tell a button not to send the movie to the beginning of the animation when pressed? The button is not inside the movie in question but instead is pointing to it via "_root.movie.gotoAndPlay('enter');"
Thanks,
View Replies !
View Related
|