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








Global Function For Button...something Not Working Quit Right....


OK. I have a movie with 7 scenes. The issue I am having is that a button, contained within a movie clip in one scene (scene X) will not allow users to access any other scene.

On click, it should go from scene X to scene Y, but I am not able to get this to work if the button is contained within a movie clip.

The code is as follows:

on (release) {
gotoAndPlay("scene Y", 1);
}

Any assistance would be much appreciated.




FlashKit > Flash Help > Flash ActionScript
Posted on: 02-28-2003, 08:41 AM


View Complete Forum Thread with Replies

Sponsored Links:

QUIT BUTTON (FUNCTION?)
I have a simple game and will publish it as a projector, as you do.

What script can I put into a button, how and where, to make it quit playing intself?!

View Replies !    View Related
Quit Button Not Working - PDA Flash Application - Help Please
Hi all,

This might be a pretty basic question for most of you, but I need some help with it.

Basically, I have a button called quit_btn. I've applied some actionscript to it (Actionscript 1) as follows:

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

When I publish and test the app, it works fine, the code closes the application.

However, when I upload the .swf file to my PDA, the quit button doesn't work. Can anyone shed some light on why it doesn't work? Is it a conflict in the code which PDA's don't understand?

The model of PDA is a HP RW6815, with the Windows Mobile operating system version 5.

Thanks all.

View Replies !    View Related
SwF A Quit Function Button Should Close SwF B As Well (was "Urget Urgent")
I have two swf running

SWF A & Swf B

SwF A has a button - for which i have to assign quit function but it should close swf B. which is running along with A

Is it possible, kindly guide me.

milind

View Replies !    View Related
Optimaze Quit Working?
Does anyone have optimaze? I have it and usd it about a month ago. Now all of the suden it stopped working. When I click on the optimaze.exe, nothing happens. Any Ideas here?

Thanks in advance

View Replies !    View Related
Net Debugger Has Quit Working
Hello Everyone!

I am building a Flash Pro forms application that uses Flash Remoting. All of my AS2 code is contained within external classes.

I've been using the net debugger for the last 2 months with no problems whatsoever. Yesterday, I opened net debugger, and the debugger no longer works -- the debugger window opens, but it now has no content whatsoever! The app works fine, flash remoting is working beautifully with the app server, but I no longer receive ANY trace statements, or other messages within the debugger!

I haven't changed my code -- I'm still calling the NetDebug.initialize() method to initialize the net debugger -- call is made when the form first loads. None of the code has changed at all.

Anybody else have this problem? If so, do you know how to fix it (short of reinstalling Flash Pro 2004 I mean)?

Thanks in advance,
CatDogCat

View Replies !    View Related
Net Debugger Has Quit Working
Hello Everyone!

I am building a Flash Pro forms application that uses Flash Remoting. All of my AS2 code is contained within external classes.

I've been using the net debugger for the last 2 months with no problems whatsoever. Yesterday, I opened net debugger, and the debugger no longer works -- the debugger window opens, but it now has no content whatsoever! The app works fine, flash remoting is working beautifully with the app server, but I no longer receive ANY trace statements, or other messages within the debugger!

I haven't changed my code -- I'm still calling the NetDebug.initialize() method to initialize the net debugger -- call is made when the form first loads. None of the code has changed at all.

Anybody else have this problem? If so, do you know how to fix it (short of reinstalling Flash Pro 2004 I mean)?

Thanks in advance,
CatDogCat

View Replies !    View Related
Flash Quit Function?
Is there an actionscript command to make an swf quit the application that is running the swf when it hits a specific keyframe?

View Replies !    View Related
Buttons Quit Working On IE And Firefox
Ok, so I designed this website like 2 years ago for my friends band.

http://www.theoutline.net

Everything works and looks great on firefox and safari on a mac. No problems.

Then you look at it on a pc in firefox or IE and none of the buttons work except for the message board which I was going to get rid of cause of all the spam.

So, I have the flash being displayed with swfobject 1.0.
The buttons are just really simple rollovers with behaviors so they go to the direct link and I made them in flash 8 with actionscript 2.0.

So why is this happening all of a sudden?

View Replies !    View Related
Instance Names Quit Working
Here's a weird one. Maybe someone out there knows what going on.

The last two weeks or so, some instance names just randomly quit working. Once changed to something else, they work fine again.

For example: I've been making multiple drag and drop activities lately. They all use the same exact AS code, instance names, etc. The only difference is the content of the draggables. Out of nowhere, one draggable will quit working. All the others still work fine. If I change the instance name from say "b_btn" to "b_btnn" and change any reference to that name in the AS, the file works fine again.

