I have swf calling external swf
AS 2 on swf1 :
container.loadMovie(“c:/flashtest/a1.swf”,00);
_root.container.play();
Quote AS 2 on swf 2 :
//Paste this code at the top of your existing code to be able to use the Tween Class
import mx.transitions.Tween;
import mx.transitions.easing.*;
popup._alpha = 0;
this.createEmptyMovieClip(“container”,1);
var imagesNumber:Number = 5;
var scrolling:Boolean = true;
for (i=0; i<imagesNumber; i++) {
container.attachMovie(“thumb”+i,“thumb”+i+“_mc”,i+2);
myThumb_mc = container[“thumb”+i+“_mc”];
myThumb_mc._x = (i-1)*myThumb_mc._width;
myThumb_mc._y = (576-myThumb_mc._height)/2;
myThumb_mc._alpha = 50;
myThumb_mc.largerImage = i;
myThumb_mc.onRollOver = function() {
this._alpha = 100;
};
myThumb_mc.onRollOut = function() {
this._alpha = 50;
};
myThumb_mc.onRelease = function() {
this._alpha=50;
for (i=1; i<=imagesNumber; i++) {
var myClip = container["thumb"+i+"_mc"];
myClip.enabled = false;
}
scrolling = false;
_root.attachMovie("image"+this.largerImage,"large_mc",i+10);
large_mc._x = (768-large_mc._width)/2;
large_mc._y = (576-large_mc._height)/2;
//fadein fadeout speed (container name, tween type, base alpa, target, speed, boolean);
new Tween(large_mc, "_alpha", Strong.easeOut, 0, 100, 1, true);
new Tween(container, "_alpha", Strong.easeOut, 100, 50, 1, true);
large_mc.onRelease = function() {
this.enabled=false;
scrolling = true;
var myFadeOut = new Tween(large_mc, "_alpha", Strong.easeOut, 100, 0, 0.5, true);
new Tween(container, "_alpha", Strong.easeOut, 50, 100, 0.5, true);
myFadeOut.onMotionFinished = function() {
for (i=1; i<=imagesNumber; i++) {
var myClip = container["thumb"+i+"_mc"];
myClip.enabled = true;
}
large_mc.removeMovieClip();
};
};
};
}
container.onEnterFrame = function() {
if (scrolling) {
this._x += Math.cos((-_root._xmouse/576)*Math.PI)*15;
if (this._x>0) {
this._x = 0;
}
if (-this._x>(this._width-576)) {
this._x = -(this._width-576);
}
}
};
When I clicken on the image, it stopped. Anyone know why ?