Solved

How to do what the Windows X button does?

Posted on 2006-11-05
8
170 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Title # Comments Views Activity
Stock Videos 17 353
Some Flash in IE doesn't display properly, but does in Chrome 4 644
Microsoft WSUS 4 116
Could you point a workaround on how to open this Adobe Flash documents? 5 219
I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

759 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