
here is the code. maybe someone knows an answer. I left the irrelevant code aside, so that the post is not too long. Thanks a lot!!!
I habve got a main as file with this:
private function _configUI():void{
_header =HeaderUI.getInstance(this);
addChild(_header);
_side= SideUI.getInstance(this);
addChild(_side);
_body= BodyUI.getInstance(this);
addChild(_body);
_footer=FooterUI.getInstance(this)
addChild(_footer);
_body.addEventListener (BodyOpenEvent.OPEN, _body.bodyOpen, false, 0.0, true);
_
}a header as with this:
private function _configUI():void {
bg = new HeaderBG();
addChild(bg);
title = new HeaderTitle();
addChild(title);
title.x=17;
title.y=12;
title.buttonMode=true;
title.addEventListener(MouseEvent.CLICK, _bodyOpen, false, 0.0, true);
}
public function _bodyOpen(event:MouseEvent):void{
dispatchEvent (new BodyOpenEvent(BodyOpenEvent.OPEN, false, true));
}
an BodOpenEvent with this code:
package com.gui.events{
import flash.events.*;
public class BodyOpenEvent extends Event {
public static const OPEN:String="open";
public function BodyOpenEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) {
super (type, bubbles, cancelable);
}
}
}
and the bodyUi witch contains this:
import com.gui.events.BodyOpenEvent;
public function bodyOpen(event:BodyOpenEvent):void{
/*_bodyOpen =new Tween(bg,"x",Elastic.easeIn,0,100,2,true);*/
bg.x=100;
}
If you would like to make a comment, please fill out the form below.
Recent Comments