Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




My Button Is Not Functioning .. What's Wrong With Me ..?



ok here's the situation ..

i have a mainpage.swf with several other files links to it ..
every files have its own BACK button to allow the user to go back to the mainpage.swf ..
on the mainpage.swf, i embedded a looping sound to play continuously ..

my problem is ..
my BACK button is not functioning everytime i click it to go back to the mainpage.swf ..
does it because of the level i used on the actionscript ..

fyi, on the mainpage.swf .. i used this :

on (release) {
loadMovieNum("one.swf", 0);
}

to link the mainpage.swf to one.swf file ..


on the BACK button, i used :

on (release) {
loadMovieNum("mainpage.swf", 4);
}


for the sound played, i called it from external swf which is :

on (release) {
loadMovieNum("soundtrack.swf", 20);
}

pls help to clarufy my problem ..



FlashKit > Flash Help > Flash MX
Posted on: 12-16-2003, 03:49 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Submit Button Not Functioning
I have  a flash movie with a submit button which leads to another flash booking form book.swf .  I am working in asp environment. My actionscript for the submit button is as follows :

on (release){

    submitAttendees();

}


Somehow my scripts work fine on design machine , but the submit button goes dead on the live server. Anyone know what could be responsible ?




Code For Submit Button Not Functioning...
Hi, im trying to build a flashform that take data inserted by users and the send it to a php page that insert it into a mysql database i was told whis code might do he job but it s not working when i hit submit on the _root.status:text (= a textbox with dinamic text that was supposed to get the server response) shows undefined, what im i doing wrong??

any ideas
Thanks Emilio

on (release) {

if (apellido =="") {
_root.tb_status.text = "Debe llenar el apellido del cliente!";
} else if (nombre =="") {
_root.tb_status.text = "Debe llenar el nombre del cliente!";
} else if (fecha =="") {
_root.tb_status.text = "Debe llenar la fecha de la entrevista!";
} else if (hora =="") {
_root.tb_status.text = "Debe llenar la hora de la entrevista!";
} else if (asunto =="") {
_root.tb_status.text = "Debe llenar el asunto del cliente!";
}else{
var formData = new LoadVars();
formData.apellido = apellido;
formData.nombre = nombre;
formData.telefono = telefono;
formData.dni = dni;
formData.fecha = fecha;
formData.hora = hora;
formData.asunto = asunto;
formData.abogado = abogado_cb.getValue();
formData.donde = donde_cb.getValue();
formData.sendAndLoad("inserta.php", _root.tb_status, "POST");
_root.tb_status.onload = insertaReplyFUNC;
_global.function insertaReplyFUNC() {
if (success) {
_root.tb_status.text = "Datos Grabados";
} else {
_root.tb_status.text = "Error al guardar los datos!";
}
}

apellido = "";
nombre = "";
dni = "";
telefono = "";
fecha = "";
hora = "";
asunto = "";
donde = "";
abogado = "";
}
}

Button Not Functioning In Movie Clip
I've made a button inside a movie clip, When I click on the button I want it to move the playhead inside the movie clip. However, when I click on the button nothing happens, but the little hand appears showing that the flash player recognizes that a button is there.

I put a on(press)/trace() on the main movie in the timeline and found that when I click the mouse button it is pressing on the movie in the main timeline, not on the button inside the movie, even though the cursor changes to a hand only over the area of the button inside the movie.

Does anyone know how to solve this problem? I am so stuck.

Thank you

Will

How To Get This Radio Button Quiz Functioning?
Hi,

I'm trying to create a quiz which consists of 5 multiple choice questions per frame. Each answer can be selected by way of selecting a radio button. What I want to be able to eventually is store whether the person got the correct answer and at the end of the quiz give them a percentage score, and feedback on questions that they got wrong.

At the moment, I'm not sure whether I'm adopting the correct approach:

I've created the radio buttons and I've created a global variable that will store a value (1 for right answer and 0 for wrong answer) and these will all be called upon in the final frame for the final calculations. But at the moment, I cant even get the global variable to appear in the next frame in a dynamic text field when you click on 'next'

Can someone please see what I'm doing wrong and point me in the right direction? I've attached the file below.

Thanks

Loop Add Button Not Functioning Correctly
Hey all,

I have been trying to get a for loop to produce buttons based on a value.

My current code is:

var xPosition:Number = 50;
var yPosition:Number = 15;

