hey guys,
ive got a class which creates a bunch of movie clips on the main time line.
how ever i cant seem to access any of the normal movie clip properties or methods ?!
Board.as
class Board{
function Board()
{
__block = Array(6);
// initialize all block
for(var i:Number=0; i < 6; i++)
{
for(var j:Number=0; j < 6; j++)
{
var blockName:String = "B"+String(j)+String(i);
var blockDepth:Number = _root.getNextHighestDepth();
var blockType:String = fillSpace();
_root.attachMovie(blockType, blockName, blockDepth);
_root[blockName].__type = blockType;
_root[blockName]._x = j*50+100;
_root[blockName]._y = i*50+50;
_root[blockName].onRollOut = onRollOutHandler;
_root[blockName].onRollOver = onRollOverHandler;
_root[blockName].onPress = function() { trace(this._name); };
}
}
}
blocks are created fine and when i click i get the correct block name.
still in Board.as
function onRollOutHandler():Void {
gotoAndPlay("rollOut");
}
function onRollOverHandler():Void {
gotoAndPlay("rollOver");
}
if i put a “trace(this)” in the function it displays “_level0.<mc Name>”, so the function is being executed. but the gotoAndPlay isnt
if i place “this” infront of the gotoAndPlay call i get an error
“There is no method with the name ‘gotoAndPlay’.
this.gotoAndPlay(“rollOver”);”
please help!!