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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invoke the enter key when page is loaded

Status
Not open for further replies.

wrighterb

Programmer
Feb 20, 2007
80
US
I want to simulate or invoke the enter key at the bottom of the page. so the actions I ahave set up for onclick in a flash movie run.

Does someone have a quick javascript
 
Er... forgive my clear stupidity here, but why would emulating pressing the Enter key (a keyboard action) help to run something that has been set up for a click (a mouse action)?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 

look at it. Click on the main flash movie any where, then hit enter and the image will load, so I need to emulating pressing the main movie first then the Enter key.

This is the only way I can get the images to load dynamically from the database into flash.
 
For security purposes, keystrokes cannot be emulated in JavaScript. Imagine giving a webpage the ability to emulate Ctrl+Alt+Del.
wrighterb said:
This is the only way I can get the images to load dynamically from the database into flash.
I'll admit I don't know the first thing about Flash, but this statement seems unlikely. This can't be the first time this has been attempted by someone. A quick google search shows some potential hits.

Adam
 
You should try to edit the flash movie. Do you have access to the .fla file and a version of flash to open it with? Most likely the .swf file is attaching images with actionscript which is similar javascript. Either was your going to be scripting and the actionscript way will be better. If you don't have access to a flash editor and the source file I would suggest not using the flash movie. Try the forum for help with editing your fla/actionscript.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top