My class is below. The FLA just has the demo scroll panel skin, only I
made the base class TextPanel.
thank you!
/ben
package myapp.view
{
import com.bumpslide.ui.TextPanel;
import com.greensock.TweenMax;
import flash.display.MovieClip;
import flash.events.MouseEvent;
import myapp.data.DataService;
public class HelpWindow extends AppComponent
{
public var closeBtn:MovieClip;
private var customPanel:TextPanel;
override protected function addChildren():void
{
super.addChildren();
closeBtn.addEventListener(MouseEvent.CLICK, closeBtnClick, false,
0, true);
closeBtn.mouseChildren = false;
closeBtn.buttonMode = true;
customPanel = new CustomPanel();
addChild(customPanel);
model.bind('showHelpWindow', this);
model.bind('services', this);
}
public function set showHelpWindow(data:Boolean):void
{
if (data) {
TweenMax.to(this, .5, {autoAlpha:1});
model.showFilterCats = false;
} else {
TweenMax.to(this, .5, {autoAlpha:0});
}
}
public function set services(data:DataService):void
{
if (data) {
customPanel.htmlText = data.help_text;
invalidate();
}
}
private function closeBtnClick(event:MouseEvent):void
{
model.showHelpWindow = false;
}
override protected function draw():void
{
var hPad:int = 80;
var vPad:int = 50;
customPanel.move(hPad, vPad);
customPanel.setSize(width - hPad*2, height - vPad*2);
super.draw();
}
}
}
BTW I am compiling with Flash CS4.
Thanks,
Ben
--
--
Bumpslide Mailing List
http://groups.google.com/group/bumpslide
To post to this group, send email to bump...@googlegroups.com
To unsubscribe from this group, send email to
bumpslide+...@googlegroups.com
To unsubscribe from this group, send email to bumpslide+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
Thanks!
/ben
> >> bumpslide+...@googlegroups.com<bumpslide%2Bunsubscribe@googlegroups .com>
>
> >> To unsubscribe from this group, send email to bumpslide+
To unsubscribe from this group, send email to bumpslide+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.