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
Legend
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

Sorry for the delay in replying but I was away yesterday.

When I said loadPage this was a pseudo code function not a real actionscript function, try -

var url:String = "http://site";
var request:URLRequest = new URLRequest(url);
try {
  navigateToURL(request, '_blank'); // second argument is target
} catch (e:Error) {
  trace("Error occurred!");
}

Replace the stop() function with this, don't forget to replace the http://site with the address for the page you wish to load.

PZ


Thanks for the help.  I really appreciate it.  I will give that code a try.  Question.

Will that code work if I am testing on a local server or will it need to be a live test site for the URL to work?

I don't currently have a live test site available.


Thanks Doug