//problem one is that "rows" is a variable from the html page the swf is
on, I have had it working on other flash programs, but unable to get it
working on this, but for the purpose of this, I can replace it with a
numeric value e.g. "3".
//but this causes the main problem, if it is set to 3, the 3rd button
only appears, if set to 2 the 2nd button only appears.

for(i=0;i<rows;i++){

_root.attachMovie("button","btn"+i,_root.getNextHighestDepth());

_root["btn"+i]._x = xPosition;
_root["btn"+i]._y = yPosition;

yPosition = yPosition + 25;



//Does anyone have any idea's for this?


Thanks in advance.
Slpixe

A Cross Platform Functioning Button
I'm building a hybrid CD that has buttons in it that launch .pdfs.
To do so on the PC side I'm using JStart so that when a button is clicked it runs an executable that launches the .pdf in Reader:
on (release) {
fscommand("Exec", "JSTART_GS_02gs.EXE");
}

FYI - "JSTART_GS_02gs.EXE" points to the .pdf called GS_02gs.pdf

On the MAC side I'm using a get url command to launch the .pdf:
on (release) {
getURL("MM/fscommand/GS_02gs.pdf");
}

fscommand is the folder where the .pdfs and JStart files are located. They have to be here in order for them to launch correctly on the PC side.

Rignt now I have two buttons for each .pdf - one for MAC and one for PC. I'd like to use just one button for both of these commands. If I put both of these commands on one button they both work, however on the PC side it also pulls up a blank web page due to the "get url" for the MAC side. Is it possible to have the PC side ignore the "get url" command, but not ignore it on the MAC side? Should I be using an entirely different code structure to make this happen?

thanks!

Loop Add Button Not Functioning Correctly
Hey all,

I have been trying to get a for loop to produce buttons based on a value.

My current code is:

var xPosition:Number = 50;
var yPosition:Number = 15;

//problem one is that "rows" is a variable from the html page the swf is
on, I have had it working on other flash programs, but unable to get it
working on this, but for the purpose of this, I can replace it with a
numeric value e.g. "3".
//but this causes the main problem, if it is set to 3, the 3rd button
only appears, if set to 2 the 2nd button only appears.

for(i=0;i<rows;i++){

_root.attachMovie("button","btn"+i,_root.getNextHighestDepth());

_root["btn"+i]._x = xPosition;
_root["btn"+i]._y = yPosition;

yPosition = yPosition + 25;



//Does anyone have any idea's for this?


Thanks in advance.
Slpixe

Button Symbol Not Functioning With Geturl()
hi i have the following script for my button symbol:


Code:


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



however when clicked does not open the link.

Having Real Newbie Trouble With A Button Functioning
I have created a button with a mouseover OVER and DOWN text change and an underline, with [I thought] an URL linked onrelease.

However, none of it works, despite my trying to follow directions exactly. If anyone would be able to let me know where I've gone wrong, that'd be so sweet of you!

I have uploaded my FLA here.

Thanks so much.

Movieclip On Root Timeline Functioning As Button
I have a movie clip on my main timeline that is functioning as an invisible button. For some reason the actionscript that I have on the clip doesn't want to control the main timeline. Here's the code:

onClipEvent (load){
this._alpha = 0
}
onClipEvent (enterFrame) {
if (this.hitTest (_root._xmouse, _root._ymouse, true)) {
_root.gotoAndPlay (2);
}else {
_root.gotoAndStop (1);
}
}

Button Inside Movie Clip Is Not Functioning AT ALL
Hi,

I have made a movie clip which I've named 'portfolio'. This movie clip plays when rolled over and goes to a frame labeled 'pressed' when pressed. Inside this MC I have a button called cmres. The instance is as a button too. I have a rollover state on the button but it's not showing up..

Also, I use code on the main timeline like so.

portfolio.cmres.onRelease = function() {
portfolio.gotoAndStop(1);
}

which from what I've been reading should work but isn't. What gives?

Thanks in Advance,
Stan

Button Within Nested Movie Clip Not Functioning
Hi everyone!

Really need some help. I love Flash, but this is just killing me!

I'm putting together a website using an external AS3 file document class called "Master". The site is laid out inside a main movie clip container called "mainContainer". Inside, a "mainNav" movie clip contains 3 buttons that point the time line to frame labels. These frames contain additional movie clips for each page of the site. I have the 3 buttons in mainNav working fine. The issue I'm running into is getting an additional button called "testBTN" nested within one of the page MCs called "methods" to work. I'm getting the "TypeError: Error #1009..." output (yes, I've double checked that my instances are named). Perhaps there is something about scope I'm not understanding? A strange and possibly related issue I had earlier was with the three main buttons. They fade in half way through the mainNav clip, but I couldn't get them to function until I placed an invisible (alpha 0) copy of each at frame 1 of that clip. mainNav also exists on frame 1 of the mainContainer, whereas methods/testBTN is down the line. I have a feeling this has something to do with it, but I'm hoping there is a way to address it...

Anyway, here is my code. The suspect lines are bold:


ActionScript Code:
package {
    import flash.display.MovieClip;
    import flash.display.SimpleButton;
    import flash.events.MouseEvent;

    public class Master extends MovieClip {
        public function Master() {
           
           
   
           
            //button event listeners
            mainContainer.mainNav.BTNmain.addEventListener(MouseEvent.CLICK, onMainClick, false, 0, true);
            mainContainer.mainNav.BTNmethods.addEventListener(MouseEvent.CLICK, onMethodsClick, false, 0, true);
            mainContainer.mainNav.BTNservices.addEventListener(MouseEvent.CLICK, onServicesClick, false, 0, true);
           
            [b]mainContainer.methods.testBTN.addEventListener(MouseEvent.CLICK, onTestClick, false, 0, true);[/b]
           
        }
       
       
        //navigate by frame label
        private function onMainClick(evt:MouseEvent):void {
            mainContainer.gotoAndStop("main");
        }
        private function onMethodsClick(evt:MouseEvent):void {
            mainContainer.gotoAndStop("methods");
        }
        private function onServicesClick(evt:MouseEvent):void {
            mainContainer.gotoAndStop("services");
        }
       
        [b]public function onTestClick(evt:MouseEvent):void {
            mainContainer.gotoAndStop("main");
        }[/b]
       
       
    }
}

Button Inside MovieClip Not Functioning [renamed]
I have a MovieClip called "mousetest" that I can move from a button on the stage:


Code:

Código:
on (click) {
_root.mousetest._visible = 1;
_root.mousetest._x=210;
_root.mousetest._y=201;
}
Inside this MC "mousetest" I have a buttom that "close" (hide/move) the MC but I can't make this WORK, I try evrything I don't know if is a problem using _root

Boton dentro del MC

Code:

on (click) {
_root.mousetest._visible = 0;
_root.mousetest._x=800;
_root.mousetest._y=800;
}
But until know I don't know how to make _global work or if this is the best solution someone can give a hand on this one? (step by step plz)

Thank you.
_LOBO_


I Don't have a clue how to implement _global
http://www.kirupa.com/developer/acti...addressing.htm

Button Inside MovieClip Not Functioning [renamed]
I have a MovieClip called "mousetest" that I can move from a button on the stage:


Code:

Código:
on (click) {
_root.mousetest._visible = 1;
_root.mousetest._x=210;
_root.mousetest._y=201;
}
Inside this MC "mousetest" I have a buttom that "close" (hide/move) the MC but I can't make this WORK, I try evrything I don't know if is a problem using _root

Boton dentro del MC

Code:

on (click) {
_root.mousetest._visible = 0;
_root.mousetest._x=800;
_root.mousetest._y=800;
}
But until know I don't know how to make _global work or if this is the best solution someone can give a hand on this one? (step by step plz)

Thank you.
_LOBO_


I Don't have a clue how to implement _global
http://www.kirupa.com/developer/acti...addressing.htm

Page 2 - Button Symbol Not Functioning With Geturl()
Put a trace inside the onRelease function to see if that is getting called at all. Make sure that the button with the instance name sym_link exists at the at the timeline point that you have placed the code.

Button/navigation Issues...care To Look At My SIMPLE, Yet Non-functioning FLA?
Hey there,
I have attached my FLA, and I am stumped. I KNOW this should be super simple.
I have a very simple, common setup. main window with some navigation buttons.
I have a layer for actionscript, and a layer for labels.
currently, I have only tried to get the "home" and "contact" buttons working.
I can get a little bit of functionality if I put the AS on the button. Yes, I know this is not best practice, but it was working. Sort of.
When I click my "home" button from the initial window, I get the home window reloading, as I would like. When I click the contact button, it loads an external SWF, contact.swf. great.
But when I am in the "contact" mode, and I hit the "home" button, I get nothing.

Now, if I move the AS to the actions layer (changing the on(release) to onRelease, etc...), I get NO functionality at all. I have no clue what I am doing wrong. There aren't miles of code to go through here. just this basic navigation.

Thanks...

eyebum

ok, attaching the fla is no-go, too big. (2.9 MB). So you can find it here:
http://www.spacedog-productions.com/...ash/banzai.fla
Thanks!!

Same Command With A Button Works But Not With The Other Button - What´s Wrong
on (release) {
_root.gotoAndPlay (5);
loadMovieNum ("flash/mmmkt3.swf", 2);
}


Command above works perfectly for a button is inserted into a mc ;
I have a 2nd button inside a mc which is inside another mc
– the path is _root. logomapmc. handshake , 2nd button is inside handshake mc - to perform exactly the same function , on which is issued the very same commands ;
When pressed this 2nd button runs the scene timeline to the frame 5 but the movie does not load ;
What is wrong ?

What's Wrong With The Button?
good day!
is there anyone who can help me with my button?

if i click it once, it doesn't perform the action.

i have to click it over and over to perform the action.

here's my code which i put inside my button.

code:


on (release) {
if (dupCount < 5) {
dupCount++;
_root["pinkButton"].duplicateMovieClip ("pinkButton" + dupCount, dupCount);
_root["pinkButton" + dupCount]._x += 20 * dupCount;
_root["pinkButton" + dupCount]._y += 20 * dupCount;
trace ("hello")
}
}



thank you in advance...

[MX] What's Wrong With My Button?
As navigational buttons in a frameset I use 5 flash buttons. Now I've tested them in Safari/FF/Netscape for Mac and FF/IE6 for XP and they worked. But I've received two mails from people saying on their computer my buttons don't work? One of them has tried it on FF/IE7 for XP. In the attached file are the fla file of 1 button and a part of the html that imports one of the swf buttons. I'm using Adobe's active content script so that IE7 users don't have to click the flash items on my site to activate them.

Can someone debug this short flash file. Or at least explain why for some people my buttons wouldn't work (loading new content in the contentframe) as expected?

Button In Wrong .swf ---help Me Someone
heyy..can you help me with that??i have 2 swf file one called intro and one main site...and i made a button in intro ''enter site'' and i loaded main site using that script on (release) {
_root.content.loadMovie("mainsite.swf");
}

so it works but the button ''enter site'' where was in intro is still ´there under main site and when you go with mouse there you can click in it and he load again main site ..one more thing the button is invisible...
so i don't know how to fix that!!!
here are the files to see for your self to make it easier!!

Button Gets Wrong Value From XML ?
I have this script :


PHP Code:



menuXml.onLoad = function(success) {
    if (success) {
        
        menuItem = this.firstChild.childNodes;
        
        for (var i = 0; i<menuItem.length; i++) {
            item = menus.attachMovie("itemClip", "itemClip"+i, i);
            buttonLabel = menuItem[i].attributes.name;
            item._x = 0;
            item._y = 30*i;
            item.itemLabel.text = buttonLabel;
            trace(buttonLabel);//output = correct
            item.onRelease = function() {
                trace(buttonLabel);//output = NOT correct
                thumbXml.load("http://localhost/automate/thumbcounter1.asp?gallery=" + buttonLabel);
                //buttonLabel value always takes the last in the XML file ?
            }
        }
    }
}; 




Once I click on a button the highest value from my XML is set to each button, do I make a fundamental mistake here ?
TIA !

BaKMaN

> What's Wrong With This Button?
i dont know why, but the text of my button, even after converted to movieclip, is still selectable.
it is p* me off.

Help With Button Going To Wrong Frame
Hi, I think there is an easy answer to this but couldn't find it by searching, and I'm pretty new so I don't know it. I have a simple movie that contains a movie clip. This movie clip has a couple of buttons in it that are thumbnailed pictures (one called pic1, and another called pic2). I tell pic1 button to
On (Release)
Begin Tell Target ("/")
Go to and Play ("pic1")
End Tell Target
End On

and I tell pic2 button to
On (Release)
Begin Tell Target ("/")
Go to and Play ("pic2")
End Tell Target
End On

(Pic1 and pic2 are the label names of the main timeline where the larger images of pic1 and pic2 are located)

The movie works fine if I click pic1, it shows the larger image and if I then click pic2, it shows the larger pic2. The problem is that if I click on pic2 twice in a row, it appears and then disappears and if I click on pic1 twice in a row, it shows the large pic1 and then the large pic2. I ahve also tried this with going to the frame numbers instead of the labels. Why does it work the first time it is clicked, but the second time in a row, it either disappears or goes to the wrong frame/label?

Any help would be much appreciated...sorry I'm so long winded.

? Cannot Ad An Action To A Button What Did I Wrong?
Hello!

I placed a Button from the library on my film (first layer, second frame)now I select the layer, and select the right Button on the 'stage' and want to add the action in the actions-window. BUT they are all grey!?!

who knows what I could have made wrong?

- i checked the Button in the library (it's correct)
- i checked if there is only one button selected (it is)
- ... (i don't find the mistake)

thank you!
vincent

Editing A Button Goes Wrong..
Currently I'm working on some kind of a slideshow for my company's website. This slideshow includes 2 buttons, back and forward. When I made actionscript for the back-button I copied it to the other instance, forward. This didn't work, something went wrong so what I did finally was copy-pasting the back button and rename it to forward.

But now I need to edit those two buttons so I can add sound to them. But when I edit them now I don't see the timeline with 'up','down','hit' etc. but I see the normal timeline instead. How can I fix this ?

Button==>Movieclip What Am I Doing Wrong?
Okay, Ive delved back into Flash again after a falling out, and have been able to solve most of my problems such as preloaders quite easily, but Attatching Movieclips to Buttons still evades me. Here is what Im doing:

Step 1: Create a Movie Clip. In my test case it was a Rotating Square 20 Frames long with Motion Tween.

Step 2: Create a Button
S1-Insert Keyframes for Up and Hit.
S2-Insert Keyframes for Down and Over by Dragging and Dropping the Movieclip centered in the frame.

Step 3: Enable Simple Button Actions so that I can see my Button in action but all it does is show the first frame of the Movieclip.

Any and all help on this matter is appreciated. I had one person help me a few months ago on this (Yes I still after this long time still have this problem), but he was using the MAC version of Flash MX so didnt work out to well. I appreciate all help, thanks.

My Exit Button, What's Wrong?
Hi Guys,

I guess I didn't follow the instructions, or something, but I can't figure it out. please take a look at my sample and clue me in. I feel it's got to be something simple. I want the exit for a fla. , not an html.

and thanks again.

the movie: 5kb
www.geocities.com/engineer94111/what_wrong.html

download: 136kb

www.geocities.com/engineer94111/what_wrong.fla

[F8] What Am I Doing Wrong? (simple Button)
This is the document



If anyone remembers, I was trying to make a t-shirt shop. To test out some of the basic features, I was experimenting with changing the colour of the shirt, but it doesn't work.

Also, could someone tell me why the shirt very quickly disappears then reappears really quickly, even though I places a "stop" action at the begining of everything?

[CS3] Something Wrong With My Animated Button
my 'up' button doesn't disappear during 'over' mode.
check out http://www.rusmannx.com/new and mouse over the "rigs" button and you'll see what I mean.
anyone know how to correct this?

What The Heck Is Wrong With This Button
Hello. I'm new to ActionScript not to mention AS3. I posted in the Newbie section but I did not get any replies, that's why I'm asking here.

All this is is a movieclip tracked as a button with the an instance name of: hBtn that should, when clicked goto another url.
what am I doing wrong?

hBtn.addEventListener(MouseEvent.CLICK, homeClick);
function homeClick(event:MouseEvent): void {
getURL("http://myurl.com");
}

Thanks a bunch!
Brian

Submit Button? What Did I Do Wrong?
My submit button doesn't clear up the input after being clicked; and off course, no variables have been past through to my email. Am I missing anything? Please help. Thank you!


//This is how my submit button looked like:

on (release) {
if (fname eq "" or lname eq "" or subject eq "" or message eq "" or email eq "") {
stop ();
} else {
loadVariablesNum ("mail.php", 0, "POST");
gotoAndStop (s2);
}
}

//This is how my mail.php looked like:

<?

$destination="sales@etreasurebay.com";
$fname=$_POST['fname'];
$lname=$_POST['lname'];
$email=$_POST['email'];
$message=$_POST['message'];
$subject="Message from $fname $lname" ;
$message="Name : $fname
$lname

Email: $email

Comments: $message
";
mail($destination,$subject,$message); ?>

What's Wrong With This Dynamic Button
I have created a moviclip to act as a button.

In my actions layer I have written the following code and placed it on frame 1 with a stop action.

b1_btn.butText_mc.buttonText.text = "Building Information";

there is also a different button (lets call that button Y) that sends the playhead to frame 5.

I placed a new keyframe in the actions panel at frame 5 that says stop();

but by creating that new keyframe in the actions panel, now the text "Building Information" does not populate into my b1_btn. do I need to copy this code and reinsert it everytime i place a new keyframe on the actions layer???

any help would be great.

Button Inheriting Wrong Value
I have 4 buttons and each one moves the bg image to a specific location.
Button 2, 3 and 4 all work great but button 1 goes somewhere else and I don't understand why. If I try changing the value it still goes to this wrong location regardless.

here is the code on my buttons

Code:
// Button1
on (press) {
_root.targX = 0;
_root.targY = 64;
}

// Button2

on (press) {
_root.targX = -162.2;
_root.targY = 64;
}

// Button 3

on (press) {
_root.targX = -292.9;
_root.targY = 64;
}

// Button 4

on (press) {
_root.targX = -414.4;
_root.targY = 64;
}



// and on the BG image I have the following

onClipEvent(load){
_root.targX=0;
_root.targY=64;
}

onClipEvent(enterFrame){
cX=this._x;
cY=this._y;
difX=cX-_root.targX;
difY=cY-_root.targY;
setProperty(this, _x, cX-(difX/5));
setProperty(this, _y, cY-(difY));
}

Movie Button Gone Wrong?
Im trying to make a drop down menu but everytime I scroll over my button the second time it the button doesnt play.

here are the commands I used


ActionScript Code:
on (rollOver) {
    _root.but01.GotoandPlay("up");
}
on (rollOut) {
    _root.but01.GotoandPlay("down");
}

Any ideas on what im doing wrong?

Nav Button Goes To Wrong (next) Frame
I have a Flash file with two layers (top, bottom) and five frames.
The top layer is for the nav bar with give buttons, one for each frame.
The bottom layer is for each of five different screen views. It works
great except when you click on the button that corresponds to the
frame you are on. When you do, it actually goes to the NEXT frame.
What is going on and how can I fix this error?

The button action I am using is:

on (release) {
gotoAndPlay(x);
}

x is the frame that corresponds to the screen I want to display

Using Flash 8

What's Wrong With This Button Code
Dear All,

I am trying to set up a button handler for many buttons rather just one. The
intention of this code is to say if I press Load1 to Load40 that button and
only that button's alpha should change to 50%. This code makes them all 50%
alpha when the frame loads rather than on the onPress event.

Can someone please help me out with this one?

i = 0;
while (i<40) {
this["Load"+i].onPress = btnEvaluate(this["Load"+i]);
++i;
}

function btnEvaluate(target_btn:Button) {
target_btn._alpha = 50;
}

Thanks again.

Alastair MacFarlane

Simple Button, Don't Know What's Wrong
I'm trying to make a button in scene 1 link to frame 1 of scene 2 on release. I don't know what I'm doing wrong. I'm using flash 8.

here's the code i'm using for the button:


Code:


on (release) {
gotoAndPlay("Scene 2", 1);
}



If I don't put

Code:


stop();



for the actions of the frame that the button is in then it goes to the next scene automatically. But when I use it, it does nothing when clicked on, it just stays in the frame with the button. Help!

Whats Wrong With My Button Code?
Hi, I have a button which is supposed to load a players data into my data2 movie clip. This is the code I have on the button
on (press) {
if (length(this["players"+(code+0)])) {
_level0.data2.loadVariables("http://localhost/playerinfo.php?"+this["playersid"+(code+0)]);
}
}
when I click the button no data loads into the clip. When I test the playerinfo.php file it gets the players data fine.
So I seem to be stumped as to why the data isnt going into my movie clip...can anyone tell me if there is something wrong with my actionscript for the button?

Searcher

What Is Wrong With My Button And How Do I Make It Work.
Ok my button .fla can be downloaded at

http://www.egoweb.com.au/test/Button.fla

Here is the actionscript I have got atm, but it does not work can somebody please help me with what I need to do to make it work. I have commented the actionscript a fair bit so you should be able to make sense out of it. Contact me at mark@egoweb.com.au if you need moe info from me.

onClipEvent (load) {

// Tells the button textboxes to autosize.

TextMaroon.ButtonMaroonText.autoSize = "center";

buttonText.TextWhite.ButtonWhiteText.autoSize = "center";

buttonText.TextShadow.ButtonShadowText.autoSize = "center";

clickedText.TextWhite.ButtonWhiteText.autoSize = "center";

clickedText.TextShadow.ButtonShadowText.autoSize = "center";

//

// Stops the button over cursor turning into the hand icon.

buttonHit.useHandCursor = false;

//

// Sets what text appears on the button

var ButtonName = "Button1";

//

// Sets the variables for where to go when the button is clicked

var URL1 = "http://www.egoweb.com.au";

var URL1Frame = "http://www.egoweb.com.au";

var URL2 = "TargetPage2";

var URL2Frame = "TargetFrame2";

//

// sets the initial state of ButtonOver and ButtonClicked to false

var ButtonOver = false;

var ButtonClicked = false;

//

// Sets the bounds for the fade and the slide

var SlideHome = 0;

var SlideMax = 25;

var FadeMin = 0;

var FadeMax = 100;

//

// Sets the initial visability of the TextMaroon and the buttonHit area

setProperty("TextMaroon", _alpha, FadeMin);

setProperty("buttonHit", _alpha, FadeMin);

//

// Dynamically builds the backgrounds for the button.

setProperty("buttonBG.panelCenter", _width, buttonText._width);

setProperty("buttonBG.panelLeft", _x, (0-(buttonText._width/2)));

setProperty("buttonBG.panelRight", _x, (0+(buttonText._width/2)));

setProperty("buttonHit.panelCenter", _width, buttonText._width);

setProperty("buttonHit.panelLeft", _x, (0-(buttonText._width/2)));

setProperty("buttonHit.panelRight", _x, (0+(buttonText._width/2)));

setProperty("clickedBG.panelCenter", _width, buttonText._width);

setProperty("clickedBG.panelLeft", _x, (0-(buttonText._width/2)));

setProperty("clickedBG.panelRight", _x, (0+(buttonText._width/2)));

}

onClipEvent (enterFrame) {

if (ButtonOver == false) {

// This is where I want the TextMaroon MC to fade in to FadeMax on MouseOver

// The ButtonOver variable is controlled from the buttonHit MC on MouseOver and MouseOut states

do {

setProperty("TextMaroon", _alpha, TextMaroon._alpha - 1);

} while (TextMaroon._alpha > 0);

}

if (ButtonOver == false) {

// This is where I want the buttonText MC to slide to SlideMax on MouseOver

// The ButtonOver variable is controlled from the buttonHit MC on MouseOver and MouseOut states

do {

setProperty("buttonText", _y, "buttonText._y - 1");

} while (buttonText._y > 0);

}

if (ButtonOver == true) {

// This is where I want the TextMaroon MC to fade out to FadeMin on MouseOut

// The ButtonOver variable is controlled from the buttonHit MC on MouseOver and MouseOut states

do {

setProperty("TextMaroon", _alpha, TextMaroon._alpha + 1);

} while (TextMaroon._alpha = FadeMax);

}

if (ButtonOver == true) {

// This is where I want the buttonText MC to slide to SlideMin on MouseOut.

// The ButtonOver variable is controlled from the buttonHit MC on MouseOver and MouseOut states

do {

setProperty("buttonText", _y, buttonText._y + 1);

} while (buttonText._y < SlideMax);

}

}

Whats Wrong With My Animated Button?
i am trying to make a simple animated button and there is a gray shade over the up state and down state and i can not figure out why it is there?????

the example of what i am talking about is http://www.jstylellc.com/test.htm

i created all images in fireworks and converted them to a symbol in fireworks then dragged them into flash - not sure if that has anything to do with anything but.....

can anyone help????

Whats Wrong With This Button I Am Trying To Make?
i am trying to make a simple animated button and there is a gray shade over the up state and down state and i can not figure out why it is there?????

the example of what i am talking about is http://www.jstylellc.com/test.htm

i created all images in fireworks and converted them to a symbol in fireworks then dragged them into flash - not sure if that has anything to do with anything but.....

can anyone help????

When Button Clicked It Goes To Wrong Page?
I hvae 4 buttons on my site, and say when you are on the homepage and you click the hompage button, instead of reloading the homepage button it will go to the next page.....
On the button is the following AS,
On(release)
{
_root.gotoAndPlay("homepage");
}You can see it here at the site.......

http://www.pepsipaul.plus.com/Pagesandstuff/Mapquiz.htm

Actionscript Button Codes Gone Wrong?
Hello there! Im pretty new to "FlashKit" Ive used "FlashKit" Itself for help on flash but then i look around and im just like.. Wait a minute.. Theres a fourm?!?! So here i am.. Anyway. I have a short question. The other day i was working on a little RPG kind of game. The one with the buttons where you click to go in a door, Click to go in the next room, Click to read something and so on.. Anyway. I have used the code below..

on (release) {
gotoAndPlay(Whatever Frame ...);
}

to make the buttons. Where it says whatever frame in the code that would be where i put my frame number. This worked for a while untill i got to like my 6th or 5th frame. Once i got there the buttons wouldent do anything when i made them.. And i also made sure that i had a stop(); code on each frame. Could someone help me and or tell me what ive been doing wrong? Or is this just a glitch in flash? O yeah. I dont know if this matters but im using flash pro 8.


EDIT: Is this in the wrong section? Because i just noticed theres a actionscript section hahah.
Thanks
flashnewbie99

[MX] Button Links In A Movie... What Am I Doing Wrong?
Hi there

I havn't used Flash in a while and I'm attempting to create a nice website. Here is my dilema.

For my menu I am using an image scroll, where the mouse rolls over the images and moves them left or right. My question is how do you then turn each image into a link to another page. I have tried the usual:

on (release) {
gotoAndStop(Scene1", 2);
}

But this unfortunately does nothing.
I'm guessing some more advanced script is needed but I don't know what?

Can you help me? It would be very much appreciated...

I have already used the tutorials in FLASHKIT to create a few scroll variations (that are attached) but have had no success with the links.

If Button Clicked Twice, Goes To Wrong Frame
Just to simplify this.. Let's say I have 2 frames.. Named frame1 and frame2.

(frame1) (frame2)

On frame 1, I have 2 buttons. There scripts read as followed:
------------------------
on (release) {
stopAllSounds();
gotoAndPlay("frame1");
}
-------------------------------
on (release) {
stopAllSounds();
gotoAndPlay("frame2");
}
--------------------------

The idea is, if the first button is pushed, it just re-plays frame1.
If the second button is pushed, it plays frame2. Each frame has its own action script to stop(); (if I put GotoAndStop("frame1"); it doesn't play the audio on that frame.. so I used a gotoandplay then put a stop script on the frame itself)

Going to frame2 works fine.. but if I push the button to goto frame1, it still goes to frame 2. If I keep pushing this button it will actually start to go back in forth between going to frame1 and frame2.

So, why if I'm on frame1, if I push the button to goto frame1, it alternates between going to frame1 and frame2?

I have the same 2 buttons on frame2. I can go back to frame1.. but if I push the button to goto frame2(which I'm allready on) it alternates between frame2 and frame3.

Probably a simple mistake I made.. but I can't find it.

Any help is appreciated.

I've Run Out Of Wrong Ways --button Coding
Obviously I don't have the basic concept of coding. I think that I've gotten every syntax error, over the past 24 hrs, lol!

1st question is there a webpage that breakdown syntax and error messages, so I can work from there?

2nd question I have a .swf file that is located on my server, in my images file. I know that the coding location for that swf is:

("../images/questpage.swf")

When the button is clicked I want to have it go to and play this swf.

I've try all the right codes (onrelease--Eventlistner- etc.) but all in the wrong way, because I'm phrasing things wrong

Please help!

Wrong Button & Alpha Shadow
1)On the FLA, when i go over the buttons, there must play a movie clip (a button effect), but when i go over them, that animation sometimes plays at the true position, sometimes behind the menu. It must play between menu and the buttons.
A bit confusing? Have a look at the FLA. How can i solve it?

FLA

2)I lowered an objects alpha and put another object onto that object. Second object's shadow falls on the 1st one. How can i solve it?

Any Idea Why The Button Leads To The Wrong
I have this scripting

on (rollOut) {
tellTarget ("modrise") {
gotoAndPlay(2);
}
}
on (release) {
gotoAndPlay("ProductsPage", 35);
}

The first part is for the buttton to play the parked clip. the second part is to jump to frame 178 of the same scene. However it jumps to frame 1. If I change the scripting to a random frame it seems to play whatever frame it wants???

Copyright © 2005-08 www.BigResource.com, All rights reserved