Skip to main content
Participant
October 30, 2006
Question

problem with "/:trigger"

  • October 30, 2006
  • 5 replies
  • 421 views
I got some troubles with AS1.0 (player 6) which I want to convert to AS2.0 with flash player 8.0.

The errors i get is right here, who can help me convert it to AS2.0?

**Error** Symbol=script, layer=script, frame=2:Line 2: Unexpected '/' encountered
/:trigger = Number(/:trigger)+Number(/:trigger);

**Error** Symbol=script, layer=script, frame=2:Line 3: Unexpected '/' encountered
if (Number(/:trigger)>100) {

**Error** Symbol=script, layer=script, frame=2:Line 4: Unexpected '/' encountered
/:trigger = "100";

**Error** Symbol=script, layer=script, frame=2:Line 5: Unexpected '}' encountered
} else if (Number(/:trigger)<Number(-100)) {

**Error** Symbol=script, layer=script, frame=2:Line 6: Operator '/' must be followed by an operand
/:trigger = "-100";

**Error** Symbol=script, layer=script, frame=2:Line 7: Unexpected '}' encountered
}

Attach Code
This topic has been closed for replies.

5 replies

Inspiring
November 1, 2006
ahh, see i didn't know that "/:" was equal to "_root".
Inspiring
October 30, 2006
> So.. i have to change every /:trigger to var trigger?

No .. that was bad advise .. you need to change the '/:' into '_root.'
--
Jeckyl


N_H_L_Author
Participant
October 30, 2006
So.. i have to change every /:trigger to var trigger?
But what about the line: Number(/:trigger)+Number(/:trigger);
Inspiring
October 30, 2006
first of all is /:trigger exceptionable by AS2.0 and what does it do. i think it would be easier to make a var

like:

var trigger (minus the /:)

I know that will work
Inspiring
October 30, 2006
N.H.L.,

> The errors i get is right here, who can help me convert it
> to AS2.0?
>
> **Error** Symbol=script, layer=script, frame=2:Line 2:
> Unexpected '/' encountered
> /:trigger = Number(/:trigger)+Number(/:trigger);

As the error shows, you're using a character that doesn't make sense to
the compiler in this context. That character is a slash (/). What you've
got here is a case of old school slash syntax, which is the way objects and
movie clips were referenced in Flash 3 and 4. See details here:

http://livedocs.macromedia.com/flash/8/main/00001691.html


David Stiller
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design."