Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

keypress simulation

Status
Not open for further replies.

jefargrafx

Instructor
May 24, 2001
273
US
okay...I'm full of them this week?


can I get actionscript to simulate a keypress...say "enter"

when a movie loads in the browser or when the play head hits a specific frame?

the idea is to stop the browser from saying

"The page you are viewing is trying to close...bah ablah blah



let me know what you think

jef
 
No - not in the way you are thinking of. If an alert box pops up, the ENTER key on the keyboard would have to be pressed. I don't think you can send the alert box a message from Flash saying "someone pressed ENTER in here".

Why are you trying to close the root page anyway ... ? _____________________________________________________
Knowledge is attained only by seeking out that which is unknown
 
I'm using javascript to start a popup full screen from within flash. In one movie as the play head enters a frame I open a new browser, chromless, fullscreen, works well.


I'd like this page to close the page that opened it without this error message?

any ideas? jef
 
You can't ... a HUGE pain, but it's a security feature. You can't close a root window. _____________________________________________________
Knowledge is attained only by seeking out that which is unknown
 
or even open the root chromeless? so your swf could act as a dash board?

maybe this should be a question for the javascript forum?

or can flash access it's parent window and control it's attributes?

let me know jef
 
I might be wrong, but think I remember Netscape closing the opener without that warning! For once Netscape had one advantage over IE.

That said, you could probably make it very small and move it far "off stage" in a way, but I'd just leave it alone, or maybe load a new page (while your fullscreen is happening!), with a "Thank you for visiting this site... Bla bla!" message. Otherwise, a lot of users (myself included!) will hate you for obliging them to open up another browser window when we finally close your fullscreen.
And by the way, you should also have a close button on that fullscreen, in case the user wants out, and doesnt know the ALT->F4 trick. Another reason to hate you! Regards,

oldman3.gif
 
yes, that's bout what I got going on?

and yes, put a close button not everyone know bout that alt+f4 trick.


I'm developing this project to go on CD...not the web, the customer, would like the pres3entation window not to have any chorme, as if it is an indepentant app......

I don't think I can do this with swf projector, set it to fullscreen with no titlebar?

right? jef
 
On the first frame:

fscommand("fullscreen", "true");
Regards,

oldman3.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top