Skip to main content
Participating Frequently
April 12, 2010
Question

Flash Intro then auto load HTML Home Page

  • April 12, 2010
  • 1 reply
  • 5509 views

I have created a Flash Intro that I have published as HTML and SWF. I
have placed this into my HTML file. I need to know how to call up my home page HTML after the SWF file ends. I can call up the page
or watch the movie but I can't get the page to call up after the movie is over. What do I need to do to (automatically load) call the HTML from the end of
the Flash movie?
Operating System:

Thank You.

Doug

Doug@countrymorningfarms.com

This topic has been closed for replies.

1 reply

pziecina
Brainiac
April 12, 2010

Hi

You would do this using actionscript by placing a loadPage action in the last frame of your swf/fla file.

PZ

Participating Frequently
April 12, 2010

When I use the code:

stop();
loadPage ("www.countrymorningfarms.com/cmfhome.html");

I get an error "call to a possibly undefined method"

I am using Flash CS4.

Any help you can give me would be appreciated.  I would also like to know if I have to post this to a live web host to test properly or if I can test it locally.


Thanks,

Doug

Participating Frequently
April 14, 2010

Hi

You will have to point it to your local file for testing then change it again for the live version.

PZ

Update: or use site relative links.

Message was edited by: pziecina


PZ,

Thanks for the help.  Here is the code that finally worked.

var url:String = "http://file:///C:/Website_Design/Test_Files/";
var request:URLRequest = new URLRequest("cmfHome.html");
try {
  navigateToURL(request, '_parent'); // second argument is target
} catch (e:Error) {
  trace("Error occurred!");
}

I have been trying to solve this problem for a week.  Well done.

Doug


PS  What is a site relative link?