This has happened several time in the last few weeks, with different files, different AS. In all cases, I'll have one version of the file that still works, and one that doesn't. I'm running Flash MX on a Mac 10.3. I've tried opening the files in MX 2004 and the same thing happens.

Any ideas?

View Replies !    View Related
Animation Quit Working With New Player
I made a cartoon face that the mouth moves when you speak into the microphone. I made it with MX. When I revisited it with flash 8 it dosen't work. There is a movie called mouth(has stop in 1st frame) inside the object called head on the root timeline.
When I open the animation the mouth plays all the time, even with no microphone. Here is my code that is on the 1st frame of the root timeline...
Code:

var active_mic:Microphone = Microphone.get();
_root.head.mouth.attachAudio(active_mic);

_root.head.mouth.onEnterFrame = function() {

   var level = active_mic.activityLevel;
   
   if (level>=60) {
      _root.head.mouth.play();
   
   }
   else{stop();
   }

};

Can anyone help me....thanx wo

View Replies !    View Related
[CS3] Global Function = Global Variables As Well?
CS3/AS2
if i have a global function with some variables defined within it, are the variables global too? if not how would i make them global too?

_global.function someFunction() {
var cake = 10;
var book = 15;
}

someFunction is global so therefore "cake" and "book" are too?

View Replies !    View Related
Global Function, Global Variable
how to declare global function and global variable? if i declare it just in frame 1, then the object in other frame can reach it? thanks for answer..

View Replies !    View Related
Shortcut Keys Quit Working Periodically
I open up Flash and everything works fine, then after a few minutes (not noticeably related to any certain activity) the shortcut, or "hot", keys just quit working and I have to manually select tools from the tools panel. If I close Flash and reopen it, the hot keys work again, but the problem comes back after working for a while. It's a killer on my productivity.

If it helps I work on a PowerMac G5 running Mac OS X v10.5.5 w/ a Dual 2GHz PowerPC processor and I'm running CS3.

View Replies !    View Related
Styled Text Area Quit Working?
I created an entire web site using the attached code to scores of Text Area Components (originally in Flash 8 using AS 2.0 and saved for Flash Player 8 delivery). This code was placed on the frames in which the various Text Area Components resided. Only the Instance Names were changed (both on the component and in the AS for that frame). The sample code I am attaching is one such example of the frame code for a Text Area Component with an Instance Name of "MeetConnallyText".

This was working perfectly online for the past 15 months. I am now using Flash CS3 on Leopard. Today I opened the Fla. for this site, just changed a graphic and the re-published the site using the same settings as always Player 8, AS 2.0, only the Color Styles and CSS Formatting vanished?

I finally replaced the Text Area Components with the ones included with CS3 and gave them matching Instance Names. The external XML Text DOES LOAD into the Text Area Component - so PART of my script appears to be working.

My problem is ALL MY CSS FORMATTING is not being recognized and the BACKGROUND COLOR for the Text Area component is also ignored>

What changed? How can I fix this - the whole site looks like crap!

Thanks for any help







Attach Code

stop();

MeetConnallyText.html = true;
MeetConnallyText.wordWrap = true;
MeetConnallyText.multiline = true;
MeetConnallyText.editable = false;
MeetConnallyText.setStyle("borderStyle","none");
loadtextStyle = new TextField.StyleSheet();
loadtextStyle.load("Connally.css");
MeetConnallyText.styleSheet = loadtextStyle;
MeetConnallyText.setStyle("backgroundColor", "0xFFFFCC");
loadtextContent = new XML();
loadtextContent.ignoreWhite = true;
loadtextContent.load("Staff/MeetConnally.xml");
loadtextContent.onLoad = function(success) {
if (success) {
MeetConnallyText.text = loadtextContent;
// loads the file into the TextArea
}
};
MeetConnallyText.vPosition = 0;

View Replies !    View Related
Disable The Player Close And Quit Function
Hello,

I need to prevent the user from closing the player window until they erach the end of an assessment. How can I acheive this? Or is it possible? I can't find anything in fscommands or actionscript

ia

View Replies !    View Related
[F8] I Started Exporting To Flash8 Instead F8 And My Loader Quit Working With Vars
I am using a loader component. I was setting the ContentPath parameter to a variable on the first frame of the timeline containing this component by using:

Quote:




tstone30.ContentPath=_root.page3_tphoto30;




However, I decided I wanted to take advantage of the justify feature for my dynamic text fields and began exporting to Flash 8 instead of Flash 6. For some reason, my loader quit pulling the images into the loader. If I switch back to Flash 6 it works again. Any ideas cause this is driving me crazy?

