Hi guys.
Need some help with a picture transition I am building using borrowed code from various tutorials. I am trying to make a grid with a dynamically attached clip(ball), use the grid as a mask for a picture(pic) and tween it forward on the press of a button (red):
import mx.transitions.easing.*;
import mx.transitions.Tween;
exp = function(mymc){
new Tween(mymc,"_xscale",Strong.easeIn,mymc._xscale,300,3,true);
new Tween(mymc,"_yscale",Strong.easeIn,mymc._yscale,300,3,true);
}
var PH = _root.createEmptyMovieClip("PH_mc", 0);
var ball:MovieClip;
var depth = 0;
for (var i=0; i < 100; i++) {
for(var j=0;j< 100; j++){
ball = PH.attachMovie("ball", "ball_"+ i + "_" + j,depth++);
ball._x = i*ball._width;
ball._y = j*ball._height;
}
}
red.onRelease = function(){
exp(ball);
}
pic.setMask(PH);
My problem is that I cannot get the grid to tween forward on pressing red. I have tried various other ways to call function exp with no success, although I have noticed that:
red.onRelease = function(){
exp(PH);
}
successfully tweens the container clip for the grid. Furthermore, I have noticed Flash 8 takes some time before testing the movie. Is my code inefficient?
Many thanks for any help.
Geminian1