SlideShare une entreprise Scribd logo
1  sur  16
Télécharger pour lire hors ligne
Adobe MAX 2009




JSplash   swf to javascript converter

                           Satoshi Ueyama
                                        id:gyuque
JSplashとは?
JSplashとは何か?

SWFムービーをJavascriptとSVGだけで再生するツール




               とりあえずデモ
詳細

SWF


       変換ツール

               SVG生成
JSON

       プレーヤー    タグ実行


               スクリプト変換
タグの例
                                       シェイプ定義
{
 tag:JSplash.tDefineShape,
 id: 1,
                                                       塗色
 bounds:{L:2374,R:8582,T:1744,B:5660},
 fill_styles:[
  {rgb:'000099'},{rgb:'6666cc'},{rgb:'ff6699'}
 ],
 line_styles:[ {w:20,rgb:‘ffffff’},{w:20,rgb:‘000000’},{w:20,rgb:‘000000‘} ],
 shape:[
{t:0,p:[6218,2895],f1:3,ls:2},{t:1,p:[290,-501]},{t:1,p:[2064,1192]},{t:1,p:[-
1192,2064]},{t:1,p:[-1162,-671]},{t:0,f1:1},{t:1,p:[0,609]},{t:1,p:[-
3834,0]},{t:1,p:[0,-
3834]},{t:1,p:[3834,0]},{t:1,p:[0,1141]},{t:0,f0:3,f1:2},{t:1,p:[0,2084]},{t:0,f0:1},{t
:1,p:[-902,-521]},{t:1,p:[902,-1563]},{t:0}
]
}
                                                          シェイプデータ
シェイプの描画例
                                              「左側塗り」なし
                                 始点
{t:0,p:[6218,2895],f1:3,ls:2},
{t:1,p:[290,-501]},
                                   「右側塗り」設定
{t:1,p:[2064,1192]},
{t:1,p:[-1192,2064]},
{t:1,p:[-1162,-671]},
                                 「右側塗り」設定
{t:0, f1:1},
{t:1,p:[0,609]}
・
・
Official Flash Player




JSplash
本日のデモ
http://gyu.que.jp/max/
        small G   small Q
詳細

SWF


       変換ツール

                            SVG生成
JSON

       プレーヤー                タグ実行


                           スクリプト変換


       JSplashは、バーチャルマシンではありません。
       JSplashは、ActionScriptインタプリタではありません。
もう少し詳しく

SWF
                 Flare
        変換ツール

      逆コンパイルされたソース


        プレーヤー

                           スクリプト変換




                     ブラウザのJSエンジン
スクリプト(無理矢理)変換エンジン
function () {                               function () {
  var count;                                  var count = this.__locals__.count;
  if (!count) {                               with (this) {
      count = 0;                                 var count;
  }                                              if (!count) {
  if (count == 2) {                                  count = 0;
      _parent.gotoAndStop(3);                    }
  }                                              if (count == 2) {
  if (++count > 4) {                                 _parent.gotoAndStop(3);
      this.onEnterFrame = function () {if        }
(++count == 8) {_parent.doNext();}};             if (++count > 4) {
      stop();                                        this.onEnterFrame = function () {if
  }                                         (++count == 8) {_parent.doNext();}};
}                                                    stop();
                                                 }
                                              }


Before                                                                  After
                                              this.__locals__.count = count;
                                            }
AS→JS (1)
ローカル変数の「またぎ」


       Frame 1         Frame 2          Frame 3



         var a = 5;     trace(++a);      trace(++a);




                                 6                7
       function() {}    function() {}     function() {}


               保存      復帰        保存     復帰
AS→JS (2)
this / global
                     ムービークリップのふりをする
                     オブジェクトを bind



                          ムービークリップへの参照


                                this._x = 0;
                                v = $version;

                Global   グローバルへの参照

                          function() {}

                              var
こんなんでいいのか?



    意外と何とかなりました。



       デモ 「Elastic Santa」
          by Takayuki Fukatsu
