svnno****@sourc*****
svnno****@sourc*****
2009年 12月 2日 (水) 23:36:14 JST
Revision: 1444
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1444
Author: dhrname
Date: 2009-12-02 23:36:14 +0900 (Wed, 02 Dec 2009)
Log Message:
-----------
フレーム処理をするために、setIntervalを利用した
Modified Paths:
--------------
branches/05x/055/sie.js
Modified: branches/05x/055/sie.js
===================================================================
--- branches/05x/055/sie.js 2009-11-30 11:42:20 UTC (rev 1443)
+++ branches/05x/055/sie.js 2009-12-02 14:36:14 UTC (rev 1444)
@@ -331,6 +331,17 @@
} catch(e) {stlog.add(e,185);this.next();}
} else { //全要素の読み込みが終われば
_ie_svgfont();
+ if (NAIBU.Clip.length > 0) {
+ setInterval( (function(){
+ var ntc = NAIBU.Time.currentTime++;
+ var nc = NAIBU.Clip;
+ for (var i=0,ncli=nc.length;i<ncli;++i) {
+ nc[i]._frame(ntc);
+ }
+ }),
+ 41
+ );
+ }
}
} catch(e) {stlog.add(e,293);this.onumber++;this.next();}
};
@@ -2196,8 +2207,6 @@
}
} else if (parent.nodeName === "DIV") {
s = new STText(parent, dummy, w, h);
- } else if (parent.nodeName === "group") {
- s = new STGroupElement(parent, dummy, w, h);
} else if (parent.nodeName === "A") {
s = new STAElement(parent, dummy);
} else if (parent.nodeName === "image") {
@@ -2210,7 +2219,7 @@
this.paint = s.paint;
this.currentFrame = 0;
this.attributeName = ele.getAttribute("attributeName").replace(/(fill|stroke)\-/, "&1");
- this.begin = ele.getAttribute("begin");
+ this.begin = ele.getAttribute("begin") || "0ms";
this.end = ele.getAttribute("end");
this.dur = ele.getAttribute("dur");
this.fill = ele.getAttribute("fill");
@@ -2226,7 +2235,7 @@
var offset;
try {
var n = parseFloat(this.begin.match(/[\-\d\.]+(h|min|s|ms)/));
- offset = (n !== void 0) ? n * this._unit[RegExp.$1] : 0;
+ offset = (!isNaN(n)) ? n * this._unit[RegExp.$1] : 0;
if ( /(mouse|activ)/.test(this.begin) ) { //イベントがある場合
var tar;
if ( /\.\D/.test(this.begin) ) {
@@ -2241,7 +2250,7 @@
}
if (!this.dur) {
var n = parseFloat(this.end.match(/[\-\d\.]+(h|min|s|ms)/));
- offset = (n !== void 0) ? n * this._unit[RegExp.$1] : 0;
+ offset = (!isNaN(n)) ? n * this._unit[RegExp.$1] : 0;
if ( /(mouse|activ)/.test(this.end) ) { //イベントがある場合
var tar;
if ( /\.\D/.test(this.end) ) {
@@ -2258,10 +2267,10 @@
} catch(e) {stlog.add(e, 2239);}
};
STSetElement.prototype._unit = {
- "h" : 1000,
- "min" : 1000,
- "s" : 1000,
- "ms" : 1000
+ "h" : 2880000,
+ "min" : 48000,
+ "s" : 800,
+ "ms" : 0.8
};
//sは現在のフレーム数であることに気をつけること
STSetElement.prototype._frame = function (/*int*/ s){