Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Undefined!

Status
Not open for further replies.

blaablaa69

Technical User
Feb 15, 2005
57
AU
hey guys im going insane with this one. can anyone tell me why mc is undefined? i used the same script in another frame and it works?

stop();

import mx.transitions.Tween;
var easeType:Function = mx.transitions.easing.None.easeNone;
var time:Number = 1;
var currentpos = selectedMC._x;
var startpos = 197;

new Tween(selectedMC, "_x", easeType, currentpos, startpos, time, true);

// reorder items

var startingPoint = startpos;
var previousWidth = selectedMC._width;
var gap = 30;
var menuItems:Array = ["profile", "whyus", "products", "contactus", "catalogue"];

for (i=0; i<5; i++) {
if (i != selectedNumber) {
var mc:MovieClip = this._parent[menuItems];
mc._x = startingPoint+previousWidth+gap;
startingPoint = mc._x;
trace(mc);

previousWidth = mc._width;
}
}

for (i=0; i<5; i++) {
var mc:MovieClip = this._parent[menuItems];
mc._alpha = 100;
}
 
looks like it must be a path problem

check.... this._parent[menuItems];
 
thanks, yeah i fixed that bit now. just changed it to _root. i have another problem now though with a tween not working. Would you be able to check out the fla pls? If you goto frame 14, you'll see where ive marked it.

thanks heaps!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top