Confused

i’m studying the tutorial by kirupa “advanced rollovers”…

www.kirupa.com/developer/flash5/advroll.htm

in the tellTarget command he “calls” to a movie clip named “/rollover”…

why is the dash there?..

couldn’t you just say

tellTarget (".rollover")

i studied about button navigating and dealing with statements like…

_root.myMovieClip._alpha = 40

wouldn’t the same syntax with the period be relevant to tellTarget since your calling a movie clip?..

sorry… i know this is pretty newbish… but actionscripting is pretty new and i’m trying to figure it out as i go…

Macromedia have changed the syntax a bit through the versions of Flash and I think this is where the “/” bit came from. it would work with or without it.

But that’s irrelevant now. tellTarget, although it still works, is no longer in common usage in 5 and MX.
the statements with the periods such as you mentioned are known as dot syntax and this is how it’s done nowadays.

on (rollOver) {
tellTarget (“rollover”) {
gotoAndPlay (“1text”);
}
}
should be written as:

on (rollOver) {
rollover.gotoAndPlay(“1text”);
}

this is more efficient and is now the standard way.

boy… i’m learning certain methods and growing in knowledge only to find that i need to rework what i’m learning… you guys are trying to make this hard on me aren’t ya?..

so programing with tellTarget won’t work anymore?..

Are you working with 5 or MX because telltarget still works in MX. It’s just that it’s easier to use the dot sintax now.

i’m using 5… i understand the dot syntax… but tellTarget is just what i’ve been “used” to if you will…

/ syntax was Flash 4… same as TellTarget…

Flash 5 changed to . syntax, and depricated TellTarget (it will still work, just clumsy).

MX makes it even easier (I’m still learning .syntax myself)…

Rev

I have asked and suggested a few times that kirupa update that advanced rollOver tutorial to use the dot syntax because tellTarget is Flash 4 and if you are going to learn something you should learn the right and easier way to do it.

Not many people are beginning to learn in Flash 4 nowadays so I don’t see the harm in updating it :sure:

okay… lego… the line:

rollover.gotoAndPlay (“1text”); didn’t work… i applied the syntax to all the buttons in this form and the movie wound up messed up…

when i played it, the buttons only made the label “1text” operate… what have i done wrong?

wow…that’s bizarre, I’ve never come across this before.

What’s happening is this, the problem has arisen because the frame labels start with a number. it seems flash is going to and playing frame 1 because the labels start with 1. I tested it by changing the labels to start with 9 etc. and lo and behold it went to frame 9.
It doesn’t really make much sense to me, but that’s what’s happening.
Moral of the story, if you’re using frame labels, don’t start them with a number…