I am a tyro who's operative for months on a diversion and now I've got
stranded on a problem.I am new to actionscript 3 though i learn fast.I can
bucket my menu shade ("startScreen.swf") into my diversion (firstgame)
automatically and all works glorious when we click play or storyScreen or
instructionsScreen. But a problem is that we wish to relapse after dire
ESC button. we have attempted many formula though zero works accurately
how we want. Example: we click on story and a swf (storyScreen.swf) loads
and we can review a story and when we am finished, we wish to press ESC to
reload my swf (startScreen.swf) and all a functions in it. Like play and
instructions. You can find my formula and lifeless space in a duty (esc).
we know it is maybe easy to solve though we unequivocally don't know how.
:(public category FirstGame extends MovieClip{ open var
Player:MovieClip private var leftKeyIsDown:Boolean; private var
RightKeyIsDown:Boolean; private var aMissileArray:Array; private var
aEnemyArray:Array; open var scoreTxt:TextField; open var
ammoTxt:TextField; open var MenuEnd:EndGameScreen; open var
menuAgain:EndGameScreen; private var MenuStart:mcStartGameScreen;
private var MenuStory:mcStartGameScreen; private var
MenuInstructions:mcStartGameScreen; private var nScore:Number;
private var nAmmo:Number; private var tEnemyTimer:Timer; open duty
FirstGame() { //Create a loader vigilant var
startLoader:Loader = new Loader(); //add eventuality listener to
listen for a finish eventuality
startLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
startLoaded); //load the loader vigilant
startLoader.load(new URLRequest("startScreen.swf")); } open duty
startLoaded(e:Event):void { MenuEnd.hideScreen();
Player.visible = false; scoreTxt.visible = false;
ammoTxt.visible = false; //get a anxiety to a hallowed movieclip
MenuStart = e.target.content as mcStartGameScreen; //listen for
start diversion eventuality
MenuStart.addEventListener("START_GAME", playGameAgain); //add it
to a theatre addChild(MenuStart); //get a anxiety to a
hallowed movieclip MenuStory = e.target.content as
mcStartGameScreen; //listen for start diversion eventuality
MenuStory.addEventListener("SHOW_STORY", storyGameScreen); //add it
to a theatre addChild(MenuStory); //get a anxiety to a
hallowed movieclip MenuInstructions = e.target.content as
mcStartGameScreen; //listen for start diversion eventuality
MenuInstructions.addEventListener("SHOW_INSTRUCTIONS",
instructionsGameScreen); //add it to a theatre
addChild(MenuInstructions); } private duty
instructionsGameScreen(e:Event):void { var
instructionsLoader:Loader = new Loader(); var url:URLRequest = new
URLRequest("instructionsScreen.swf"); instructionsLoader.load(url);
addChild(instructionsLoader);
stage.addEventListener(KeyboardEvent.KEY_UP, esc); } private duty
storyGameScreen(e:Event):void { var storyLoader:Loader = new
Loader(); var url:URLRequest = new URLRequest("storyScreen.swf");
storyLoader.load(url); addChild(storyLoader);
stage.addEventListener(KeyboardEvent.KEY_UP, esc); } private duty
esc(e:KeyboardEvent):void { if (e.keyCode == 27) {
//fscommand("quit"); /////////test//////////////////(new
URLRequest(stage.loaderInfo.url), "FirstGame.swf"); } }
private duty playGameAgain(e:Event):void { //initialize
variables aMissileArray = new Array(); aEnemyArray = new
Array(); nScore = 0; nAmmo = 20; Player.x = 262,95
Player.y = 323,30 Player.visible = true;
scoreTxt.visible = true; ammoTxt.visible = true;
MenuStart.hideScreen(); MenuEnd.addEventListener("PLAY_AGAIN",
playGameAgain); MenuEnd.hideScreen(); updateScoreText();
updateAmmoText(); //trace("First Game Loaded");
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, keyUp);
stage.addEventListener(Event.ENTER_FRAME, gameLoop) //creat an
timer vigilant tEnemyTimer = new Timer(1000) //listen for a
timer ticks/intervals
tEnemyTimer.addEventListener(TimerEvent.TIMER, addEnemy) //start
the timer tEnemyTimer.start(); }
Tuesday, 8 April 2014
Friday, 4 April 2014
PHP MySql Time container search
I've been perplexing to find a giveaway timeslots of generation 60 min
between 9:00 and 17:00 from a list carrying 3 columns (user_id,
start_time, end_time), though somehow amateurish to get it work.I've
wholly one list 'timing' where I'm storing all requisitioned slots. Assume
all entries are for a day only.Select a.id, a.end_hour AS `Free time
Start`, IFNULL(la.start_hour,a.end_hour) AS `Free Time End`,
IFNULL(TIMEDIFF(la.start_hour, a.end_hour),'00:00:00') AS `Total Free
Time`FROM timing AS a LEFT JOIN (SELECT * FROM timing LIMIT
1,18446744073709551615) AS la ON la.id = (SELECT MIN(id) FROM timing
where (id > a.id AND user_id = a.user_id) LIMIT 1)WHERE a.user_id = 2;With
this, I'm means to find all giveaway slots in between indeed used slots.
we need assistance on twin points1. How to consolidate start and finish
time of day (9:00 and 17:00, respectively). So, if initial indifferent
container starts during 10:00, 9:00-10:00 is also a giveaway slot2. How to
separate giveaway time in bound generation slots (say 1 hour)Thanks!
between 9:00 and 17:00 from a list carrying 3 columns (user_id,
start_time, end_time), though somehow amateurish to get it work.I've
wholly one list 'timing' where I'm storing all requisitioned slots. Assume
all entries are for a day only.Select a.id, a.end_hour AS `Free time
Start`, IFNULL(la.start_hour,a.end_hour) AS `Free Time End`,
IFNULL(TIMEDIFF(la.start_hour, a.end_hour),'00:00:00') AS `Total Free
Time`FROM timing AS a LEFT JOIN (SELECT * FROM timing LIMIT
1,18446744073709551615) AS la ON la.id = (SELECT MIN(id) FROM timing
where (id > a.id AND user_id = a.user_id) LIMIT 1)WHERE a.user_id = 2;With
this, I'm means to find all giveaway slots in between indeed used slots.
we need assistance on twin points1. How to consolidate start and finish
time of day (9:00 and 17:00, respectively). So, if initial indifferent
container starts during 10:00, 9:00-10:00 is also a giveaway slot2. How to
separate giveaway time in bound generation slots (say 1 hour)Thanks!
Tuesday, 1 April 2014
Ajax calm modernise with id parameter
I'm perplexing to emanate a duty that get component value from symbol and
emanate ajax request. At a beggining 'id' is lifeless so a JS duty next
should use 'id=1' though when we click on a symbol with e.g. value "2"
duty should bucket "includes/agallery.php?id=2" to my #agallery. var id
= 1; $('#agallery').html('Downloading...'); // Show "Downloading..."
// Do an ajax ask $.ajax({ url: "includes/agallery.php?id="+id
}).done(function(data) { // information what is sent behind by a php page
$('#agallery').html(data); // arrangement information });
emanate ajax request. At a beggining 'id' is lifeless so a JS duty next
should use 'id=1' though when we click on a symbol with e.g. value "2"
duty should bucket "includes/agallery.php?id=2" to my #agallery. var id
= 1; $('#agallery').html('Downloading...'); // Show "Downloading..."
// Do an ajax ask $.ajax({ url: "includes/agallery.php?id="+id
}).done(function(data) { // information what is sent behind by a php page
$('#agallery').html(data); // arrangement information });
Subscribe to:
Comments (Atom)