Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I'm having problems w

Status
Not open for further replies.

basepointdesignz

Programmer
Jul 23, 2002
566
GB
Hi,

I'm having problems with a button. I've given it a insatnce name etc... but no matter what I actionscript I give it, it won't run properly. Basically, I'm using it as an exit/close button but it won't close with the code:

Code:
on (release) {
    fscommand("quit");
}

....or what I'd like it to do is go to an eding scene, with my company logo in a small aniamtion, which I've already created, but I've tried attching the following to the exit button and it still won't work...

Code:
on (press) {
    gotoAndPlay("End logo", 1);
}


Is it a problem with my button? I created it from within Flash!



Cheers,

Paul @ Bullet-Proof Designz..


BULLET-PROOF DESiGNZ
renegade@tiscali.co.uk
 
where are you putting the code. i think that must be the problem. as it has an instance name use that. code on timeline. mx only.

my_button.onRelease = function(){
//do something
}

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
Hi,

Thanks for the reply. As I'm a relative newbie to Flash, how exactly do I write the code to the timeline? Do I highlight a particular frame and then add the code?




Cheers,

Paul @ Bullet-Proof Designz..


BULLET-PROOF DESiGNZ
renegade@tiscali.co.uk
 
just right click in the frame of the timeline and select actions

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
Hi,

So far I've got the following code:

Code:
exitBT.onRelease = function() {
    fscommand, ("quit");
};

....is this OK? If it is, it's not doing what it should!!

Cheers,

Paul @ Bullet-Proof Designz..


BULLET-PROOF DESiGNZ
renegade@tiscali.co.uk
 
FS Command ("quit", "")

this only works with projectors and not on line. that what you want.?

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
hI,

Yeah I'm creating a CD-ROM for my new business. I'm creating it as a projector (.exe)..

I still can't get it to work properly. So far I've got:

Code:
exitBT.onRelease = function()
{fscommand("quit", "");};

...is this right? I've go this attached to the last frame in the scene (which it stops at) on the layer where the button appears!

I've not done much on ActionScript - I'm a VB programmer by trade..



Cheers,

Paul @ Bullet-Proof Designz..


BULLET-PROOF DESiGNZ
renegade@tiscali.co.uk
 
it looks ok but if its not working then it aint.

can you post the fla and ill look it over.

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
Hi,

I got the button to work! Well it palys the End Logo scene, but at the end of this scene I want it to quit/close the projector..

I added the actionscript from the normal mode in the last frame. I selected the code from the Actions >> Browser/Network >> fscommand menu and then selected quit from the drop-list. When the movie reaches the ends of this scene, it just loops back to the start of the first scene

Cheers,

Paul @ Bullet-Proof Designz..


BULLET-PROOF DESiGNZ
renegade@tiscali.co.uk
 
You could simply on the last frame add the following frame action, and it should work...

stop();
fscommand ("quit");


Regards,

cubalibre2.gif

Bacon, eggs and sunshine are still good for me!
 
Hi,

Thanks for the helps guys. I managed to get it working OK. The only trouble is, I had to delete the End Logo scene and create another one, added the fscommand script, then it worked OK..

Cheers,

Paul @ Bullet-Proof Designz..


BULLET-PROOF DESiGNZ
renegade@tiscali.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top