A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: javascript to put the focus on the flash object

  1. #1
    Junior Member
    Join Date
    Feb 2000
    Posts
    2

    javascript to put the focus on the flash object

    Hi, could someone give me some hints on how to make some javascript that will make it so the user doesn't have to click on the flash object to select it?

    ...I'm doing some keyboard input incase you're wondering why the hell I'd want this.

  2. #2
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    In the object tag of the movie (in where it has the width and height parameters) add the parameter

    id="movieName"

    then in in the embed tag add

    name="movieName" swLiveConnect=true

    now you can focus your movie from the an onLoad event handler in the body tag like this

    <body onLoad="window.document.movieName.focus();">

    hope this helps

  3. #3
    Junior Member
    Join Date
    Feb 2000
    Posts
    2
    Thanks catbert! Works great.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center