View Replies !    View Related
Button Function Not Working
hello dev shed

i am attaching mcs' from an array, this works.


Code:


this.blank1.attachMovie(Next_Movie[i], Next_Movie[i] + "Clip", this.getNextHighestDepth());



1. each mc has an onClipEvent (load) and (enterFrame) event that allows me to drag them to a target mc

but my button function does not

2. each move has an instance name - Next_Movie[i] + "Clip"

3. here is my button function is that right? if not what should it be?


Code:


_root[Next_Movie[i] + "Clip"].onReleaseOutside = function(){
playNextMovie();
}



this should run playNextMovie(); once the movie has been drag to the correct target


Code:


counter = 0;
//define the array
Next_Movie = new Array("mc4", "mc18", "mc19", "mc21");
//define shuffle function
function shuffle() {
return Math.round(Math.random());
}
Next_Movie.sort(shuffle);
var i =0;

function playNextMovie() {
randomMovie = this[Next_Movie[i]];
this.blank1.attachMovie(Next_Movie[i], Next_Movie[i] + "Clip", this.getNextHighestDepth());

i<Next_Movie.length-1 ? i++ : (i=0, Next_Movie.sort(shuffle));
trace(i);

}
function display(){
return(playNextMovie());
}
display();
//call the function
_root[Next_Movie[i] + "Clip"].onReleaseOutside = function(){
playNextMovie();
}



thanks in advance guys and girls

View Replies !    View Related
[CS3] AS2 Button Hover Over/out Function Not Working
To make a line of text a button I have used a square shape with alpha 0% and added actions to it - I have to do this as I cannot get the correct font in Flash CS3.
I need to make a shape appear when the button is hovered over so I use this code:

Code:
stop();

faq_pointer_1._visible = false;

forks.onRollOver = function()
{
faq_pointer_1.visible = true;
}

forks.onRollOut = function()
{
faq_pointer_1.visible = false;
}
I get no faq_pointer_1 appearing at all - I have to use the stop(); as otherwise it goes to the next page. Is this the problem? or is there any other possible reason.
Help appreciated

View Replies !    View Related
Button Rollover Function Not Working
I am having some trouble with my button rollover code not working. When I rollover the button the text color should change but doesn't. I am not sure why?

ActionScript Code:
//
                var SELECTCOLOR = 0xFF0000;
                var OVERCOLOR = 0xCCCCCC;
                var DEFAULTCOLOR = 0x000000;
                //
                gotFocus = function (obj) {
                    lostFocus(this.prev);
                    this.prev = obj;
                    var v = new Color(obj);
                    v.setRGB(SELECTCOLOR);
                };
                //
                lostFocus = function (obj) {
                    var v = new Color(obj);
                    v.setRGB(DEFAULTCOLOR);
                };
                //
                var prev = null;
                vid_btn.v = new Color(vid);
                vid_btn.v.setRGB(DEFAULTCOLOR);
                // give button0 focus when entering frame
                if (_global.video_array[0] == this.video0) {
                    gotFocus(vid_btn0);
                }
                //
                vid_btn.onRollOver = function() {
                    //trace(this.getDepth());
                    //trace(this.vft.text)
                    if (_root.prev != this) {
                        this.v.setRGB(OVERCOLOR);
                    }
                };
                vid_btn.onRollOut = function() {
                    if (_root.prev != this) {
                        this.v.setRGB(DEFAULTCOLOR);
                    }
                };

View Replies !    View Related
OnEnterFrame Not Working Inside Button Function
I have a mc I load dynamically with the attachMovie statement. The mc has two buttons inside.

I can target the btn's but my onEnterFrame function does not trigger. but trace function does output
Here

Code:
nav_mc.main_btn.onPress = function() {
trace ("MainButton Pressed");
this.onEnterFrame = function() {
if (holder._alpha>0) {
holder._alpha -= speed;
} else {
delete holder.onEnterFrame;
holder.removeMovieClip();
this.removeMovieClip();
}
};
owner.b1.enabled = true;
owner.b2.enabled = true;
owner.b3.enabled = true;
owner.b4.enabled = true;
};
If i just target the mc the function runs great

Code:
nav_mc.onPress = function() {
this.onEnterFrame = function() {
if (holder._alpha>0) {
holder._alpha -= speed;
} else {
delete holder.onEnterFrame;
holder.removeMovieClip();
this.removeMovieClip();
}
};
owner.b1.enabled = true;
owner.b2.enabled = true;
owner.b3.enabled = true;
owner.b4.enabled = true;
};
What am I not doing?

