> So again, any clues, anyone ? Yes, something is wrong with your movie other than this code that's preventing you from seeing the alert (my best guess). I took your code, commented out the extraneous parts that don't deal with timeout objects and used that as a behavior on a QuickDraw sprite on stage. Other than that sprite there is a script to hold the playback head on one frame and that's it, there's nothing else in my test movie. I did authored on WinXP using Director MX 2004 10.1.0r11, I published both a Windows and a Mac OSX projector. I ran both projectors and everything behaved as expected, I saw the first alert telling me the timer exists then the second telling me it was called. I ran the Win projector on WinXP and the Mac projector on both 10.3.8 and 10.4.1 and in all cases I only saw expected behavior (both alerts appeared).
So, what else are you missing from your movie? Are you looping on that frame for _at_least_ two seconds in order to wait long enough to see your own timeout alert (if you're leaving that frame in under two seconds your endSprite handler clears the timoeut object before it gets called the first time)? Do you have any other code that touches that sprite or the timeoutList? I've posted my sample files here: http://poppy.macromedia.com/~thiggins/bugs/timeout/Timeout.dir http://poppy.macromedia.com/~thiggins/bugs/timeout/Timeout.exe http://poppy.macromedia.com/~thiggins/bugs/timeout/Timeout.osx http://poppy.macromedia.com/~thiggins/bugs/timeout/Timeout.osx.hqx I posted the Mac projector in its original HQX file and as the projector found within separately. I also copied my modified version of your behavior below my signature for easier inspection. Cheers, Tom Higgins - Technical Product Manager Macromedia Director and the Shockwave Player http://www.markme.com/thiggins/ property SpriteNum, myTimer, screen1,OrigText on beginSprite me -- OrigText = member ("line1").text -- spritesToDimList = ["button_continue","button_stop"] -- repeat with i in spritesToDimList -- sendSprite(i,#dim) -- end repeat if(checkResolution(me)) then myTimer = timeout().new("GoOn",2000,#GoOn,sprite(SpriteNum)) if(not(VoidP(myTimer))) then alert("timer exist") end if else myTimer = timeout().new("StopIt",2000,#StopIt,sprite(SpriteNum)) end if end on checkResolution me -- screen1 = the desktoprectlist[1] -- if(screen1.right >= 1024) then return TRUE -- else -- return FALSE -- end if end on GoOn me alert("called") myTimer.forget() -- aText = OrigText & return & member("line2").text && -- string(screen1.Right) && "*" && string(screen1.bottom) & return -- member ("line1").text = aText -- updatestage -- aText = aText & member("line3_correct").text -- member ("line1").text = aText -- sendSprite("button_continue",#UnDim) end on StopIT me myTimer.forget() -- aText = OrigText & return & member("line2").text && -- string(screen1.Right) && "*" && string(screen1.bottom) & return -- member ("line1").text = aText -- updatestage -- aText = aText & member("line3_wrong").text -- member ("line1").text = aText -- sendSprite("button_stop",#UnDim) end on EndSprite me if(ObjectP(myTimer)) then myTimer.forget() end if -- member ("line1").text = OrigText end [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!]
