チェンジセット 1517
- コミット日時:
- 2008/10/05 05:34:33 (3 年前)
- ファイル:
-
- ruby/jsplash/trunk/client2/index.xml (更新) (1 diff)
- ruby/jsplash/trunk/client2/jsplash/executor.js (更新) (1 diff)
- ruby/jsplash/trunk/client2/jsplash/objects.js (更新) (6 diffs)
- ruby/jsplash/trunk/client2/jsplash/player.js (更新) (3 diffs)
- ruby/jsplash/trunk/client2/rocket_demo (追加)
- ruby/jsplash/trunk/client2/rocket_demo.xml (追加)
- ruby/jsplash/trunk/client2/rocket_demo/asblock.js (追加)
- ruby/jsplash/trunk/client2/rocket_demo/movie1.js (追加)
- ruby/jsplash/trunk/client2/rocket_demo/original (追加)
- ruby/jsplash/trunk/client2/rocket_demo/original/rocket.swf (追加)
- ruby/jsplash/trunk/client2/rocket_demo_fl.html (追加)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
ruby/jsplash/trunk/client2/index.xml
r1499 r1517 54 54 <div id="progbar"><div> </div></div> 55 55 <p id="statusout"> </p> 56 <p id="sout"><em>JSplash Player</em> 0.4. 3<br />-------------------------------------<br /></p>56 <p id="sout"><em>JSplash Player</em> 0.4.4<br />-------------------------------------<br /></p> 57 57 <svg id="svgrt" xmlns="http://www.w3.org/2000/svg" style="width: 100px; height: 100px;"> 58 58 </svg> ruby/jsplash/trunk/client2/jsplash/executor.js
r1499 r1517 114 114 mobj.doEnterFrame(); 115 115 } 116 116 117 JSplash.gPlayer.stage.leaveFrame(); 117 118 //////////////////////////////////// debug 118 119 { ruby/jsplash/trunk/client2/jsplash/objects.js
r1495 r1517 39 39 this.appended = false; 40 40 this.shape_disposed = false; 41 42 this.mousePos = {x:0, y:0}; 41 43 42 44 this.framePersists = {}; … … 339 341 if (!skip_visual_change) 340 342 this.hideClippers(); 343 344 if (this.g && this.g.childNodes.length > 0) 345 this.updateProxy(); 341 346 }, 342 347 … … 399 404 400 405 doEnterFrame: function() { 406 if (!this.klass) 407 return; 408 var vlist = this.klass.getVarList(); 409 401 410 var handler = this.getProxy().onEnterFrame; 402 if (handler && this.klass) {411 if (handler) { 403 412 404 413 if (!handler._ai_) 405 414 handler._ai_ = new JSplash.ActionInstance(handler); 406 415 407 this.execScript(handler._ai_, this.klass.getVarList(), this.getProxy().onEnterFrame_env); 416 this.execScript(handler._ai_, vlist, this.getProxy().onEnterFrame_env); 417 } 418 419 // next, check mousedown 420 if (JSplash.gPlayer.stage.mouse_down) { 421 handler = this.getProxy().onMouseDown; 422 if (handler) { 423 if (!handler._ai_) 424 handler._ai_ = new JSplash.ActionInstance(handler); 425 426 this.execScript(handler._ai_, vlist); 427 } 408 428 } 409 429 }, … … 551 571 P._yscale = T.sy * 100.0; 552 572 P._rotation = T.r; 573 574 P._xmouse = this.mousePos.x; 575 P._ymouse = this.mousePos.y; 576 577 this.putViewSize(P); 578 }, 579 580 putViewSize: function(P) { 581 if (JSplash._bbox_implemented) { 582 try { 583 var b = this.g.getBBox(); 584 P._width = b.width; 585 P._height = b.height; 586 } catch(e) { 587 console.warn("This browser does not support SVG bounding box completely."); 588 JSplash._bbox_implemented = false; 589 } 590 } 553 591 }, 554 592 … … 588 626 var s = new JSplash.ObjectInstance(taglist, null, g); 589 627 s.label_map = label_map; 628 s.mouse_down = false; 590 629 591 630 Object.extend(s, { 592 631 registry: {}, 632 633 leaveFrame: function() { 634 this.mouse_down = false; 635 }, 636 637 setMouseDown: function() { 638 this.mouse_down = true; 639 }, 640 641 setMousePos: function(x, y) { 642 this.mousePos.x = x; 643 this.mousePos.y = y; 644 var P = this.getProxy(); 645 P._xmouse = x; 646 P._ymouse = y; 647 }, 593 648 594 649 setBackgroundColor: function(rgb) { … … 678 733 if (!this.onEnterFrame) 679 734 this.onEnterFrame = null; 735 if (!this.onMouseDown) 736 this.onMouseDown = null; 680 737 }, 681 738 ruby/jsplash/trunk/client2/jsplash/player.js
r1494 r1517 1 var JSplash = {swfdata: null, gPlayer: null };1 var JSplash = {swfdata: null, gPlayer: null, _bbox_implemented: true}; 2 2 if (!window.console) 3 3 window.console = {log:function(){}, warn:function(){}}; … … 28 28 } 29 29 30 svg.addEventListener("mousemove", this.onTopMouseMove.bind(this, svg), false); 31 svg.addEventListener("mousedown", this.onTopMouseDown.bind(this), false); 32 30 33 JSplash.SWFGlobals.setup(this); 31 34 this.doInitActions(); … … 44 47 45 48 delete Object.prototype.addProperty; 49 }, 50 51 onTopMouseDown: function(e) { 52 if (Event.isLeftClick(e)) 53 this.stage.setMouseDown(); 54 }, 55 56 onTopMouseMove: function(svg, e) { 57 var x, y; 58 if (e.offsetX) { 59 x = e.offsetX; 60 y = e.offsetY; 61 } 62 else { 63 x = e.layerX; 64 y = e.layerY; 65 } 66 67 this.stage.setMousePos(x, y); 46 68 }, 47 69

