|
@@ -45,6 +45,9 @@
|
|
|
trace('ser_frame::',get(framewidth));
|
|
|
set(hotspot[get(hsp_name)].url,get(iconUrl));
|
|
|
set(hotspot[get(hsp_name)].framewidth,get(framewidth));
|
|
|
+ set(hotspot[get(hsp_name)].frames,get(frameNumber));
|
|
|
+ crop_animation_r_stop(get(hsp_name));
|
|
|
+
|
|
|
txtadd(hotspot[get(hsp_name)].onloaded,"trace('ser_frame1::',get(frameNumber));do_crop_animation(get(framewidth),get(framewidth),get(frameNumber));"););
|
|
|
);
|
|
|
|
|
@@ -72,6 +75,8 @@
|
|
|
registerattribute(animatiedOn, 1);
|
|
|
registerattribute(frameRate, calc(1.0 / %3));
|
|
|
set(crop, '0|0|%1|%2');
|
|
|
+ clearinterval(calc('crop_anim_' + name));
|
|
|
+
|
|
|
if(frameRate GE 0,
|
|
|
setinterval(
|
|
|
calc('crop_anim_' + name),
|
|
@@ -81,12 +86,12 @@
|
|
|
if(frame GE frames, if(onlastframe !== null, onlastframe() ); set(frame,0); );
|
|
|
mod(xpos,frame, xframes);
|
|
|
div(ypos, frame, xframes);
|
|
|
-
|
|
|
+ trace('onging::',get(frames));
|
|
|
Math.floor(ypos);
|
|
|
mul(xpos, %1);
|
|
|
mul(ypos, %2);
|
|
|
calc(crop, xpos +'|' + ypos + '|%1|%2');
|
|
|
- <!-- trace('onging::',get(crop)); -->
|
|
|
+
|
|
|
if(animatiedOn == 0,
|
|
|
clearinterval(calc('crop_anim_' + name));
|
|
|
);
|
|
@@ -98,23 +103,30 @@
|
|
|
);
|
|
|
);
|
|
|
</action>
|
|
|
+ <action name="crop_animation_r_stop">
|
|
|
+ set(cur,%1);
|
|
|
+ tolower(cur, cur);
|
|
|
+ set(curIn, calc('crop_anim_r_' + cur));
|
|
|
+ clearinterval(curIn);
|
|
|
+ </action>
|
|
|
|
|
|
<action name="crop_animation_reapply">
|
|
|
- txtadd(cur,'',%1);
|
|
|
+ set(cur,%1);
|
|
|
tolower(cur, cur);
|
|
|
txtadd(frameRate,'',%2);
|
|
|
+ copy(frames, hotspot[get(cur)].frames);
|
|
|
+ copy(xframes, hotspot[get(cur)].xframes);
|
|
|
+ copy(yframes, hotspot[get(cur)].yframes);
|
|
|
set(frame,0);
|
|
|
- set(curIn, calc('crop_anim_' + cur));
|
|
|
+ set(curIn, calc('crop_anim_r_' + cur));
|
|
|
clearinterval(curIn);
|
|
|
if(get(frameRate) GE 0,
|
|
|
setinterval(curIn,
|
|
|
get(frameRate),
|
|
|
- copy(frames, hotspot[get(hsp_name)].frames);
|
|
|
- copy(xframes, hotspot[get(hsp_name)].xframes);
|
|
|
- copy(yframes, hotspot[get(hsp_name)].yframes);
|
|
|
- copy(on, hotspot[get(hsp_name)].on);
|
|
|
- copy(framewidth, hotspot[get(hsp_name)].framewidth);
|
|
|
inc(frame);
|
|
|
+ copy(on, hotspot[get(cur)].on);
|
|
|
+ copy(framewidth, hotspot[get(cur)].framewidth);
|
|
|
+ <!-- trace('replay-crop::',get(frames)); -->
|
|
|
if(frame GE frames, set(frame,0); );
|
|
|
mod(xpos,frame, xframes);
|
|
|
div(ypos, frame, xframes);
|
|
@@ -123,7 +135,6 @@
|
|
|
mul(ypos,framewidth);
|
|
|
if(animatiedOn == 0, clearinterval(curIn););
|
|
|
calc(crop, xpos +'|' + ypos + '|'+framewidth +'|' + framewidth);
|
|
|
- trace('replay-crop::',get(frames));
|
|
|
copy(hotspot[get(hsp_name)].crop,crop);
|
|
|
);
|
|
|
);
|
|
@@ -413,19 +424,24 @@
|
|
|
<!-- 序列化类型编辑 -->
|
|
|
if(get(hsp_type) == 2,
|
|
|
indexoftxt(index, get(iconUrl), 'image_place_holder.png');
|
|
|
- trace('frameNumber::',get(frameNumber));
|
|
|
- trace('framewidth::',get(framewidth));
|
|
|
- trace('duration::',get(duration));
|
|
|
+
|
|
|
if(get(index) GT -1,set(hotspot[get(hsp_name)].animatiedOn,0); set(hotspot[get(hsp_name)].frames,-1););
|
|
|
ifnot(get(index) GT -1,
|
|
|
- set(hotspot[get(hsp_name)].animatiedOn,1);
|
|
|
+
|
|
|
+ set(hotspot[get(hsp_name)].animatiedOn,0);
|
|
|
set(hotspot[get(hsp_name)].frames,get(frameNumber));
|
|
|
calc(frameRate, duration / frameNumber);
|
|
|
- trace('frameRate::',get(frameRate));
|
|
|
+
|
|
|
set(hotspot[get(hsp_name)].frameRate,get(frameRate));
|
|
|
- <!-- set(hotspot[get(hsp_name)].on,get(frameRate)); -->
|
|
|
- crop_animation_reapply(get(hsp_name),get(frameRate),get(frameNumber));
|
|
|
-
|
|
|
+
|
|
|
+ trace('frameRate::',get(frameRate));
|
|
|
+ trace('frameNumber::',get(frameNumber));
|
|
|
+ trace('framewidth::',get(framewidth));
|
|
|
+ trace('duration::',get(duration));
|
|
|
+
|
|
|
+ crop_animation_reapply(get(hsp_name),get(frameRate),get(frameNumber));
|
|
|
+ <!-- do_crop_animation(get(hsp_name),get(frameRate),get(frameNumber)); -->
|
|
|
+ <!-- do_crop_animation(get(framewidth),get(framewidth),get(frameNumber));"); -->
|
|
|
);
|
|
|
);
|
|
|
|
|
@@ -435,7 +451,7 @@
|
|
|
set(layer[get(hsDot)].visible,false);
|
|
|
|
|
|
);
|
|
|
-
|
|
|
+
|
|
|
|
|
|
</action>
|
|
|
|