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!

Ahhh!!! I give up! Need tellTarget syntax!

Status
Not open for further replies.

AlbertAguirre

Programmer
Nov 21, 2001
273
US
Sheesh I'm so frustrated! I tried everything I could think of and I cannot make this work!

- I have a MC instance in the main timeline called IArchitecture
- Within the IArchitecture MC I have another MC called ISingle
- ISingle has a button, on release I want the IArchitecture MC to play a frame labeled "single" and stop.

Nothing works! So simple eh?

I named IArchitecture by going into the Instance tab and naming it with the "Name" field. This is correct right? I reference that instance with that name not the MC name right?

Heres my code:
on (release) {
tellTarget ("IArchitecture") {
gotoAndStop ("single");
}
}

Heres another try:
on (release) {
_root.IArchitecture.gotoAndStop("single");
}

Whats wrong????

By the way, you guys rock! I always get help here...
 
hi mate try this, and yes you're correct using instance name..

on (release) {
tellTarget ("../IArchitecture") {
gotoAndStop ("single");
}
}


your second code should work
maybe
_level0.IArchitecture.gotoAndStop("single");
 
Thank you for your reply.

I found the problem last night. Check this out:

The MC in the main timeline (called IArchitecture) was in a motion tween with 3 keyframes.
I only gave the MC an instance name in the last keyframe where the play head stopped.
This didnt allow me to use that instance name.

I had to name the instance in all 3 keyframes then I could reference it.

I didnt know this worked this way.

Thank you for your help...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top