Question
JPG LoadMovie events?
Please help me with this...
This works:
this.createEmptyMovieClip("box_mc", 100);
box_mc._x = 32;
box_mc._y = 32;
with (box_mc) {
lineStyle(1, 0xCCCCCC);
beginFill(0xEEEEEE);
moveTo(0, 0);
lineTo(80, 0);
lineTo(80, 60);
lineTo(0, 60);
lineTo(0, 0);
endFill();
};
box_mc.onPress = function() {
this._x -= this._width/2;
this._y -= this._height/2;
this._xscale = 200;
this._yscale = 200;
};
box_mc.onRelease = function() {
this._xscale = 100;
this._yscale = 100;
this._x += this._width/2;
this._y += this._height/2;
};
This does not work:
this.createEmptyMovieClip("box_mc", 100);
box_mc._x = 32;
box_mc._y = 32;
with (box_mc) {
loadMovie("smiley.jpg");
};
box_mc.onPress = function() {
this._x -= this._width/2;
this._y -= this._height/2;
this._xscale = 200;
this._yscale = 200;
};
box_mc.onRelease = function() {
this._xscale = 100;
this._yscale = 100;
this._x += this._width/2;
this._y += this._height/2;
};
WHY NOT??!?
This works:
this.createEmptyMovieClip("box_mc", 100);
box_mc._x = 32;
box_mc._y = 32;
with (box_mc) {
lineStyle(1, 0xCCCCCC);
beginFill(0xEEEEEE);
moveTo(0, 0);
lineTo(80, 0);
lineTo(80, 60);
lineTo(0, 60);
lineTo(0, 0);
endFill();
};
box_mc.onPress = function() {
this._x -= this._width/2;
this._y -= this._height/2;
this._xscale = 200;
this._yscale = 200;
};
box_mc.onRelease = function() {
this._xscale = 100;
this._yscale = 100;
this._x += this._width/2;
this._y += this._height/2;
};
This does not work:
this.createEmptyMovieClip("box_mc", 100);
box_mc._x = 32;
box_mc._y = 32;
with (box_mc) {
loadMovie("smiley.jpg");
};
box_mc.onPress = function() {
this._x -= this._width/2;
this._y -= this._height/2;
this._xscale = 200;
this._yscale = 200;
};
box_mc.onRelease = function() {
this._xscale = 100;
this._yscale = 100;
this._x += this._width/2;
this._y += this._height/2;
};
WHY NOT??!?
