petersego
asked on
How can I make a function out of this
Im trying to set a mask consisting of 9 squares and want to make a function that creates the squares out of th e following, that works in it self
mask_mc.createEmptyMovieCl ip("block1 ", 31);
bgcontainer(mask_mc.block1 , 66, 66, 1, 0x000000, 100);
mask_mc.block1._x = 66;
mask_mc.block1._y = 66;
so I created a function looking like this:
function maskBlock(bDepth, bWidth, bHeight, bX, bY){
var newBlock = "block" +bDepth;
var newDepth = "3" +bDepth;
mask_mc.createEmptyMovieCl ip("block" +bDepth, newDepth);
mask_mc.newBlock._x = bX;
mask_mc.newBlock._y = bY;
bgcontainer(mask_mc.newBlo ck, bWidth, bHeight, 1, 0x000000, 100);
}
maskBlock(1,66,66,0,0);
but that result in that I get an error saying that there is missing a 'with' action
What is wrong and how should I do it right....
mask_mc.createEmptyMovieCl
bgcontainer(mask_mc.block1
mask_mc.block1._x = 66;
mask_mc.block1._y = 66;
so I created a function looking like this:
function maskBlock(bDepth, bWidth, bHeight, bX, bY){
var newBlock = "block" +bDepth;
var newDepth = "3" +bDepth;
mask_mc.createEmptyMovieCl
mask_mc.newBlock._x = bX;
mask_mc.newBlock._y = bY;
bgcontainer(mask_mc.newBlo
}
maskBlock(1,66,66,0,0);
but that result in that I get an error saying that there is missing a 'with' action
What is wrong and how should I do it right....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The Depth-number I wanted was 31, 32 and so on, but apart from that, I made it work, thanks.