thank you
http://www.libspark.org/svn/ruby/jsplash/trunk/

Contenu connexe

En vedette

to touch someone's heart with design
to touch someone's heart with designto touch someone's heart with design
to touch someone's heart with designJeet Pal
 
123 greetings.com app case study
123 greetings.com app case study123 greetings.com app case study
123 greetings.com app case studyJeet Pal
 
JUI 2009 O3D Programming
JUI 2009 O3D ProgrammingJUI 2009 O3D Programming
JUI 2009 O3D Programminggyuque
 
第11回 HTML5とか勉強会 gyuque
第11回 HTML5とか勉強会 gyuque第11回 HTML5とか勉強会 gyuque
第11回 HTML5とか勉強会 gyuquegyuque
 
LL Tiger 2010 (LTの虎 1)
LL Tiger 2010 (LTの虎 1)LL Tiger 2010 (LTの虎 1)
LL Tiger 2010 (LTの虎 1)gyuque
 
ASCSS Nite
ASCSS NiteASCSS Nite
ASCSS Nitegyuque
 
Kordamiseks NäGemisest & Kuulmisest
Kordamiseks NäGemisest & KuulmisestKordamiseks NäGemisest & Kuulmisest
Kordamiseks NäGemisest & Kuulmisestguest7ed5b4
 

En vedette (7)

to touch someone's heart with design
to touch someone's heart with designto touch someone's heart with design
to touch someone's heart with design
 
123 greetings.com app case study
123 greetings.com app case study123 greetings.com app case study
123 greetings.com app case study
 
JUI 2009 O3D Programming
JUI 2009 O3D ProgrammingJUI 2009 O3D Programming
JUI 2009 O3D Programming
 
第11回 HTML5とか勉強会 gyuque
第11回 HTML5とか勉強会 gyuque第11回 HTML5とか勉強会 gyuque
第11回 HTML5とか勉強会 gyuque
 
LL Tiger 2010 (LTの虎 1)
LL Tiger 2010 (LTの虎 1)LL Tiger 2010 (LTの虎 1)
LL Tiger 2010 (LTの虎 1)
 
ASCSS Nite
ASCSS NiteASCSS Nite
ASCSS Nite
 
Kordamiseks NäGemisest & Kuulmisest
Kordamiseks NäGemisest & KuulmisestKordamiseks NäGemisest & Kuulmisest
Kordamiseks NäGemisest & Kuulmisest
 

Similaire à JSplash - Adobe MAX 2009

JSARToolKit / LiveChromaKey / LivePointers - Next gen of AR
JSARToolKit / LiveChromaKey / LivePointers - Next gen of ARJSARToolKit / LiveChromaKey / LivePointers - Next gen of AR
JSARToolKit / LiveChromaKey / LivePointers - Next gen of ARYusuke Kawasaki
 
【12-B-4】 並列処理開発を支援するコンパイラの機能
【12-B-4】 並列処理開発を支援するコンパイラの機能【12-B-4】 並列処理開発を支援するコンパイラの機能
【12-B-4】 並列処理開発を支援するコンパイラの機能devsumi2009
 
How To Create Custom DSLs By PHP
How To Create Custom DSLs By PHPHow To Create Custom DSLs By PHP
How To Create Custom DSLs By PHPAtsuhiro Kubo
 
ブラウザでMap Reduce風味の並列分散処理
ブラウザでMap Reduce風味の並列分散処理ブラウザでMap Reduce風味の並列分散処理
ブラウザでMap Reduce風味の並列分散処理Shinya Miyazaki
 
20090418 イケテルRails勉強会 第1部Rails編
20090418 イケテルRails勉強会 第1部Rails編20090418 イケテルRails勉強会 第1部Rails編
20090418 イケテルRails勉強会 第1部Rails編mochiko AsTech
 
樽家昌也 (日本Rubyの会)
樽家昌也 (日本Rubyの会) 樽家昌也 (日本Rubyの会)
樽家昌也 (日本Rubyの会) toRuby
 
