Hello,
I am setting up a menu which already had 6 movie-clips in place; I would like to add number 7. I have changed sections of the actionscript (as below)… However; I need to change the instance name of the movie-clip on stage to “7”, as the others are 1,2,3,4,5,6.
When I enter 7 into the instance name on property bar, it gives an error:
[COLOR=red]“7 is not a valid instance name. Please enter an identifier that begins with an alphabetical character or other supported symbol.”[/COLOR]
Therefore, my question is - how can I assign this movie-clip an instance name of 7?
Thanks for your help!
MM2008
link = new Array();
frame = new Array();
location = new Array();
link[1] = "#";//main menu button linkage 10
link[2] = "#";//main menu button linkage 20
link[3] = "#";//main menu button linkage 30
link[4] = "#";//main menu button linkage 40
link[5] = "#";//main menu button linkage 50
link[6] = "#";//main menu button linkage 60
[COLOR=deepskyblue]link[7] = "#";//main menu button linkage 70[/COLOR]
frame[1] = "_self";//target frame for button 10
frame[2] = "_self";//target frame for button 20
frame[3] = "_self";//target frame for button 30
frame[4] = "_self";//target frame for button 40
frame[5] = "_self";//target frame for button 50
frame[6] = "_self";//target frame for button 60
[COLOR=deepskyblue]frame[7] = "_self";//target frame for button 70[/COLOR]
location = [0, 0, 0, 0, 0, 0];
[COLOR=deepskyblue]numOfMenu = 7;[/COLOR]
gap = 35;
speed = 6;
_global.active = pageNum;
_global.subActive = subNum;
_global.over = active;
for (i = 1; i <= numOfMenu + 1; i++)
{
this*._y = this*.defaultY = (i - 1) * gap + this[1]._y;
if (i > 1)
{
if (over)
{
if (this*._name <= over)
{
this*.targetY = this*.defaultY;
}
else
{
this*.targetY = this*.defaultY + location[over - 1];
} // end else if
}
else
{
this*.targetY = this*.defaultY;
} // end else if
this*._y = this*.targetY;
} // end if
this*.bg.onRollOver = function ()
{
_global.over = this._parent._name;
};
this*.bg.onRollOut = this*.bg.onDragOut = function ()
{
_global.over = active;
};
this*.bg.onRelease = function ()
{
getURL(link[this._parent._name], frame[this._parent._name]);
};
this*.onEnterFrame = function ()
{
var _loc1 = this;
if (over == _loc1._name)
{
_loc1.direction = "next";
_loc1.nextFrame();
return;
} // end if
_loc1.direction = "prev";
_loc1.prevFrame();
_loc1.prevFrame();
};
} // end of for
this.onEnterFrame = function ()
{
var _loc1 = this;
for (i = 2; i <= numOfMenu + 1; i++)
{
if (over)
{
if (_loc1*._name <= over)
{
_loc1*.targetY = _loc1*.defaultY;
}
else
{
_loc1*.targetY = _loc1*.defaultY + location[over - 1];
} // end else if
continue;
} // end if
_loc1*.targetY = _loc1*.defaultY;
} // end of for
for (i = 2; i <= numOfMenu + 1; i++)
{
_loc1*._y = _loc1*._y + (_loc1*.targetY - _loc1*._y) / speed;
} // end of for
};
this[numOfMenu + 1].onRollOver = function ()
{
};
this[numOfMenu + 1].useHandCursor = false;