View Replies !    View Related
Quit Button
Hi,

I am working on a Flash Christmas card that will burned onto a disc and sent to my clients. What I am having trouble with is that at the end of the movie, I want to have a "quit" button that will close the window. I found this script but it does not work.

on (release){
fscommand("quit", true);
}

Any help will be greatly appreicated.

Thanks.
Russ

View Replies !    View Related
Quit Button
i have an exit button in my swf and i am loading it as a fullscreen from an other html document but my quit button will not close this window down. When i run it just out of the swf file it does work... what am i doing wrong???

View Replies !    View Related
Quit Button Help
I'm wanting to place a "quit" button on an interactive cd Flash movie, i.e. giving people the option to quit out of the presentation at any point without having to taking the cd out of their computer.

View Replies !    View Related
A Quit Button
I have a button on my website that a want to close the current window (i.e. quit the website) when it is clicked anyone know how to do that. I also need a script for a nice pop-up window that i can edit (i.e. the height width and position of the window) Also is there an easy way to keep the swf in the middle of the users screen whatever resolution they have. I am using Flash MX and exporting to flash player 6 if that makes any difference

[Edited by tommmmm on 06-15-2002 at 05:16 AM]

View Replies !    View Related
Quit Button
I have a Quit button, and when I hit it, I want to close the browser... how do I do this?

View Replies !    View Related
Quit Button
I have a quit button and I want to close the browser when I press it, any ideas?

View Replies !    View Related
Quit Button
What´s the AS for a quit button?? I want to open a small window when the user clics on a button, and have a quit button on the corner, thanks!

View Replies !    View Related
Esc Button = Quit
cheers!

i am currently working on a presentation with user interactivity on it.
actually i'm already done on the presentation side but i still lack some events on the interactivity side...

i am hoping that some of you guys could help me on this one...

i want to terminate or close the .swf movieclip once the "Esc" button is pressed... i've tried using the "fscommand" code but it does not work... can you guys help me out?

here is my code:

Code:
if(Key.isDown(27)){
fscommand ("quit");
}
any suggestions and comments you would like to share, please feel free to reply on this post... thanks in advance!

View Replies !    View Related
Quit Button
What´s the AS for a quit button?? I want to open a small window when the user clics on a button, and have a quit button on the corner, thanks!

View Replies !    View Related
Quit Button
Hello friends.

I need the code to quit from a fullscreen exe. I´ve already done this...but i dont remember...

thank you

hugs

View Replies !    View Related
Quit Button
Hi,

i created five buttons-history, video, gallery, joke and quit.each buttons action script wrote like
video_btn.onRelease = function() {
_root.gotoAndStop(3);
};
only quit button can't work!
who know action script for quit button by using flash 8?

View Replies !    View Related
CLOSE/QUIT Button
I am working on an Enhanced CD.

I have many challenges ahead of me. However, I have one easy question for someone to answer.

What function can I use to make a CLOSE/QUIT button?

Thank you for all of your help!


Janessa W.

View Replies !    View Related
How Do You Tell A Button To Quit Browser?
Fairly new to the action-scripting thing...need to know how to tell my "exit" button to quit the browser. Right now it works fine quitting the projector, but once the swf is read in the browser, the button doesn't work. Anything I can do?
Thanks!

View Replies !    View Related
Simple Quit Button
Please poeple, i need to know how to make a simple quit button, i know how to make a button but need the quitting actionscript.

Cheers, any help is good help.

View Replies !    View Related
Slightly Different Quit Button
Hi All,

I am trying to create a quit button that will forward the user to a specified frame in the time line. That frame will contain a movieclip that will hopefully play and then quit the projector on the last frame. Is there any way to attach the fscommand quit command to a frame rather than a button?

View Replies !    View Related
Quit Button URGENT
I have made a button that will Quit the movie, it works when I publish it as a projector but not when I place it into a html page or powerpoint doc. This movie is a looping thing.


Here is the action attached to the button:


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

View Replies !    View Related
Quit Button On Fullscreen .EXE For MX
Hello,

I was wondering if someone could help me write a script on a button that would quit out of full screen mode on an .exe file. I do not want to have the users trying figure out how to quit out of the full screen mode. I used

fscommand("fullscreen", "true");

When the .exe loads to make it full screen.

Thanks to anyone who can help with this.

View Replies !    View Related
Having Problems With A 'QUIT' Button
Hi all

