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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

buttons within mc ...

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
hi everyone, i have created an image scroller within an mc. the instance of it on the main time line has the script:

onClipEvent (load) {
myNumber = _parent._parent._name;
mySpeed = 10-myNumber;
}
onClipEvent (enterFrame) {
Xsquare = this._x;
Xdiff = _root.Xpos-Xsquare;
Xmove = Xdiff/mySpeed;
this._x = Xsquare+Xmove;
updateAfterEvent(enterFrame);
}

and five correlating buttons that scroll the image with

on (release) {
Xpos = 1165;
}

for example. it works by itself (in a single file), but when placed within another animation, the buttons dont work and do nothing.

as i copied the code and are quiet unknowledgable with scripting, my guess is that it has sth to do with the _parent._parent._name;
and the button action call no specific mc.

but HOW to do this is the question. please anyone, a suggestion or hint ???

thanx in advance ...
 
Have you given an instance name to that mc? Not it's library name, but the instance name of that particular instance of the movie clip that was set on stage.

You would have to add that instance name in you path, in your button script:

_level0.mc_instance_name.Xpos = 1165;
Regards,

oldman3.gif
 
yes, ...
checked the instance name and etc ...

tried the _level0.mc_, didnt work so far. but i am not giving up.

might try to start all over again tomorrow (putting instance there, naming it ... might find a problem that way? thanx for your reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top