Forums → Programming Forum → Focus Class
- 0 Replies
Well... which is it? Focus on the screen or when focus is lost?
After the preloader and menu you will eventually get to your game class.
maybe something like this
gameMC = new gameClass();
var focusMC = new MovieClip();
focus.it(focusMC, gameMC, stage); //link them together
public class focus
//keyword = focus.it(focusMC, gameMC, stage);
public static function it(f, g, s):void
s.stageFocusRect = false;
s.focus = g;
var detect:Boolean = false;
f.visible = false;
f.visible = true;
s.frameRate = 0;
f.visible = false;
s.frameRate = 24;
download it here
Have the player gain control of the game screen without the yellow border and if the player clicks outside of the game, the game will be paused and a transparent screen will appear indicating that focus is lost.
You can also use your own focusMC without using the draw method
You must be logged in to post a reply!
We strive to deliver the best gaming experiences... on the internet and on your mobile phone. Play thousands of free online games, get access to free mmorpg games, online rpg games, fun online flash games, and more.
We offer free flash games in many different genres: online shooting games, online puzzle games, online war games, free online car games, free online hidden object games and dozens more.
This is the best place on the web to play online games for free... play on Armor Games! No matter what game style you prefer, we've got it here.
Gaming websites, passionate bloggers, and quirky streamers are welcome to share or review our games. If you need game keys, art, trailers, screenshots or more check out our press kit website.
Game developer? Visit developers.armorgames.com to request AG developer status, find documentation on our APIs, and get access to our development environment. Let's make sweet, sweet games together.
Looking for a publishing partner that can help your app rocket to success? Contact the mobile team to learn more about how we can help!