I have had an awful time on my current project with Flash eating keyboard commands, especially Tab. I eventually had to abandon Tab functionality entirely. In my case, having buttons in the .swf caused all focus to go to the .swf unless I had a text field on the page I could force focus on. When I had to disable the editable of that text field, the .swf grabbed focus again. In .swfs that had no buttons, the focus was not grabbed.
Dennis Tarwood
so one solution to this 'Flash grabbing keyboard focus' issue might be to have a #text sprite hidden off the visible stage, set to #editable?
-Buzz
> (the key) that was pressed. It always dies at this file.Message: 1 From: "Todd Culley" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Date: Sat, 19 Jul 2003 12:27:45 -0700 Organization: SCRIBNERmedia Subject: <lingo-l> Director/Flash/Keyboard events Reply-To: [EMAIL PROTECTED]
Does anyone know of any issues between director and flash when it comes to
keyboard events?
Using DirectorMX, FlashMX, WindowsXP Pro, Dual PIII, 1GB RAM
I have a director application that is being used for a presentation. It has
three areas: 1 � title screen (press any key to continue), 2 � mpeg2 video,
3 � flash slide show. The presentation is very linear, however we added
keyboard commands so the presenter can move around the presentation.
[ESC] � exits/quits
[HOME] � returns to the title screen
[END] � jumps to flash presentation
[SPACEBAR] � toggle, pauses/plays the video or flash sprite.
[�] � go previous section
[�] � go next section
I have 5 .swf files that play in sequence named 1.swf, 2.swf, 3.swf, etc.
when the user gets to 3.swf the keyboard events in director stop responding.
1.swf is imported into director as a linked member and at the end there is
actionScript that loads the next .swf file in the sequence. These .swf
files behave like a PowerPoint presentation and there are simple buttons
that the user can go to the next frame label with in each .swf file. We
have narrowed it down to the 3.swf file using the message window to output
>
> The client supplied all the .swf files and we are providing the wrapper with
> the video and title screen. Initially the .swf files had keypress eventsbut we thoroughly took all the keypress events out. There is nothing>
unusual about these flash files that director can�t handle. Basic
animation, some movie clips, simple action script typical in any basic flash
movie. When we take 3.swf out of the chain there is no problem. This had
been driving us nuts and can�t for the life of me figure out why director
stops receiving events on this one file. This file is no different from the
others, we have stripped it down, checked and double checked. I would
greatly appreciate any advice or input on why this might be happening.
tia,
todd
Below is the behavior used on the frame and flash sprite:
<frame script>
--//beh_fs_keyboard
--//property declarations
property pProgramSprite
--//EVENT HANDLERS
on keyDown(me)
put the key
put the key.charToNum
case (the key).charToNum of
-- esc key
27:
bIsPlaying = sendSprite(pProgramSprite, #mIsPlaying)
if bIsPlaying then
sendSprite(pProgramSprite, #mPlayPause)
end if
ExitWindow_open()
--space bar
32: sendSprite(pProgramSprite,#mPlayPause)
--left arrow
28: go previous
--right arrow
29: go next
--home key
1: go to marker("start")
--end key
4:
sWord = the labelList.line.count - 1
sLabel = the labelList.word[sWord]
go to marker(sLabel) end caseend
on exitFrame me
go to the frame
end
--//AUTHOR DEFINED HANDLERS
on getPropertyDescriptionList(me)
pdl = [:]
pdl[#pProgramSprite] = [#comment:"Program Sprite #:", #format:#integer,
#default:5]
return pdl
end
</frame script>
<flash sprite script>
--//beh_flash
--//property declarations
property mySprite
property myMember
property pIsPlaying
--//event handlers
on beginSprite(me)
put me
mySprite = sprite(me.spriteNum)
myMember = mySprite.member
myMember.Loop = FALSE
myMember.directToStage = TRUE
pIsPlaying = TRUE
end
on prepareFrame me
if myMember.type = #flash then
if mySprite.mouseOverButton then
mySprite.cursor = 280
else
mySprite.cursor = -1
end if
end if
end
--//public interface
on mIsPlaying(me)
return pIsPlaying
end
on mPlayPause(me)
if pIsPlaying then
mySprite.stop()
else
mySprite.play()
end if
pIsPlaying = not pIsPlaying
end
</flash sprite script>
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