I'm making a tutorial using Flash MX. I got a problem basically I have made a button stating 'QUIT.' It's meant to exit the tutorial - however I do not know what code goes into the button - I am quite confused on this.

I have tried doing something like this

on (Press){

unloadMovie ("vect tutorial.swf");
}

but i don't know what it means by when it says 'target' - when i like opened the brackets after typing in 'unLoadMovie'.

Please help me.

Thanx

Rupz25

View Replies !    View Related
Help Please Quit Button On A Movie..how Its Is Done?
Im trying to create a authorun flash movei... I have a quit buttons were users can end the program when they are done...What is the script of quit buttons? and also i was just wondering how to make my movie run in full screen without clicking on ctrl F.

thanks
selj

View Replies !    View Related
Quit Button For Standalone.
Yes, I'm a meganoob.

I'm using flash8 and I've tried this :

quit_btn.onRelease = function ()
{
fscommand(quit);
}

And loads of other things (on seperate frames and on the button), but I can't get it to work.

View Replies !    View Related
Programming A Button To Quit
Hi:
I am currently finishing my project. I have to program an exit button to leave the projector.
I have in the action button:

on (release) {
fscommand ("quit", "true");
}

But not working.

Can you help me please?

View Replies !    View Related
Quit / Exit Button :S Sorry Im New
Hi, really sorry, i am VERY new to flash :S

Closing Projector Movies:

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


I assume this closes the projector instantly, can i make one that asks for confirmation first?

Like "Are you sure you wish to close the CD Yes / No"

View Replies !    View Related
How To Make A Quit Button?
hi
please im not so advanced hope you can tell me
im using the fs full screen action and now i want a button so people can choose to close it
can anyone help me with the code or how i do it
thanks
faith

faithcopeland@yahoo.com

View Replies !    View Related
Quit / Exit Button :S Sorry Im New
Hi, really sorry, i am VERY new to flash :S

Closing Projector Movies:

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


I assume this closes the projector instantly, can i make one that asks for confirmation first?

Like "Are you sure you wish to close the CD Yes / No"

View Replies !    View Related
Quit (exit) Button
Hello peeps!

I'm making a game in flash MX, and have built a quit button in which, when pressed will close the whole movie - including the window.

I have tried:

on (release) {
fscommand("quit");
}
...but nothing happens

also i tried:

quitbutton.onRelease = function(){
unloadMovieNum(0);
unloadMovieNum(1);
}
...but this just closes the movie - leaving a white screen in a window....

...can anybody help?

View Replies !    View Related
Quit Button Question
I have this fullscreen presentation and I want to use a "quit" button: clik the button to close. Whats the code for the button?

Hugs

View Replies !    View Related
Dual Action Quit Button?
Hi,

To prevent me having to have two sets of code for flash projector and swf, I want a quit button that can detect whether it is an EXE so as to decide whether to use
getURL(javascript:window.close())
or
fsCommand(quit)

Hopefully this is easy as putting both lines in causes the projector to launch a navigator window in order to close it. Which is a bit of a pain in the behind and looks naff.

Any takers?

Thanks,

G

View Replies !    View Related
Setting A Start And Quit Button
I have a small Flash intro peice that is embedded at the start of an Authorware peice. It has a few buttons of info, a quit and a start. I want the start button to effectivley stop the Flash movie running and proceed into the rest of the Authorware timeline. The quit button will quit the whole Authorware app. I can code the Flash movie to quit etc when running stand-alone from a .swf file, but how do you pass these parameters to Authorware when it's embedded? Any ideas?

View Replies !    View Related
Screensaver Exit/quit Button
Hello all,

I am trying to create a screensaver that when you move the mouse, click, and press on keyboard it will not exit the screensaver. I would like to have a button which on release will open a internet browser and close the screen saver at the same time.

Would anyone know the actionscripting for something like that? I have not been able to come up with anything yet.

Also if anyone can recommend a decent flash to screensaver program which is free or cheap please let me know. The one I am currently using is not too good.

Any help is greatly appreciated. Thanks!

View Replies !    View Related
Quit Button In Projector Problems (cs3)
Grteetings:

I have a stop action at the end of a projector in which I want a quit button.

Why the once simple quit command has been changed is beyond me, however the following script does not work for button instance- 'Btn_Quit' in cs3:

stop();

Btn_Quit.onRelease = function() {
fscommand("quit", "");
};


any help is good help

thanx

View Replies !    View Related
How To Make Quit Button In Flash Mx
I know this should be simple one, but I can't find method to join the button with quit function. I am trying to make presentation which must have quit button.

Thanks in advance, and sorry for stupid question.

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved