Button's Not Working
This is the code I'm using:antecedentes.addEventListener(MouseEvent.CLICK,GoToantecedentes3);function GoToantecedentes3(e:Event):void {gotoAndStop(7);}antecedentes.addEventListener(MouseEvent.MOUSE_OVER,GoToantecedentes);function GoToantecedentes(e:Event):void {gotoAndStop(2);}antecedentes.addEventListener(MouseEvent.MOUSE_OUT,GoToantecedentes2);function GoToantecedentes2(e:Event):void {gotoAndStop(1);}Over and out's working, but CLICK isn't taking me to Frame 7. Does anyone know why not?
Adobe > ActionScript 3
Posted on: 10/24/2008 05:40:27 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
AS 2 Button Not Working Not Working Properly
I've got a problem with a button dynamically attached to an mc within an as 2 class script. This is the button code:
ActionScript Code:
this.mc.butt.onRelease = function(){
current=true;
this._parent.checkFocus();
}
this code is inside the class constructor while current is declared at the start of the class and set to false previously in the constructor. The mc is the movieclip attached to the class and butt is the button attached to that. checkFocus is called ok but i'm confused how cos the "this._parent" should reference the "mc" movieclip but this has not got a checkFocus method on it. If i use "this._parent._parent" however, which should be correct, it does not work. I don't know what's up there. Anyway, checkFocus is here:
ActionScript Code:
public function checkFocus(){
for(var mcname:String in _root){
if(_root[mcname] instanceof Layer){
if(_root[mcname].focus==true){
//_root[mcname].gainFocus(20);
_root[mcname].loseFocus(20);
} else {
if(_root[mcname].current==true){
trace("waaahhhhh");
_root[mcname].gainFocus(20);
}
}
}
}
}
the aim of this code is to unfocus the Layer object (this is the name of the class) currently in focus, denoted by its focus attribute being true, and focus the new Layer object that has been clicked on - denoted by its current attribute being true. The currently focused layer is unfocused ok, but the new layer is not focused because, it seems, the change in the current attribute has not happened - there is no waaaaaahhhh coming up! I think this is because i am not reference it properly from within the button event. How can i reference properly from within the button? I've tried using _target and targetPath() but i'm not getting anywhere. I'm pretty sure this is the problem cos things work fine when i declare button events from outside the class, inside the fla. But i'd much rather do things dynamically within the calss if possible. Anyone got any ideas? I've been staring tooooo long at this.
Mute Button Not Working For Button Rollover Sounds
I got my code for a mute button from the flashkit FAQ on sound,
and it seems to be muting everything but my rollovers. Anyone have any ideas?
it mutes the sound in all levels except for the buttons in _level0
and the button itself is in _level0 ?
code: // on main timeline
globalvolume = new Sound(); // no associated movie clip.
//button to mute sound and change toggle mc frames
on(release){
if(_root.globalvolume.getVolume() > 0){
_root.globalvolume.setVolume(0); // mutes all sound
play(); //switch to mute frame
} else {
_root.globalvolume.setVolume(100); // unmutes all sound
play(); //switch to unmute frame
}
}
thanks in advance for any input
Actionscript1 Question. Button In A Mc In A Button. AS Not Working
actionscript1 question. button in a mc in a button. AS not working!
I have a button in a movieclip that tells the movieclip to do some animation, like fading in and stuff. However, I put that movieclip with a button into a button so that I could add a on release get url, and that actionscript wont work..
I can only guess the other button is what is causing the problems.
Any way to fix that?
Also, the reason for turning the movieclip with a button into a new button symbol is so that I can reuse the button and give each one a different getUrl function..
-Line
Button Issues: Button Inside MC Not Working
Hey guys...
I am having an issue with a button nested within a movie clip not responding to mouse events.
FILES--------------------------------------
SWF: http://dev.emeraldcoast.com/seatownp.../flashMap.html
FLA: http://dev.emeraldcoast.com/seatownp...flashMap_5.fla
---------------------------------------------
The movie is a map viewer, I have some locations on the map that i want to display some info about in a "thought bubble" MC when the user mouses over an icon- in this case an airport icon for test purposes. I have my icon(button) placed inside the map(MC) which is masked on the main timeline. At runtime, the icon(button) will not respond and thus will not move the "thought bubble" MC and display the info.
The same buttons on the main timeline work perfectly. So, i assume it's something to do with the way flash propogates button events or something.
Code on main timeline:
ActionScript Code:
//moves Info Bubble to mouse location
function moveBubble() {
setProperty("bubble",_visible, "1");
var x = (_xmouse - bubble._x) * .3;
var y = (_ymouse - bubble._y) * .3;
if (Math.abs(x) < 1 && Math.abs(y) < 1) {
bubble._x += (_xmouse - bubble._x);
bubble._y += (_ymouse - bubble._y);
anchor.x = _xmouse;;
anchor.y = _ymouse;
} else {
bubble._x += x;
bubble._y += y;
anchor.x += x;
anchor.y += y;
}
}
Code on Icon(button)
ActionScript Code:
on (rollOver) {
anchor = {x: this._xmouse, y: this._ymouse};
this.onEnterFrame = _root.moveBubble;
_root.bubble.TL = "Pensacola Regional Airport";
_root.bubble.description = "6255 Airport Road Pensacola, FL 33654";
}
on (rollOut) {
this.onEnterFrame = null;
setProperty("_root.bubble", _visible, "0");
}
I really need to get this thing working. Deadline coming up!
Thanks in advance for your help!
MC Button Inside MC Button Not Working?
I made a MC button that slides out to view 4 more MC buttons that are inside of it. The problem is the MC buttons inside of the MC will not respond to their rollOver actions. Here is the actionscript:
Main MC button: (works)
on (rollOver){
tellTarget(_root.music){
gotoAndPlay("rollover")
}
}
on (rollOut){
tellTarget(_root.music){
gotoAndPlay("rollout")
}
}
Embeded MC buttons: (don't work)
on (rollOver){
tellTarget(_root.musicMC.forwardButton){
gotoAndPlay("go")
}
}
on (rollOut){
tellTarget(_root.musicMC.forwardButton){
gotoAndPlay("stop")
}
}
Can someone please help me?
Button Property Working For 1 Button, But Not The Other Two...
I have a keyframe waiting for user input.
I have 3 buttons on this frame:
ManualEnrollment
DemoCardButton
DemoDLButton
I call this first thing under that frame:
setProperty(ManualEnrollment, _visible, 0);
setProperty(DemoCardButton, _visible, 0);
setProperty(DemoDLButton, _visible, 0);
ManualEnrollment - is now invisible
DemoCardButton - still visible
DemoDLButton - still visible
WHAT THE
I have gone back, went into properties, copied the name and pasted it to make sure I didn't misspell something, it's not misspelled.
What am I missing?
Button Over And Down Not Working
Hey, again..
I've got a broblem in one of my scenes. When previewing the movie, and on that scene, you get the 'button' mouse pointer, but the 'over' and 'down' aren't working. I works when the 'simple button commands' attribute is set in Flash, though.
..Any ideas?
Plz Help Me Get This Button Working
http://www.pflug.com/paradoxdesigns/...mg/index2.html
to get the music to play at the beginning i used this code in the action layer:
Code:
soundtrack = new Sound();
soundtrack.attachSound("sound");
soundtrack.start(0,999);
soundtrack.setVolume("50");
and then for the off button i used
Code:
on(release){
stopAllSounds();
}
and for the on button i used
Code:
on(release){
soundtrack.start(0,999);
soundtrack.setVolume("50");
}
but the thing is, when u turn the sound off and then on again, the volume goes back to 100%. i cant get the sound to stay at 50%. is there a way i can make all sounds 50% or something?
Button In MC Not Working
I really can't understand this.
I have A MC on my timeline. Inside the mc, I have a button inside the MC
The script for the button is:-
on (release) {
gotoAndStop(2);
}
I expected to press the button and have the MC move to Frame 2 and stop, but it doesn't.
Any ideas
Help Button In MC Not Working :·(
Here is the hierachy:
In the FLA the scene is called "Tour".
On the main timeline (around frame 130) is a group of items - one of the items is a movie clip called "restart_tour".
In that MC is a button that should send the playhead to frame label "Restart" on the main timeline of the "Tour" scene. It doesn't. Do I need to include the scene name in the code, too?
on (release) {
root.gotoAndPlay("Restart");
}
Probably a simple thing, but I've spent quite a while trying different configurations.
Hope someone can help.
Thanks, Kenny
Button Not Working
button not working.. probably something stupid.. please check fla.. on click its just supposed to go to frame 2 and play to frame 15
Button Not Working
I have flash MX 2004 and i cannot get the button to work i have already tried onRelease gotoAndPlay(10); but it is not working please help
Button Not Working
Thank you for the help in advance.....
I am loading an external swf. into my main movie. I have a button located within my external swf that is no longer working. I think that it has something to do with the _root, but I am not sure how to get it to do what I want. When I press the button, it should play another movie clip within the external swf.
My code on the button right now is:
on (release) {
_root.Body_mc.attachMovie("Text3a_mc", "myText3a_mc", 1);
removeMovieClip(myText12_mc);
}
I think my problem is that root is calling the main timeline now. How do I get it to call the main timeline of the external swf.??? I hope this makes sense.
Button Not Working.
I am trying to create a game in which you click buttons to increase your score. So far however, it is not working. I have the dynamic text for the scoreboard correct I believe, but the button will not work.
code: on (release) {
_root.score = _root.score=+100;
}
Can someone please tell me what I am doing wrong? Thank you.
My Button Isn't Working, Help
hi i'm using flash mx pro and my main link (to enter the site..) isn't working... it works in the preview and in the swf but it doesn't work when it's on the web. please help! the actionscript i have attached to the button is:
on (release) {
play()
}
(there is a stop action on the same frame as the button because it is the first frame of the movie)...
and then i have a movieclip file which i have set to load and play once the cursor reaches that frame... and it works in flash but not when its published. the site is: www.kharlla.com
hope someone can help me!
thanks!
kira
Button Not Working
hi,
ive got a button for my game called SOUND and when u click on it it goes to a frame with two buttons on and off. the ON button is in a big bold font meaning it is currently on, and the OFF button is not.
the off button has an action script saying
on (release) {
gotoAndStop (5);
}
but it does all the up, over, down stuff but it dosaent link to the frame
any help would be greatly appreciated
Button Not Working
seems like
on (release) {
getURL("http://www.paulburkeinman.com/still.htm", "_self");
}
is correct when i checked other people's posts, but it is not working...
i am attaching an image to show you the screen shot of the file in flash. this code is applied to layer 12 and it shows the image is a button symbol.
what am i doing wrong? when i click on the swf file at the end, it does not go to the url i specified, or anywhere.
Button Is Not Working
hi. I thought i would start easy and make a designa car game but i got stuck.
I have a MC that when you click takes you to the 2nd frame and that works fine then there are buttons and they have this code:
on (release) {
_root.bumper.gotoAndStop (2);}
but the MC bumper does not goto the 2nd frame. Have you an ideas to help me? thank you in advance
Button Not Working
Trying to get an embeded button in a movie clip to affect the movement of another movie clip by going to a frame label..
i'm prob just having a blonde moment but I can't for the life of me get it to work ..
Code:
_root.controlA_mc.nordic_move1_btn.onRelease = function(){
main_mc.gotoAndPlay('move1');
trace("hit");
};
_root.controlA_mc.nordic_move2_btn.onRelease = function(){
main_mc.gotoAndPlay('move1');
trace("hit");
};
Any help would be most helpful...
Andy
Button Not Working
i made a button and im sure its a button and i cant get it to work, even though ive gotten other buttons to work. here is the code:
on (release) {
//Goto Webpage Behavior
getURL("http://www.macromedia.com","_self");
//End Behavior
}
Button Not Working
I have created a button that when moused over changes color. When I enable live preview and simple button actions with the flash window, it works. But when I test it, it just stays one color. Does anyone know why this could be? Thanks!
[F8] Button Not Working?
For some reason, a button of mine that is on a seperate layer won't work. I turned it into a button, and added this code to it-
on(press){
gotoandStop(60);
}
When I roll-over the button, the cursor changes into a hand, as if it's a button, but when I click it, nothing happens.
Thanks in advance to any help. =]
[F8] Button Not Working
Hi Ive got another problem with this site the problem being the buttons left aligned don't go where there supposed to can any one help??
Ive attached the fla.
Thanks
[CS3] Button Not Working
Hello, Im stuck
Im loading an external swf via an empty movie clip and the button inside the external swf isnt working. When I come to test the swf it works however when I use the empty movie clip it doesnt. im using simple code to call the button:
Code:
adobe_btn.onRelease = function(){
getURL("http://www.adobe.com/products/flash", "_blank");
};
shaduuuuuuup foooooooooooollllll
Not All Of Button Working
I have a button component (made from an image) and only the right half of the button works. Meaning that only the one side actually has a mouse over and can be clicked. Anyone else ever seen this before.
Thanks in advance.
Button Not Working
I have a movieclip called Menu.
Inside menu is 4 things, 3 buttons(which work fine) and the fourth thing I have tried a million things to get to work but it won't.
What I need is a button that changes when clicked. I tried a movieclip inside a button, I tried just a movie clip, no button, I resorted to making 2 buttons and putting them on a movie clip in different frames, but nothing worked.
What is going on?
[CS3] Button Not Working
hi, I have created a button symbol with an actionscript linking to an external URL. I have tested the button with "test movie" and it works fine. However, when I try it within a browser with the HTML, the button doesn't link to the URL. I'm stuck.. any ideas?
Button Not Working
Ive been having troubles with a button I made. It doesnt seem to work.
To test this button, created a new .fla with nothing in it at all. All it has is the one button (its an object of the button type). There is only one frame in the timeline, and one layer.
I attached the following script to the button:
on(release) {
trace("this is "+this);
}
when I play the movie, and click on the button, nothing happens. Does anybody have an idea of why this may be? Should I be attaching the script to a different place?
F5 Button Not Working
A couple days ago I noticed that the f5 button was not adding keyframes to my timeline. Is there a way to toggle the fkeys. Hopeing I accidently turned it off and this is a easy fix.
setup
Mac OSX, Flash 8 Pro
Button Not Working
Buttons have been one of the most simple things for me to learn and use but I have one that is just not working. The code I put in is attached to the button while most of my other actions are attached to frames. There are two buttons on the stage at any one time, one that goes to next frame (which works just fine), and one that takes the sends the movie clip back to a certain frame. Why would this possibly not be working? Below is a sample of the two attempts I have made at experimenting with the code:
on(release){
gotoAndPlay(20);
}
and
on(release){
_root.gotoAndPlay(20);
}
Only One Button Working
Hi i am making a simple menu of two buttons for a startpage, my event listener and handler code is below.
package {
import flash.events.*;
import flash.display.*;
public class homemenu extends MovieClip {
public function homemenu() {
but2.addEventListener(MouseEvent.CLICK,navigationC licked);
but1.addEventListener(MouseEvent.CLICK,navigationC licked);
}
private function navigationClicked(Event:MouseEvent):void {
var frmLabel:String='';
switch (Event.target) {
case but1 :
frmLabel="GALLERY";
break;
case but2 :
frmLabel="Bio_Frm";
break;
}
MovieClip(root).gotoFrame(frmLabel);
}
}
}
For some reason only but2 is working and linking to the correct section.
but1 just goes to the first frame no matter where i direct it. It all compiles correctly so all my instance names are correct. Anyone got a solution because this has really got me stumped!!
//// Hi i found a workaround for this time seeing as this first menu only has two buttons i simply didn't use the switch and instead renamed my navigationclicked to 1 and 2 and make seperate functions. Still any solution as to why the switch case but1 wasn't working when but2 was would still be much appreciated!//////
Button Not Working
Hi there-
Ok, as a disclaimer i am teaching myself flash right now although i do have a good curve in that i am familiar with a lot of other design programs.
I am creating a movie- and i created a continue button that the user will click to well, continue onto the next part of the movie. I've used scriptassist to come up with the following code:
on (release) {
gotoAndPlay(101);
}
In the stage if enable simple buttons is on, the button works but if i test the movie or publish it the mouse doesn't recognize the word 'continue' as a button.
i am at a loss so any help would be appreciated!
thanks
sara
Button Not Working
I've got a flipper book (which I've saved as FlashPlayer 6) that on the very last page has a button that returns it to the first page. This is great and works fine on its own. I have the book open inside another swf files which is when it doesn't work. The code for the button is:
on(release) {
_root.gotoPage(1,true);
}
and the swf file for the book is loaded into the other file using:
loadMovie("portfolio.swf", this.book_mc);
I'd be grateful if anybody could help please as it's really bugging me trying to solve this.
Thanks
Button Not Working
I have a flash page entering into the welcome page of Dreamweaver.
In flash I have a button Enter Site, my script is
on (release) {
getURL("
Button In MC Not Working
Hi - I have a movie clip that holds the buttons for the subsections of the top naviagation items. For example rolling over the "General" button on the top navigation shows the subsections on another navigation bar below.
For some reason clicking on a button in the subsection MC has no effect.
However if I start a new document and drag my subsection MC on to it it works as expected.
Does anyone have any ideas?
lux
Button Isn't Working
Good day ...
My buttons are suddenly publishing as selectable text ... with no button action. Troubleshooting tips please!
Thanks, Jeff
Button Not Working Please Help
Please check my button tell me why it won't work. its not the script, its just that it doesn't even push the button. it just stays there even though ive edited each stage, up down over hit.
actualy it won't even run the script, well the places ive tried it it doesn't run the script.
Button Not Working
I used the Login Using Flash tutorial on Kirupa (http://www.kirupa.com/developer/acti...entication.htm) successfully, and am now working on the "secret" stuff. In the second frame, where everything after a user logs in is kept, I want a button that will go to another scene and play the content there. I put the button on the second frame, and gave it this code: on(release){ gotoAndPlay("Scene 2", 1); } and tested it out. Whenever I click the button, it loads the correct scene and plays it for a fraction of a second and then goes back to the scene it was at. So, it's playing it, but not staying there. I've even tried gotoAndStop, putting a stop code on "Scene 2", 1 and more. It doesn't work. But...I put the same button with the code on Scene One, where users are supposed to log in, and tested it out. It went and played fine. So, for some reason it's NOT working on Frame 2, but is working on the first frame just fine. Can someone help me out here? I'm about ready to pull all my hair out. Thanks loads!
Button Not Working
all this resides on frame 2 of the root timeline.
Code:
stop ();
//create new array named rules
var rules:Array = new Array();
rules [0] = "Hello and welcome";
rules [1] = "This is a test array";
//tells storybox.txt to display first item in array
rules_mc.storyBox_mc.storyBox_txt.text = rules[0];
//sets event listener for button
rules_mc.storyBox_mc.nextBtn_mc.addEventListener (MouseEvent.CLICK, nextStatment);
rules_mc.storyBox_mc.nextBtn_mc.buttonMode = true;
//function for event listener
function nextStatment (event:MouseEvent):void
{
var index:Number = 0;
//holds lenght of rules array
var arrayLen:Number = rules.length;
//increase index value on click
index++;
rules_mc.storyBox_mc.storyBox_txt.text = rules[index];
//shows the current indes of the rules array in text field
if (index == rules.length)
{
// if the index number is the same as the array length go to next frame on root imeline.
gotoAndPlay ("setup");
}
}
my problem is that when i click my button the array length and the index number are never the same so it will never go to the next frame any way i can get around this little predicament?
Button In MC Not Working
Hi - I have a movie clip that holds the buttons for the subsections of the top naviagation items. For example rolling over the "General" button on the top navigation shows the subsections on another navigation bar below.
For some reason clicking on a button in the subsection MC has no effect.
However if I start a new document and drag my subsection MC on to it it works as expected.
Does anyone have any ideas?
lux
Button Isn't Working
Good day ...
My buttons are suddenly publishing as selectable text ... with no button action. Troubleshooting tips please!
Thanks, Jeff
Button Not Working
the first button on frame 39 of my quiz wont work, i've tried a few things like reseting the counter and correct variables but it made the button unclickable for some reason, i dont quite know whats going on, any chance anyone could have a look.
url
www.ats-heritage.co.uk/div/Quiz_VB.swf
www.ats-heritage.co.uk/div/Quiz_VB.fla
cheers, i'm really stuck on this
Button Not Working
I have knocked together two fla files from Flashkit into one to make a joint contact and tell a friend form.
It works except for one thing.
There are two buttons.
The user enters name and email details (only has to do this once for both forms) and then presses either the recommend or the contact button.
The code attached to the contact button is:
on (release) {
if ((entryvalid == "1")) {
gotoAndplay("wait");
}
else if ((entryvalid == "0")) {
contactcheck ();
}
}
The code attached to the tell a friend button is:
on (release) {
if (entryvalid == "1") {
gotoAndplay("recommend");
} else if ((entryvalid == "0")) {
contactcheck();
}
}
wait an recommend are labels.
wait is in frame 5 of the top layer
recommend is in frame 22 of the layer beneath it.
The problem is that when the recommend button is pressed for the FIRST time only, the contact form is displayed.
When the same button is placed thereafter it works OK.
The contact button works properly all the time.
Any ideas?
????
Why Isn't This Button Working?
i can't figure out why my button symbol isn't responding to my "onrelease" in the actionscript.
the code is really simple.
Code:
stop();
videobutton.onRelease = function() {
gotoAndPlay(415);
};
the code is written on the actions frame 414 and the button symbol has the correct instance name (videobutton) and is also on frame 414.
this is my first time posting a question and obviously it would help if i posted my fla. Where can i post it?
Thanks.
Button Not Working
Hi.. i made a menu and a small bar follows your mouse on it... i want to make each button go to a different scene.. i tried putting gotoAndPlay in every possible location and for some reason it wont work...
http://www.metascapestudios.com
its the menu on the top/ company/porfolio/services
Button Not Working
i'm working on the "banners" section of my portfolio, and i can't get a button to work.
there's a menu page where you click on a box of a banner project and the box opens up to a larger box with the project details. On this larger box page there's a back button to shrink the box back to the small menu size again.
I can't get the back button to work for the organic wine co. project. when i press on the back button, i should jump to the frame "winepagereverse,"
but the onpress doesn't seem to register - i tested it with a trace().
any ideas? any help would be greatly appreciated. the link to the fla. is below.
Thanks in advance.
PS- other parts of the swf don't work just because i haven't gotten to them yet. they're not a problem.
http://download.yousendit.com/8FF75E7D4C5FAA12
Button Not Working
for the life of me, i can't figure this out.
is there still a place where i could post my fla., so you could look at it?
also, is there a problem with the search function on this gtal forums that only allows you to see the first page of results?
thanks in advance.
Button Not Working
Hello everyone
I'm not a flash specialist, in fact I've been playing around with it for only a month now, so bare with me if the code is messed up and what not.
I've encounter some problem with buttons that stop working when I go back to the frame.
I have 4 buttons that goto frame (ie: frame 10) .. on these frame I have a buton that goes back to index ie: (frame 4) .. so far it does work fine.. but when I get back to the index .. the 4 buttons stop working ..
I dont know If I made myself clear or not . so the fla is here ==> http://www.mustang5l.com/utopia/utopia.fla
if you go into Portfolio .. enter in one of the galery and hit the Index button to go back to Main menu .. and try one of the 4 option on the left.. they all stoped working.
if someone can take a look at it, that would be kind. !
Thanks
JF
Button In MC Not Working
I have created a mc titled "quicklink" wihtin this mc I have placed a button.
All I want the button to do is to jump to a current frame label in the root timeline. I know the MC is throwing me for a loop as far as how to get the code on the button to send the playback head to a frame label on the root timeline.
Here is what I have tried so far:
on(release)
{
_parent.gotoAndPlay("scene1","pg2");
}
I've also placed the _parent in front of scene 1 (_parent.scene1) to no avail
I thought I would use the "_parent" synatax since the button is inside of a movie clip.
I know this is probably simple but I am stuck,
Thanks in advance
|