Solved

How to do what the Windows X button does?

Posted on 2006-11-05
8
140 Views
Last Modified: 2010-04-03
I have an EXIT button on my animation that does an fscommand ("quit") to close down the projector, i.e., the stand along embedded player,  but when I'm just running from Ctrl+Enter, the button has no effect, of course.  But I'd like it to close the animation anyway, even though I could just as easily click the Windows window X button.  So what code can I execute that will do the same thing that the Windows X is doing?  Also is there a way the animation code can tell if it's being run by Ctrl+Enter or by the projecter?

Thanks,
steva
0
Comment
Question by:steva
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 16

Expert Comment

by:ellandrd
Comment Utility
are you using:

fscommand ("quit");

or the correct way:

fscommand ("quit", "true");

also this is fscommand on a button click like:

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

Expert Comment

by:jdunneuk
Comment Utility
fscommand will ONLY work with a projector file nothing else....
0
 
LVL 13

Expert Comment

by:FLAASHER
Comment Utility
on (release) {
     getURL("javascript:window.close();");
}
0
 
LVL 13

Accepted Solution

by:
FLAASHER earned 250 total points
Comment Utility
also see  this .... think it will help :


http://www.experts-exchange.com/Web/WebDevSoftware/Flash/Q_20449782.html


FLAASHER


0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:steva
Comment Utility
Ok, thanks.  I'll look into these.  But what about the second part of my question?  Is there a way the animation code can tell if it's being run by Ctrl+Enter or by the projecter?  If I knew I wasn't being run by the projector I could make the EXIT button invisible so people wouldn't try to use it.

steva
0
 
LVL 23

Expert Comment

by:Zeffer
Comment Utility
don't know if this will be parsed by the player in time to action it..but worth a try..
put it at the top of all code in frame 1

this.onEnterFrame = function() {
      if (Key.isDown(13)&Key.isDown(17)) {
myExit_clip._visible = false;
  }
}

Z
0
 

Author Comment

by:steva
Comment Utility
Nope, we don't hit that when starting from Ctrl+Enter.  What was the idea there?

steva
0
 
LVL 23

Expert Comment

by:Zeffer
Comment Utility
to trap the key press's as the movie is started
I wasn't too hopeful about it working.. :\ as  Ctrl + Enter is the trigger for playing the
movie and has already passed when the movie is initialised in the player.. unless you held them down maybe..

but I'll try anything once. :)

Z
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now