Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to do what the Windows X button does?

Posted on 2006-11-05
8
Medium Priority
?
177 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 1000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
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): …
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.

660 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