| 45 | | $movie->frame_action(1)->compile( <<AS_END ); |
|---|
| 46 | | this.page=0; |
|---|
| 47 | | nextPage(); |
|---|
| 48 | | _root.pre_mc._visible=false; |
|---|
| 49 | | function nextPage(){ |
|---|
| 50 | | var title_name = 'title_text' + this.page.toString(); |
|---|
| 51 | | var entry_name = 'entry_text' + this.page.toString(); |
|---|
| 52 | | this[title_name].onEnterFrame=function(){} |
|---|
| 53 | | this[title_name]._alpha=0; |
|---|
| 54 | | this[title_name]._visible=false; |
|---|
| 55 | | this[entry_name].onEnterFrame=function(){} |
|---|
| 56 | | this[entry_name]._alpha=0; |
|---|
| 57 | | this[entry_name]._visible=false; |
|---|
| 58 | | |
|---|
| 59 | | this.page++; |
|---|
| 60 | | entry_name = 'entry_text' + this.page.toString(); |
|---|
| 61 | | title_name = 'title_text' + this.page.toString(); |
|---|
| 62 | | if(!this[entry_name]){ |
|---|
| 63 | | this.page=1; |
|---|
| 64 | | entry_name = 'entry_text' + this.page.toString(); |
|---|
| 65 | | title_name = 'title_text' + this.page.toString(); |
|---|
| 66 | | } |
|---|
| 67 | | this[entry_name].onEnterFrame=function(){ |
|---|
| 68 | | this._alpha+=6; |
|---|
| 69 | | this._visible=true; |
|---|
| 70 | | } |
|---|
| 71 | | this[title_name].onEnterFrame=function(){ |
|---|
| 72 | | this._alpha+=6; |
|---|
| 73 | | this._visible=true; |
|---|
| 74 | | } |
|---|
| 75 | | } |
|---|
| 76 | | AS_END |
|---|
| 77 | | |
|---|
| 96 | | $self->create_page($movie, ++$page, $entry->title, $entry->body_text); |
|---|
| 97 | | } |
|---|
| | 63 | $self->create_page($movie, ++$page, $entry->title_text, $entry->body_text); |
|---|
| | 64 | } |
|---|
| | 65 | |
|---|
| | 66 | $movie->frame_action(1)->compile( <<AS_END ); |
|---|
| | 67 | this.page = 0; |
|---|
| | 68 | this.total = $page; |
|---|
| | 69 | nextPage(); |
|---|
| | 70 | _root.pre_mc._visible = false; |
|---|
| | 71 | oListener = new Object; |
|---|
| | 72 | oListener.onKeyDown = function () { |
|---|
| | 73 | if(Key.isDown(74)){ |
|---|
| | 74 | _root.nextPage(); |
|---|
| | 75 | } |
|---|
| | 76 | if(Key.isDown(75)){ |
|---|
| | 77 | _root.prePage(); |
|---|
| | 78 | } |
|---|
| | 79 | } |
|---|
| | 80 | Key.addListener(oListener); |
|---|
| | 81 | function prePage() { |
|---|
| | 82 | this._hidePage(); |
|---|
| | 83 | this.page--; |
|---|
| | 84 | entry_name = 'entry_text' + this.page.toString(); |
|---|
| | 85 | title_name = 'title_text' + this.page.toString(); |
|---|
| | 86 | if(!this[entry_name]){ |
|---|
| | 87 | this.page = this.total; |
|---|
| | 88 | entry_name = 'entry_text' + this.page.toString(); |
|---|
| | 89 | title_name = 'title_text' + this.page.toString(); |
|---|
| | 90 | } |
|---|
| | 91 | this[entry_name].onEnterFrame = function () { |
|---|
| | 92 | this._alpha += 6; |
|---|
| | 93 | this._visible = true; |
|---|
| | 94 | } |
|---|
| | 95 | this[title_name].onEnterFrame = function () { |
|---|
| | 96 | this._alpha += 6; |
|---|
| | 97 | this._visible = true; |
|---|
| | 98 | } |
|---|
| | 99 | this[title_name].play(); |
|---|
| | 100 | this[entry_name].play(); |
|---|
| | 101 | } |
|---|
| | 102 | function nextPage() { |
|---|
| | 103 | this._hidePage(); |
|---|
| | 104 | this.page++; |
|---|
| | 105 | entry_name = 'entry_text' + this.page.toString(); |
|---|
| | 106 | title_name = 'title_text' + this.page.toString(); |
|---|
| | 107 | if(!this[entry_name]){ |
|---|
| | 108 | this.page = 1; |
|---|
| | 109 | entry_name = 'entry_text' + this.page.toString(); |
|---|
| | 110 | title_name = 'title_text' + this.page.toString(); |
|---|
| | 111 | } |
|---|
| | 112 | this[entry_name].onEnterFrame = function () { |
|---|
| | 113 | this._alpha += 6; |
|---|
| | 114 | this._visible = true; |
|---|
| | 115 | } |
|---|
| | 116 | this[title_name].onEnterFrame = function () { |
|---|
| | 117 | this._alpha += 6; |
|---|
| | 118 | this._visible = true; |
|---|
| | 119 | } |
|---|
| | 120 | this[title_name].play(); |
|---|
| | 121 | this[entry_name].play(); |
|---|
| | 122 | } |
|---|
| | 123 | function _hidePage() { |
|---|
| | 124 | var title_name = 'title_text' + this.page.toString(); |
|---|
| | 125 | var entry_name = 'entry_text' + this.page.toString(); |
|---|
| | 126 | this[title_name].onEnterFrame = function () {} |
|---|
| | 127 | this[title_name]._alpha = 0; |
|---|
| | 128 | this[title_name]._visible = false; |
|---|
| | 129 | this[title_name].stop(); |
|---|
| | 130 | this[entry_name].onEnterFrame = function () {} |
|---|
| | 131 | this[entry_name]._alpha = 0; |
|---|
| | 132 | this[entry_name]._visible = false; |
|---|
| | 133 | this[entry_name].stop(); |
|---|
| | 134 | } |
|---|
| | 135 | AS_END |
|---|