Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with GetURL action for button 1

Status
Not open for further replies.

Ratbags21

Programmer
Sep 21, 2005
22
GB
Please please please...Help!

I have created a short movie which is embedded onto the index.htm of my website (I'm using Dreamweaver MX). I have also placed a button on the stage so that the user can click it to move to the main page of the website. The "button" is a "Button" symbol created from text "Skip Intro". All the files are on my hard drive waiting for upload to web server once I know everything is working.

I have added a "GetURL" action to the button but when I "test movie" and click nothing happens! Can someone help me with the correct syntax. Also, it would be nice if when the movie is finished, "mainpage.htm" is loaded automatically..

cheers folks
 
This should work if you attach to your button:
[tt]//
on (press) {
getURL("mainpage.htm", "_self");
}
//[/tt]

Note that "mainpage.htm" is an URL relative to your HTML page containing the SWF ("index.htm"). If you "test movie", most likely your default browser launches and spits error "no document found", because there is no "mainpage.htm" in your FLA directory. But it will work if you test your "index.htm" ("mainpage.htm" has to be in the same directory as "index.htm").

Place this in the last frame of your movie to go to "mainpage.htm" automatically when the movie is finished:
[tt]//
getURL("mainpage.htm", "_self");
stop();
//[/tt]

Kenneth Kawamoto
 
Thanks Kenneth,

Both tips worked just fine - thanks a million
much appreciated!

cheers

R21
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top