Solved

How to do what the Windows X button does?

Posted on 2006-11-05
8
162 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
ID: 17875890
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
ID: 17875905
fscommand will ONLY work with a projector file nothing else....
0
 
LVL 13

Expert Comment

by:FLAASHER
ID: 17876076
on (release) {
     getURL("javascript:window.close();");
}
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 13

Accepted Solution

by:
FLAASHER earned 250 total points
ID: 17876181
also see  this .... think it will help :


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


FLAASHER


0
 

Author Comment

by:steva
ID: 17876610
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
ID: 17877273
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
ID: 17877383
Nope, we don't hit that when starting from Ctrl+Enter.  What was the idea there?

steva
0
 
LVL 23

Expert Comment

by:Zeffer
ID: 17877448
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

829 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