Skip to main content
Participant
August 21, 2008
Question

Tell Target help

  • August 21, 2008
  • 1 reply
  • 239 views
Hey Everyone,

I'm a newbie at Actionscripting and need a little bit of help!

The main base of this flash file that I've created contains two movie clips/symbols. Each movie contains their own timelines and interactive elements.

Movie clip #1 is called "Home", which contains another movie clip called "homebuttons". "homebuttons" contains a button called "button-web".

When the user clicks on this "button-web" button, they should be taken back out to movie clip file #2 called "web", which sits on the main timeline, outside of movie clip #1.

The action I've written for this button is:

on (release) {
tellTarget ("_Level0/web") {
gotoAndPlay (1);
}
}

I've also tried various forms of tellTarget ("/web"), tellTarget ("../../web") but I am getting confused and I'm not sure what I should be doing.

The error that I'm getting is "Target not found: Target="_Level0/web" Base="_level0.home.instance19".

If anyone out there has any insight to this and can guide me in the right direction, it would be so much appreciated!!!

Thanks!!
This topic has been closed for replies.

1 reply

Known Participant
August 22, 2008
As I understand it you have a path problem which is the biggest problem I've had over the years.

Is your path Home > homebuttons >button-web?

If so, code contained in the button button-web that says

_parent.gotoAndPlay(1) will refer to homebuttons
_parent._parent.gotoAndPlay(1) will refer to Home.
_root.gotoAndPlay(1) will refer to Home
_root.homebuttons.gotoAndPlay(1) will refer to homebuttons

Using _root may get you in trouble later if you decide to imbed this movie into another.

Your tellTarget refers to the movie "web" which you did not mention.

tellTarget is deprecated and is not used anymore. Using the dot syntax is the current usage.

example:
on(release){
_parent.gotoAndPlay(1);
}
Known Participant
August 22, 2008
Sorry jlee77 I spoke too soon.

If you attach code to the button gotoAndPlay(1) it controls the timeline the button is in. In the above example

gotoAndPlay(1) will refer to homebuttons
_parent.gotoAndPlay(1) will refer to Home.

Sorry about the mixup.