Solved

How to do what the Windows X button does?

Posted on 2006-11-05
8
174 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

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
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…
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…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

636 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