GAE/J 開発環境でJDO入門
GAE/J 開発環境でJDO入門GAE/J 開発環境でJDO入門
GAE/J 開発環境でJDO入門bose999
 
とちぎRuby会議01(原)
とちぎRuby会議01(原)とちぎRuby会議01(原)
とちぎRuby会議01(原)Shin-ichiro HARA
 
Swap Skills I Phone
Swap Skills I PhoneSwap Skills I Phone
Swap Skills I PhoneSwapSkills
 
20090418 イケテルRails勉強会 第2部Air編
20090418 イケテルRails勉強会 第2部Air編20090418 イケテルRails勉強会 第2部Air編
20090418 イケテルRails勉強会 第2部Air編mochiko AsTech
 
Y Map Mashup Camp
Y Map Mashup CampY Map Mashup Camp
Y Map Mashup CampJinho Jung
 
Top 10 php classic traps confoo
Top 10 php classic traps confooTop 10 php classic traps confoo
Top 10 php classic traps confooDamien Seguy
 
技術トレンディセミナー フレームワークとしてのTrac
技術トレンディセミナー フレームワークとしてのTrac技術トレンディセミナー フレームワークとしてのTrac
技術トレンディセミナー フレームワークとしてのTracterada
 

Similaire à JSplash - Adobe MAX 2009 (20)

Jslunch6
Jslunch6Jslunch6
Jslunch6
 
JSARToolKit / LiveChromaKey / LivePointers - Next gen of AR
JSARToolKit / LiveChromaKey / LivePointers - Next gen of ARJSARToolKit / LiveChromaKey / LivePointers - Next gen of AR
JSARToolKit / LiveChromaKey / LivePointers - Next gen of AR
 
【12-B-4】 並列処理開発を支援するコンパイラの機能
【12-B-4】 並列処理開発を支援するコンパイラの機能【12-B-4】 並列処理開発を支援するコンパイラの機能
【12-B-4】 並列処理開発を支援するコンパイラの機能
 
Ruby Postgres
Ruby PostgresRuby Postgres
Ruby Postgres
 
object-shapes
object-shapesobject-shapes
object-shapes
 
How To Create Custom DSLs By PHP
How To Create Custom DSLs By PHPHow To Create Custom DSLs By PHP
How To Create Custom DSLs By PHP
 
ブラウザでMap Reduce風味の並列分散処理
ブラウザでMap Reduce風味の並列分散処理ブラウザでMap Reduce風味の並列分散処理
ブラウザでMap Reduce風味の並列分散処理
 
20090418 イケテルRails勉強会 第1部Rails編
20090418 イケテルRails勉強会 第1部Rails編20090418 イケテルRails勉強会 第1部Rails編
20090418 イケテルRails勉強会 第1部Rails編
 
樽家昌也 (日本Rubyの会)
樽家昌也 (日本Rubyの会) 樽家昌也 (日本Rubyの会)
樽家昌也 (日本Rubyの会)
 
Programming JNI
Programming JNIProgramming JNI
Programming JNI
 
S2Flex2
S2Flex2S2Flex2
S2Flex2
 
GAE/J 開発環境でJDO入門
GAE/J 開発環境でJDO入門GAE/J 開発環境でJDO入門
GAE/J 開発環境でJDO入門
 
Grails紹介
Grails紹介Grails紹介
Grails紹介
 
とちぎRuby会議01(原)
とちぎRuby会議01(原)とちぎRuby会議01(原)
とちぎRuby会議01(原)
 
Swap Skills I Phone
Swap Skills I PhoneSwap Skills I Phone
Swap Skills I Phone
 
20090418 イケテルRails勉強会 第2部Air編
20090418 イケテルRails勉強会 第2部Air編20090418 イケテルRails勉強会 第2部Air編
20090418 イケテルRails勉強会 第2部Air編
 
Y Map Mashup Camp
Y Map Mashup CampY Map Mashup Camp
Y Map Mashup Camp
 
