| 19 | | description.text = p_args.description.replace(/\r\n/g, "").replace(/\r/g, "").replace(/\n/g, ""); |
|---|
| | 15 | title.autoSize = TextFieldAutoSize.LEFT; |
|---|
| | 16 | description.autoSize = TextFieldAutoSize.LEFT; |
|---|
| | 17 | description.text = p_args.description |
|---|
| | 18 | .replace(/\r\n/g, "\n") |
|---|
| | 19 | .replace(/\r/g, "\n") |
|---|
| | 20 | .split("\n") |
|---|
| | 21 | .join('') |
|---|
| | 22 | .substr(0, 100) + '...'; |
|---|
| | 23 | } |
|---|
| | 24 | |
|---|
| | 25 | override protected function wakeUp(evt:Event):void |
|---|
| | 26 | { |
|---|
| | 27 | addEventListener(Event.ENTER_FRAME, slideDescription, false, 0, true); |
|---|
| | 28 | super.wakeUp.call(this, evt); |
|---|
| | 29 | } |
|---|
| | 30 | |
|---|
| | 31 | private function slideDescription(evt:Event):void |
|---|
| | 32 | { |
|---|
| | 33 | description.x -= 5; |
|---|
| | 34 | if (Math.abs(description.x) > description.width) |
|---|
| | 35 | { |
|---|
| | 36 | parent.removeChild(this); |
|---|
| | 37 | } |
|---|
| | 38 | } |
|---|
| | 39 | |
|---|
| | 40 | override protected function sleep(evt:Event):void |
|---|
| | 41 | { |
|---|
| | 42 | removeEventListener(Event.ENTER_FRAME, slideDescription, false); |
|---|
| | 43 | super.sleep.call(this, evt); |
|---|