svnno****@sourc*****
svnno****@sourc*****
2009年 11月 27日 (金) 00:00:28 JST
Revision: 1439
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1439
Author: dhrname
Date: 2009-11-27 00:00:28 +0900 (Fri, 27 Nov 2009)
Log Message:
-----------
Modified Paths:
--------------
branches/05x/055/sie.js
Modified: branches/05x/055/sie.js
===================================================================
--- branches/05x/055/sie.js 2009-11-26 13:23:26 UTC (rev 1438)
+++ branches/05x/055/sie.js 2009-11-26 15:00:28 UTC (rev 1439)
@@ -2205,7 +2205,9 @@
this.transformable = matrix;
this.currentFrame = 0;
this.attributeName = ele.getAttribute("attributeName").replace(/(fill|stroke)\-/, "&1");
- var timing = [ele.getAttribute("begin"), ele.getAttribute("end"), ele.getAttribute("dur")];
+ this.begin = ele.getAttribute("begin");
+ this.end = ele.getAttribute("end");
+ this.dur = ele.getAttribute("dur");
this.fill = ele.getAttribute("fill");
this.w = w;
this.h = h;
@@ -2216,7 +2218,32 @@
};
STSetElement.prototype.set = function (w,h){
this.to = this.tar.getAttribute("to");
+ var timing = [this.begin, this.dur, this.end], offset = [];
+ for (var i=0;i<3;++i) {
+ var ti = timing[i];
+ if (ti) {
+ var n = parseFloat(ti.match(/[\-\d\.]+(h|min|s|ms)/));
+ offset[i] = n * this._unit[RegExp.$1];
+ if ( /(mouse|activ)/.test(ti) ) { //イベントがある場合
+ var tar;
+ if ( /\.\D/.test(ti) {
+ tar = document.getElementById(ti.substring(0, ti.indexOf("."));
+ } else {
+ tar = this.tarrget.tar;
+ }
+ tar.addEvent( ti.match(/(mouse|activ)[a-z]+/i), (function(){}) );
+ }
+ } else {
+ offset[i] = 0;
+ }
+ }
};
+STSetElement.prototype._unit = {
+ "h" : 1000,
+ "min" : 1000,
+ "s" : 1000,
+ "ms" : 1000
+};
//sはフレーム数であることに気をつけること
STSetElement.prototype._frame = function (/*int*/ s){
if (this._begin && this._end) {