mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-20 17:37:50 -05:00
Brought up to date with the private repository (feea4c7)
This commit is contained in:
1 parent
1aa738d692
commit
1b1df1ae48
7925 files changed
+2617237
-20
No files matched your search
@@ -0,0 +1,129 @@
|
||||
package createAccountGui
|
||||
{
|
||||
import com.sbi.popup.SBScreen;
|
||||
import com.sbi.popup.SBWizard;
|
||||
import createAccountFlow.CreateAccountGui;
|
||||
import flash.display.MovieClip;
|
||||
import flash.events.Event;
|
||||
import flash.events.MouseEvent;
|
||||
import flash.text.TextField;
|
||||
import gui.DarkenManager;
|
||||
import gui.GuiCheckBox;
|
||||
|
||||
public class GuiRulesScreen extends SBScreen
|
||||
{
|
||||
|
||||
private var _login:Object;
|
||||
|
||||
private var _rulesScreen:MovieClip;
|
||||
|
||||
private var _fullRulesTxt:TextField;
|
||||
|
||||
private var _rulesVoBtn:MovieClip;
|
||||
|
||||
private var _checkBox:GuiCheckBox;
|
||||
|
||||
public function GuiRulesScreen(param1:Object, param2:SBWizard)
|
||||
{
|
||||
this._login = param1;
|
||||
this._rulesScreen = param1.accountCreation.registrationPanel.rules_popup;
|
||||
this._checkBox = new GuiCheckBox(this._rulesScreen.agree_box,this.onAgreeChecked);
|
||||
this._fullRulesTxt = this._rulesScreen.pp_txt;
|
||||
this._rulesVoBtn = this._rulesScreen.vo_btn;
|
||||
super(this._rulesScreen,param2);
|
||||
}
|
||||
|
||||
public function init() : void
|
||||
{
|
||||
onEnterFromPrev = this.enterFromBoth;
|
||||
onEnterFromNext = this.enterFromBoth;
|
||||
onLeaveToPrev = this.leaveToBoth;
|
||||
onLeaveToNext = null;
|
||||
onPlay = this.onPlayBtn;
|
||||
this._fullRulesTxt.htmlText = "<a href=\'http://animaljam.com/terms_of_service\' target=\'_blank\'><u>" + this._fullRulesTxt.text + "</u></a>";
|
||||
this._rulesVoBtn.stop();
|
||||
this._rulesVoBtn.addEventListener(MouseEvent.MOUSE_DOWN,this.voBtnClickHandler,false,0,true);
|
||||
this._checkBox.init(this._rulesScreen.agree_txt);
|
||||
this._checkBox.checked = false;
|
||||
}
|
||||
|
||||
override public function destroy() : void
|
||||
{
|
||||
this._rulesVoBtn.removeEventListener(MouseEvent.MOUSE_DOWN,this.voBtnClickHandler);
|
||||
this._checkBox.destroy();
|
||||
this._checkBox = null;
|
||||
super.destroy();
|
||||
}
|
||||
|
||||
public function enterFromBoth() : void
|
||||
{
|
||||
CreateAccountGui.trackUserCreateAccountPageChange("Rules");
|
||||
CreateAccountGui.vo5Sound.play();
|
||||
if(CreateAccountGui.vo5Sound.sc)
|
||||
{
|
||||
CreateAccountGui.vo5Sound.sc.addEventListener(Event.SOUND_COMPLETE,this.stopRulesVO,false,0,true);
|
||||
this._rulesVoBtn.play();
|
||||
}
|
||||
MovieClip(this._rulesScreen.parent).gotoAndPlay("playAJRules");
|
||||
MovieClip(this._rulesScreen.parent.parent).bg[CreateAccountGui.currBG() + "Bg"].gotoAndPlay("playAJRules");
|
||||
MovieClip(this._rulesScreen.parent.parent).next_btn.visible = false;
|
||||
MovieClip(this._rulesScreen.parent.parent).play_btn.visible = this._checkBox.checked;
|
||||
}
|
||||
|
||||
public function leaveToBoth() : Boolean
|
||||
{
|
||||
MovieClip(this._rulesScreen.parent.parent).next_btn.visible = true;
|
||||
MovieClip(this._rulesScreen.parent.parent).play_btn.visible = false;
|
||||
CreateAccountGui.vo5Sound.stop();
|
||||
this._rulesVoBtn.stop();
|
||||
this._rulesVoBtn.gotoAndStop(1);
|
||||
MovieClip(this._rulesScreen.parent).gotoAndPlay("backAJRules");
|
||||
MovieClip(this._rulesScreen.parent.parent).bg[CreateAccountGui.currBG() + "Bg"].gotoAndPlay("backAJRules");
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onPlayBtn() : void
|
||||
{
|
||||
DarkenManager.showLoadingSpiral(true);
|
||||
CreateAccountGui.vo5Sound.stop();
|
||||
this._rulesVoBtn.stop();
|
||||
this._rulesVoBtn.gotoAndStop(1);
|
||||
this._login.createNewAccountSetup(CreateAccountGui.currEmailAddress(),CreateAccountGui.emailValidationCallback());
|
||||
}
|
||||
|
||||
private function voBtnClickHandler(param1:MouseEvent) : void
|
||||
{
|
||||
if(CreateAccountGui.vo5Sound.isPlaying)
|
||||
{
|
||||
CreateAccountGui.vo5Sound.stop();
|
||||
this._rulesVoBtn.stop();
|
||||
this._rulesVoBtn.gotoAndStop(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
CreateAccountGui.vo5Sound.play();
|
||||
if(CreateAccountGui.vo5Sound.sc)
|
||||
{
|
||||
CreateAccountGui.vo5Sound.sc.addEventListener(Event.SOUND_COMPLETE,this.stopRulesVO,false,0,true);
|
||||
this._rulesVoBtn.play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function stopRulesVO(param1:Event) : void
|
||||
{
|
||||
if(CreateAccountGui)
|
||||
{
|
||||
CreateAccountGui.vo5Sound.stop();
|
||||
}
|
||||
this._rulesVoBtn.stop();
|
||||
this._rulesVoBtn.gotoAndStop(1);
|
||||
}
|
||||
|
||||
private function onAgreeChecked() : void
|
||||
{
|
||||
MovieClip(this._rulesScreen.parent.parent).play_btn.visible = this._checkBox.checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user