Flash Q
- Started
- Last post
- 6 Responses
- AlsoKnownAs
Do you know how to make a flash movie detect when the browser window it is displayed in has focus?
In other words, say you want something to happen in flash, but you want to be sure that it only happens if there is a good chance that it is being looked at (sounds ridiculous I now). It mustn't happen while the user is looking at a different browser window.
thanks
- fusionpixel0
yeah,
just create a if statement
if (window_off_focus == false) {
doSomething();
}else{
doNothing();
}
- AlsoKnownAs0
ha, it's that straightforward?
Thanks v. much, btw.
I'm relieved. I thought it might require flash talking to javascript, which would do the focus detecting, etc.
& do you know if that is a Flash MX or Flash MX 2004 thing (I'm still on MX for my personal projects)?
- fusionpixel0
no, that is just a construction you have to of course create all the functions and stuff. like yeah probably some JS and stuff
- AlsoKnownAs0
yes, but is there a built in function in flash that I can call, that you know of?
or were you talkign more theoretically?
- fusionpixel0
I was talking theoretically but you can find your answer here:
- AlsoKnownAs0
Ah great. That looks pretty helpful.
Cheers fusionpixel