How Do I Change This Telltarget To Dot Syntax
I can't seem to get this figured out. When I try to use the dot syntax it won't work.
Any help will be greatly appreciated.
_root.State = "Michigan"; tellTarget ("_root.USA." add _root.OldState) { gotoAndStop(1); }
FlashKit > Flash Help > Flash MX
Posted on: 07-10-2002, 12:09 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Ahhh I Give Up Need TellTarget Syntax
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...
Ive Always Used TellTarget... Please Help Me Change..
In my 2 years of flashing, and yes, i mean showing my penis to people, ive been using telltarget. now ive upgraded to MX and it says its depreciated, and i should use dot notation. i kinda understand what that is but not really sure how to control a MC with it for example.
cheers.
Replacing "telltarget" With Appropiate Syntax
Hi all I am currently using this piece of code for a preloader. It works
great, but as you may already know tellTarget is a depreciated expression, which means in the future it will not work with future flash players. Im just wondering what would be the correct expression to use, or in this case replace tellTarget. I have tried using normal (.) syntax but it does not have the same effect. Can some please explain this to me
ActionScript Code:
loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes/1000);
totalkbytes = Math.ceil(totalbytes/1000);
if (loadedbytes == totalbytes) {
nextScene ();
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.mainloader.loader) {
gotoAndStop (_root.frame);
}
thanks again for your help people
kind regards
w9914420
Syntax Help - _level1.tellTarget ("hide") {
Sorry to be a pain, what is the correct syntax for this? I have a button with the following code:
on (press) {
_level1.tellTarget ("hide") {
gotoAndStop(2);
}
}
I know telltarget is oldschool, I still haven't adjusted to actionscript fully. Basically, I have a movie clip with an instance name of "hide" and it's sitting on _level1. I'd like for a button to tell it to goto and stop on frame 2.
Thanks alot!!
Telltarget Inside A Telltarget
ok... inside a movie clip i tell another mc "text_mc" to go to and stop frame 10, and insde "text_mc" i also have a stop command... but for some friggen reason it goes to frame 10 then goes to the beginning of the movie clip. and nowhere is there other actions instructing "text_mc" to do anything different. is there a reason it goes, stops, and then goes back to the start???????
thanks,
hp
Actins:wrong Syntax=correct, Right Syntax=wrong
Has any body made a similar observation:
when I want to load a pic into mc and write
_root.loadMovie("pic.jpg","mc");
I get a little window just the size of my pic but not my stage. But when I write:
_root.mc.loadMovie("pic.jpg");
everything is fine. I have a Mac, OS9.1. Is this related to the flashplayer in mac or what?
TellTarget
I want to do the following:
I have a movie within the timeline of scene 1
I want the movie to play to the end, at the end, I want to add an action to advance in the timeline of scene 1 to the next movie in that timeline.
similar to using a button, however, I want it to be automatic for the user.
Any help would be great. thanks.
HELP WITH TELLTARGET
Hello everybody...
I am really new to this so please be so patient and help me with it.
I am using this code as an action on one of the buttons in my flash movie...
on (release) {
tellTarget ("/buttonaction") {
gotoAndPlay (1);
}
}
I created an animation (movie) and named it : "buttonaction"
But when I click on button its telling me:
Target not found: Target="/buttonaction" Base="_level0"
What the heck I am doing wrong people?
When I click on button shouldn't load the movie "buttonaction"?
What else do I have to do?
With Vs TellTarget
Has anyone got any ideas why this "tellTarget" works:
tellTarget (_parent) {
varVerifyViewed = false;
varAuthoriseViewed = false;
varReleaseViewed = false;
varRepairViewed = false;
varDeleteViewed = false;
varViewViewed = false;
}
but this "with" does not:
with (_parent) {
varVerifyViewed = false;
varAuthoriseViewed = false;
varReleaseViewed = false;
varRepairViewed = false;
varDeleteViewed = false;
varViewViewed = false;
}
According to macromedia, the "tellTarget" action has been depreciated in favour of the "with" action but I've found that in many cases "tellTarget" works and "with" doesn't - what gives??
TellTarget To Go And F$£& *@€...help Me Please
Is there anyway I can export a working flash 4 swf from flash 5 that has a TellTarget command in it? It works when I export it as a Flash 5 swf!!!!!!
Helpers will be rewarded with gold and happiness!
Dave
TellTarget Help
hey,
i have a MC that has a (STOP) in the first frame, and i try to run it from the main scene:
Code:
tellTarget ("/TopBorder1") {
_this.TopBorder1.gotoAndStop(2);
_this.TopBorder1.play();
}
it goes to the second frame and it just sits there... i also tried doing gotoAndPlay(2) but still no results...
what am i doing wrong?
thx
TellTarget - No More?
Hi all
The script below works sweatly ...
Code:
tellTarget(["_root.lives.man" + lives]){
gotoAndPlay(2);
}
But what would be the proper Flash 5 syntax?
TIA
/podenphant
2-way Telltarget
I need a way to do a two-way telltarget. That is, I have two objects and if I hover over either of them, they both display their "over" appearance.
A good example of what I'm looking for can be found at the following web site:
http://www.1800contacts.com/vision101/
A flash window will popup, skip the intro. Then click on chapter 1.2 from the menu on the left. Another menu will pop up, as well as a diagram on the right. If you hover over either the sub menu or the corresponding part of the diagram, they both highlight.
My dilemma (or lack or knowledge) is that TellTarget can only affect MovieClips, and "On (rollover)" only works on Buttons. So at first glance, it appears that it can only work one way. One needs to be a button, the other a MC.
Thanks,
Michael
TellTarget From Within MC's?
please help me!,
basically ive got a button inside a MC, thats inside another MC (level2?) and i want to target and control a MC on the 1st level but i traget it using this code...
on (rollOver) {
tellTarget (_root.teach_blur.nikecombutt) {
gotoAndPlay (2);
}
}
but when i test the movie it doesn't see it,
i get this error -
Target not found: Target="_root.teach_blur.nikecombutt" Base="_level0.teach_blur"
TellTarget?
Hi,
This might be silly. I have a movie that contains thumbnails (buttons) that call each an .swf movie, that is basically a big photo. This was done with loadMovie, etc.
Now I also need that the big images can be controlled by a forward and back arrows, so this arrows would call in a relative way, the next movie. I have named the swf files consecutive numbering...
http://studiocom.com/scott/work.html
Can I do this? Is it an action script? Does anyone here can help me out?
Thank you!
With() Vs. TellTarget()
OK, I am trying to leave TellTarget() in the dust but I am having trouble doing similar things with with() ...
With TellTarget(), I could use expressions. Like,
TellTarget("/throw/target" add number){
actions;
}
Using with, it seems all the examples I have seen do not use quotes. In fact, it seems to botch things up. In other words, doing:
with("_root.throw.target" add number)}
actions;
}
doesn't seem to work at all.
So my question is, how do I work variables in?
Help With Telltarget
Ok, I'll try to explain this as simply as possible and hopefully someone can tell me what I'm doing wrong.
I create a new movie. In the first frame I create a ball then hit Insert-Convert to Symbol - MovieClip
I name this movieclip "ball", create the animations, and set an actionscript at the end to send it back to frame 1, a simple looping animation.
Now, on the main movie (which only has the one frame containing the "ball" movie, I want to create a button that tells the "ball" movie to stop on a certain frame (in this instance frame 3), when the mouse goes Over the button, so I try:
on (rollOver) {
tellTarget ("ball") {
gotoAndStop (3);
}
}
No luck - I test the movie and I get the error:
Target not found: Target="ball" Base="_level0"
What am I doing wrong??
TellTarget
i am trying to do a tell target, but it will not work, my button is on the main timeline and then I also have my movie there that I want it to play also, only when i do a tell target it doesnot work properly....when i go to insert target path my movie clip is not listed there...why can anyone help me out please?????
by the way when i test the movie, it says target not found??????
[Edited by DeadManWalkin on 04-22-2002 at 08:22 PM]
**tellTarget Fun**
I'm sending high scores and names from a game to a database. Had problems sending them from Flash to ASP (despite using load variables etc), then I made a breakthrough when I was advised to add tellTarget ("/") to the Send button which I've done. Now I'm getting the name through to the database but not the score.
Not too hot on tellTarget - any advice on how to improve the above bit of code to get the score through too?
TellTarget
Is it possible, to use telltarget (or sth. similar) action to control an external (not loaded) .swf movie?
thx!
The New TellTarget()
Ive had people tell me that the tellTarget action is outdated. If this is true, which i believe becuase i cant even find it in normal mode with Flash mx, than what is the new action. Please someone help me out. Im sure there are a few, but whats the best way, and does it work in Flash 5 Player? Also wondering out of the blue if anyone knows the percentage of web users who have the flash 6 player. Is it alot? Should i still be designing for 5? Thanks again.
TellTarget Or What
i have a man MC walking, he has frames in him that make him look like he is walking, and when he gets to a certain point, he stays in the same place, and the ground starts to move.
this is what i have so far: this code is on the ground MC.
onClipEvent (load) {
if (man._x=250) {
this._x-=5;
}
}
I don't know what the problem is.
Please help me.
Also, if you can help me, when the man gets to the point and stops but the ground moves, i would like his frames to keep playing until i let go of the key.
With Vs TellTarget
FlashMX
Imagine 3 movieClips on the stage named ball1, ball2 and ball3.
For example, I want to hide them. I could write:
_root.ball1._visible = false;
_root.ball2._visible = false;
_root.ball3._visible = false;
But, what if, instead of three, I had fifty? (ball1 to ball50)
I tried to use
for (i=1; i<=3; i++) {
tellTarget ("_root.ball"+i) {
_visible = false;
}
}
and it does work.
But first, I had tried
for (i=1; i<=3; i++) {
with ("_root.ball"+i) {
_visible = false;
}
}
and this doesn't!!!
As "tellTarget" is deprecated, and "with" should be used instead, I can't understand what the problem is. Is "tellTarget" the only way to do this? Is there a different way suing something else? And what is behind of the failure of "with"?
TellTarget
allo allo.
Very basic problem, I think!
I have two movie clips on the main timeline, MC one(instance "birth") is in frame one(an intro animation) and as a stop action on the frame; the second MC(instance "rotate") is on frame 2. I have a button nested in MC one that I want to play MC two when it is pressed. Here is the current scripting:
on (release) {
tellTarget (_root.rotate) {
play ();
}
}
What happens is that MC one just plays again when I hit the button. I have tried the with action with gotoAndPlay as well.
Can you help please?
respect L
TellTarget
Hope someone can shed some light...
I have a back button in an MC on the main timeline, when I click on a button in this MC I want to go to another MC within an another MC.
The first MC to go back to has instance name 'navi' and the second MC within 'navi' has the instance name 'workingWithNavi2'
This is my code...
on (release) {
tellTarget ("_root.navi.workingWithNavi2") {
gotoAndPlay(1);
}
}
Of course it doesn't work and when testing the button in the movie I get this error:
Target not found: Target="_root.navi.workingWithNavi2" Base="_level0.instance20"
Any help most grateful!
TellTarget
hi everyone,
not run much on MX and its been a while since i got heavily into scripting...
just wondered what the new preference is for tellTarget and where can i find an index, of sorts, as to the new actions and updates. thanks.
_
by the way this is what i had for the flash5 a/s that i want to add a tellTarget to:
onClipEvent (load) {
this.clickX = 100;
this.clickY = 300;
this.clicked = false;
this.stopped = false;
this.friction = this.orgF=.8;
this.tension = this.orgT=.4;
this.scalar = 3;
this.orgX = this.xTarget=this.curX=this._x;
this.orgY = this.yTarget=this.curY=this._y;
this.boxWidth = 50;
this.boxHeight = 100;
this.left = this._x-boxWidth*.5;
this.right = this._x+boxWidth*.5;
this.top = this._y-boxHeight*.5;
this.bottom = this._y+boxHeight*.5;
}
setProperty("_root.un", _alpha, "0");
setProperty("_root.jburg", _alpha, "0");
setProperty("_root.competition", _alpha, "0");
setProperty("_root.man", _alpha, "0");
setProperty("_root.downloads", _alpha, "0");
setProperty("_root.box_office", _alpha, "0");
removeMovieClip("_root.un");
removeMovieClip("_root.jburg");
removeMovieClip("_root.competition");
removeMovieClip("_root.man");
removeMovieClip("_root.downloads");
removeMovieClip("_root.box_office");
}
onClipEvent (enterFrame) {
if (!clicked) {
curX = _root._xmouse;
curY = _root._ymouse;
if (curX>left && curX<right && curY>top && curY<bottom) {
xTarget = curX;
yTarget = curY;
friction = (friction>orgF) ? orgF : friction += .1;
tension = (tension>orgT) ? orgT : tension += .1;
} else {
friction = (friction<.2) ? .2 : friction -= .1;
tension = (tension<.2) ? .2 : tension -= .1;
if (count>move) {
xTarget = (Math.random()*boxWidth-(boxWidth*.5))+orgX;
YTarget = (Math.random()*boxHeight-(boxHeight*.5))+orgY;
move = Math.random()*100;
count = 0;
} else {
count++;
}
}
this.xDist = orgX-this._x;
this.yDist = orgY-this._y;
this.dist = Math.sqrt((xDist*xDist)+(yDist*yDist));
this._xscale = this._yscale=100+dist*scalar;
this._x += ax=(ax+(xTarget-this._x)*tension)*friction;
this._y += ay=(ay+(yTarget-this._y)*tension)*friction;
} else if (!stopped) {
this._xscale = this._yscale += (100-this._yscale)*friction;
this._x += ax=(ax+(this.clickX-this._x)*tension)*friction;
this._y += ay=(ay+(this.clickY-this._y)*tension)*friction;
if (Math.abs(ax)<.2 && Math.abs(ay)<.2) {
this.stopped = true;
}
} else {
continue;
}
}
onClipEvent (mouseUp) {
xm = _root._xmouse;
ym = _root._ymouse;
if (xm>left && xm<right && ym>top && ym<bottom) {
this.clicked = true;
}
}
-
cuse
TellTarget
If tellTarget is depreciated, what replace it?
In other words, how would I re-write this with out tellTarget?
Code:
// begin the movie loop that sends the slider upwards
on (press) {
tellTarget ("_root.up") {
gotoAndPlay (2);
}
}
// stop the movie loop that sends the slider upwards
on (release, releaseOutside) {
tellTarget ("_root.up") {
gotoAndStop (1);
}
}
TellTarget
hello and thank you for your time.
i have a button in a movie clip (movie is located in frame 4 of scene 1) that i want to, on release, take the viewer to frame 66 in another movie clip (new movie is located in frame 5 of scene 1). the following is not working as none of my other attempts...
on (release) {
tellTarget ("_root.mov_music") {
gotoAndPlay ("Scene 1", 66);
}
}
TellTarget
hello and thank you for your time.
i have a button in a movie clip (movie is located in frame 4 of scene 1) that i want to, on release, take the viewer to frame 66 in another movie clip (new movie is located in frame 5 of scene 1). the following is not working as none of my other attempts...
on (release) {
tellTarget ("_root.mov_music") {
gotoAndPlay ("Scene 1", 66);
}
}
Sorry My Bad... (Telltarget?)
Ok, I think I didn't explain myself well enough? I recently posted a thread and got a few responses that I didn't understand. So this is the scenario again:
I have 1 html page consisting of 2 frames (html pages) one is called mainFrame and the other is called leftFrame.
Also I have a swf plug-in in each frame:
mainFrame = uprizer.swf
leftFrame = left_side.swf
Hope this makes sense?
What I wanna do is hit a button in uprizer.swf movie (located in the mainFrame) and have the left_side.swf movie(located in the leftFrame) goto (ex.) frame 10 and play. Is this possible.
Thanks.....so confused!!!
Telltarget ('s)?
Can I have multiple telltargets? I want 5 different movie instances to goto 1 and stop.....do I have to make 5 different telltarget commands or can I do them all in one? Seperated by commas or something?
This is how it looks now (buttton action, release):
}
on (release) {
tellTarget ("_root.comp") {
gotoAndStop(1);
}
}
on (release) {
tellTarget ("_root.solu") {
gotoAndStop(1);
}
}
on (release) {
tellTarget ("_root.case") {
gotoAndStop(1);
}
}
on (release) {
tellTarget ("_root.contact") {
gotoAndStop(1);
}
}
I tried this...seperating with commas but then it's only the last telltarget command that works?
on (release) {
tellTarget ("_root.comp", "_root.solu", "_root.case", "_root.contact") {
gotoAndStop(1);
}
}
So only _root.contact would goto 1 and stop the rest would be ignored?
Thanks,
Mik
Telltarget Help, Please Help
Yo guys,
I am using a telltarget action on a button to control a movieclip but i am having problems. the movieclip is not on the main scene but not on the same clip as the button and the button is coming up with a message "Target cannot be found". The movieclip is one movie below the button.
It goes:
Scene 1 which contains a movie clip that contains another movie clip that contains the button. The movie clip i want to control in in the first move clip. I kno that if you put a / before the movieclip name in telltarget then it will control the movie clip on the main scene. Could anyone tell me how I can control this movie clip using telltarget without moving the button onto the same movie clip as the one that contains the movie clip i want to control.
Thanks alot!
JAM
TellTarget
since tellTarget isn't supposed to be used anymore with MX, what would I use to do the following:
tellTarget ("box"+x) {
gotoAndStop("Start");
}
TellTarget Or Something Else....
Ok....
I got a question, maybe it's difficult or maybe it's to simple to say...
I got a main movie wich contains out of two layers, in both layers is one frame.
In the top frame is the real movie.
In that movie I have a button, when the button is pressed i want it to start play a movie called login (it has a stop on frame one and a framelabel named start at frame 5)
But everything i try, it does not work, i have tried many different telltarget options and many other scripts but nothing works, i'm getting desperate...
I've tried the next codes allready:
on (release) {
_root.gotoAndPlay("start");
}
And this:
on (release) {
tellTarget ("login") {
gotoAndPlay (5);
}
}
And this:
on (release) {
tellTarget ("login") {
gotoAndPlay (start);
}
}
I also tried to put the movie on the _root of the movie and did this:
on (release) {
tellTarget ("_root.login") {
gotoAndPlay (5);
}
}
And of course the gotoAndPlay (start)....
I've tried a couple of others codes wich I can't remember at this time...
But NOTHING works...what am I doing wrong...plz help because I'm getting really frustrated even when I'm typing this...
Telltarget
in scene 1, i have a movieclip called members,
in members i have some buttons and another movieclip called x9pres
ive assigned this code to one of the buttons
on (release) {
tellTarget ("x9pres") {
gotoAndPlay (25);
}
}
but when i run the movie and press the button
i get the error message
Target not found: Target="x9pres" Base="_level0.instance27"
why isnt it working
TellTarget Vs. With
I need some help making a dynamic function using a "With" statement.
I've got the following function that operates my dropdown menus:
Button Script for "Portfolio" Button:
on(Release) {
MenuDOWN("dd_portfolio");
}
MenuDOWN Function that sets the menu in motion:
function MenuDOWN(menuname) {
tellTarget(menuname) {
gotoandPlay("Down");
}
}
What I really want is to convert the "TellTarget" part into a "With" statement - something like:
function MenuDOWN(menuname) {
with(menuname) {
gotoandPlay("Down");
}
}
However, when I do this, nothing happens! What would be the proper syntax/code to get this working?
Thanks!
Telltarget?
Hi Guys,
Hope someone can help!
I have a movie called controller - presently i have code which point back and plays different sections of another movie called "main".
This is the code i have:
tellTarget ("/main") {
gotoAndPlay(10);
}
stop();
I also need to play a section in the actual Scene 1 - so not a movie, a position in a scene - how can i do this? I can't use telltarget can i as this is only for movies.
Any help would be greatly appreciated!
Using Telltarget
i have just figured out how to use telltarget (in flash mx) and it works fine... only if i have the mc in the root timeline.
Is there a way to control a movie clip which is within a button which is on the main timeline.
flash help tells you to put a level in (_level0) instead of _root but i have no idea what level my button is on.
do you have to define which level the button is on first?
sorry i am not very good at explaining my problems.... any help would be much appreciated.
Telltarget?
Hi guys! A little problem!
I have a button, and when the mouse is push and release i get a text showing with this script:
on(release) {
tellTarget("over") {
gotoAndPlay(2);
}
}
and its working!
But if i ad that script to a button, "in a movie", it dont work. I get this:
Target not found: Target="over" Base="_level0.buttons"
please help me?
TellTarget Between Swf
hey i have an swf loaded into my root movie and for some reason the second level will not communicate with the _root.movieclip why is this, i'm using this command
on (release){
gotoAndPlay(2);
tellTarget("_root.nav"){
gotoAndPlay(1);
}
}
wtf???
Need To Use Telltarget
How do I write this without telltarget?
Code:
if (result == "Tie") {
tellTarget ("pl"+totalhands) {
gotoAndStop(2);
}
}
"pl"+totalhands is a duplicated movieClip. I want it to go to frame 2 when result is "Tie".
TellTarget
I made a movie and named it "scissors" and it is located under a guide layer.
In action script I tried
tellTarget("scissors"){
stop();
}
when the flash ran error came up.
Anyone can help.
I appreciated if someone can help me out.
TellTarget
hi,
i m using tellTarget function . i made a movieclip and i want to navigation in that movie clip.
if movieclip in first frame tellTarget is working.
but if movieclip on other frame tellTarget.not wotking.....
what is _level .....what is the good way of using tellTarget...
how we can avoid target not found error //
[F8] TellTarget Or What?
I'm using telltarget in my code like this btn code here:
on (release) {
gotoAndStop("gallery1");
}
on (release) {
tellTarget (_parent._parent) {
gotoAndPlay("gallery");
}
}
I learned this method awhile ago have been away from flash for a few years,
recently read that you shouldn't use it anymore? what would be a better F8
solution. I'm have some weird issues with my project like the movie getting stuck in a loop, and wonder if this could be the cause.
TellTarget?
I'm totally new to actionscripting but can anyone tell me does this code make sense...
on (rollOver) {
tellTarget ("trading_mov") {
gotoAndPlay("play");
}
}
on (rollOut) {
tellTarget ("trading_mov") {
gotoAndPlay("out");
}
}
basically I'm trying to have a button with a rollover that tells a movie clip to play a label and then on roll out play another label within the same movie clip.
many thanks if you can help
D
TellTarget?
I'm totally new to actionscripting but can anyone tell me does this code make sense...
on (rollOver) {
tellTarget ("trading_mov") {
gotoAndPlay("play");
}
}
on (rollOut) {
tellTarget ("trading_mov") {
gotoAndPlay("out");
}
}
basically I'm trying to have a button with a rollover that tells a movie clip to play a label and then on roll out play another label within the same movie clip.
many thanks if you can help
D
What Th...I Still Have To TellTarget?
On a simple rollover (font changes color, how easy does it get?) the following does not work:
on(rollOver) {
this.my_mc.goToAndPlay(5);
}
but the traditional flash5 tellTarget works just fine.
on (rollOver) {
tellTarget (this.my_mc) {
gotoAndPlay(5);
}
}
I don't get it. (rollEyes) ?????
Telltarget
ok whats the deal with mx and Telltargets. i cant seem to make it work. it doesnt read the Telltarget. can anyone help......i dont know if im the only one with this problem. im not new to this program i just dont know whats up with FlashMx and Telltargets. did they change something in that erea?......can any one help? please email me if you have to.
|