Skip to main content
Participant
May 23, 2009
Answered

getURL Problem, probably easy to solve

  • May 23, 2009
  • 1 reply
  • 794 views

Hello Adobe Forums, my first post here!

I have a problem. Im very new with Adobe Flash CS3, i just started. Now i have a flash-movie with 60 frames. It goes from very blurry to normal, thats all fine. Now i have stop( ); on the last frame (to stop the animation, i dont want it to repeat again) . Now i want that you can click the animation so you will be forwarded to a following page. So after some google'ing, i found this:

on (release) {

getURL(”http://www.your-desing.com/main”, “_self”);

}

So, i also put that in the last frame, and i have:


stop( );

on (release) {

getURL(”http://www.your-desing.com/main”, “_self”);

}

But then i get an error:

1087: Syntax error: extra characters found after end of program.

Source of the error:

on (release) {

I dont get it? And when i have it (and when i ignore the error), i try to play the movie, but then it starts repeating itself again, but before the getURL thing it didnt started repeating itself. So, thats my problem. The names of my properties are: gasmask (Movie clip) and gasmask1 (bitmap) .

Can anyone help me out, or can somebody give me the correct code for it? Many many thanks in advance!

Greetings from Bas.

This topic has been closed for replies.
Correct answer kglad

you can click it when it's stopped but you probably won't open that url from the test environment.  it would be easiest to test that with the html and swf uploaded to an online server.

1 reply

kglad
Community Expert
Community Expert
May 23, 2009

attached to your last frame should be:

stop();

this.onRelease=function(){

getURL("http://www.your-desing.com/main","_self");

}

// p.s.  should that be your-design.com?

Participant
May 23, 2009

Wow! It actualy works! First i got an error again, then i made it again (the animation) and now it works. Thank you so much kglad!

I have 1 more question: is it right when you do: CTRL+Enter (to view the animation) you cant click it when its stopped? (Because you have to click it to be redirected to the next page, ofcourse)

Thanks again/in advance!

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
May 23, 2009

you can click it when it's stopped but you probably won't open that url from the test environment.  it would be easiest to test that with the html and swf uploaded to an online server.