Android Animation (in tamil)
Android Animation (in tamil)Android Animation (in tamil)
Android Animation (in tamil)
 
Top 10 php classic traps confoo
Top 10 php classic traps confooTop 10 php classic traps confoo
Top 10 php classic traps confoo
 
技術トレンディセミナー フレームワークとしてのTrac
技術トレンディセミナー フレームワークとしてのTrac技術トレンディセミナー フレームワークとしてのTrac
技術トレンディセミナー フレームワークとしてのTrac
 

Dernier

Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jNeo4j
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...FIDO Alliance
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...ScyllaDB
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfUK Journal
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftshyamraj55
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Hiroshi SHIBATA
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 

Dernier (20)

Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 

JSplash - Adobe MAX 2009

  • 1. Adobe MAX 2009 JSplash swf to javascript converter Satoshi Ueyama id:gyuque
  • 3.
  • 4. 詳細 SWF 変換ツール SVG生成 JSON プレーヤー タグ実行 スクリプト変換
  • 5. タグの例 シェイプ定義 { tag:JSplash.tDefineShape, id: 1, 塗色 bounds:{L:2374,R:8582,T:1744,B:5660}, fill_styles:[ {rgb:'000099'},{rgb:'6666cc'},{rgb:'ff6699'} ], line_styles:[ {w:20,rgb:‘ffffff’},{w:20,rgb:‘000000’},{w:20,rgb:‘000000‘} ], shape:[ {t:0,p:[6218,2895],f1:3,ls:2},{t:1,p:[290,-501]},{t:1,p:[2064,1192]},{t:1,p:[- 1192,2064]},{t:1,p:[-1162,-671]},{t:0,f1:1},{t:1,p:[0,609]},{t:1,p:[- 3834,0]},{t:1,p:[0,- 3834]},{t:1,p:[3834,0]},{t:1,p:[0,1141]},{t:0,f0:3,f1:2},{t:1,p:[0,2084]},{t:0,f0:1},{t :1,p:[-902,-521]},{t:1,p:[902,-1563]},{t:0} ] } シェイプデータ
  • 6. シェイプの描画例 「左側塗り」なし 始点 {t:0,p:[6218,2895],f1:3,ls:2}, {t:1,p:[290,-501]}, 「右側塗り」設定 {t:1,p:[2064,1192]}, {t:1,p:[-1192,2064]}, {t:1,p:[-1162,-671]}, 「右側塗り」設定 {t:0, f1:1}, {t:1,p:[0,609]} ・ ・
  • 7.
  • 10. 詳細 SWF 変換ツール SVG生成 JSON プレーヤー タグ実行 スクリプト変換 JSplashは、バーチャルマシンではありません。 JSplashは、ActionScriptインタプリタではありません。
  • 11. もう少し詳しく SWF Flare 変換ツール 逆コンパイルされたソース プレーヤー スクリプト変換 ブラウザのJSエンジン
  • 12. スクリプト(無理矢理)変換エンジン function () { function () { var count; var count = this.__locals__.count; if (!count) { with (this) { count = 0; var count; } if (!count) { if (count == 2) { count = 0; _parent.gotoAndStop(3); } } if (count == 2) { if (++count > 4) { _parent.gotoAndStop(3); this.onEnterFrame = function () {if } (++count == 8) {_parent.doNext();}}; if (++count > 4) { stop(); this.onEnterFrame = function () {if } (++count == 8) {_parent.doNext();}}; } stop(); } } Before After this.__locals__.count = count; }
  • 13. AS→JS (1) ローカル変数の「またぎ」 Frame 1 Frame 2 Frame 3 var a = 5; trace(++a); trace(++a); 6 7 function() {} function() {} function() {} 保存 復帰 保存 復帰
  • 14. AS→JS (2) this / global ムービークリップのふりをする オブジェクトを bind ムービークリップへの参照 this._x = 0; v = $version; Global グローバルへの参照 function() {} var
  • 15. こんなんでいいのか? 意外と何とかなりました。 デモ 「Elastic Santa」 by Takayuki Fukatsu