Redirecting to a new URL after a Flash File has finished... How to

I have a web site that starts with an intro... I can't seem to figure a way to automaticly redirect to a specific URl when the flash file is done playing.
Who is Participating?
blue-genieConnect With a Mentor Commented:
in AS3 you can't use getURL.
your code needs to go into the flash not the JS/HTML to embed the flash.
is it a simple case of when the flash reaches the last frame its' done?
what are you using AS3 or AS2?
in the former - URLRequest

package {
    import flash.display.Sprite;

    public class URLVariablesExample extends Sprite {

        public function URLVariablesExample() {
            var url:String = "http://www.[yourDomain].com/application.jsp";
            var request:URLRequest = new URLRequest(url);
            var variables:URLVariables = new URLVariables();
            variables.exampleSessionId = new Date().getTime();
            variables.exampleUserLabel = "guest";
   = variables;

in the latter - getURL("", "_blank");
zmann800Author Commented:
Yes, I just want it to redirct once the last frame of the flash is reached.

I am using AS3.

Can you help me decide where this goes in my code?
getURL("", "_blank");

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body {
      background-color: #000000;
      margin-left: 100px;
.style1 {
      font-family: Impact;
      font-size: 18px;
      color: #FFFFFF;
<script type="text/javascript">
function MM_CheckFlashVersion(reqVerStr,msg){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){  
      var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "";
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>

<body onload="MM_CheckFlashVersion('8,0,0,0','Content on this page requires a newer version of Adobe Flash Player. Do you want to download it now?');">
  <script type="text/javascript">
AC_FL_RunContent( 'codebase',',0,0,0','width','640','height','480','id','FLVPlayer','src','FLVPlayer_Progressive','flashvars','&MM_ComponentVersion=1&skinName=Clear_Skin_1&streamName=UCFTrailer2&autoPlay=true&autoRewind=false','quality','high','scale','noscale','name','FLVPlayer','salign','lt','pluginspage','','movie','FLVPlayer_Progressive' ); //end AC code
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=",0,0,0" width="640" height="480" id="FLVPlayer">
    <param name="movie" value="FLVPlayer_Progressive.swf" />
    <param name="salign" value="lt" />
    <param name="quality" value="high" />
    <param name="scale" value="noscale" />
    <param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Clear_Skin_1&streamName=UCFTrailer2&autoPlay=true&autoRewind=false" />
    <embed src="FLVPlayer_Progressive.swf" flashvars="&MM_ComponentVersion=1&skinName=Clear_Skin_1&streamName=UCFTrailer2&autoPlay=true&autoRewind=false" quality="high" scale="noscale" width="640" height="480" name="FLVPlayer" salign="LT" type="application/x-shockwave-flash" pluginspage="" />  
This is exactly what I've been looking for, but I tried blue-genie's AC3 script and this error kicked back when I was  converting the fla to a swf:
1037: packages cannot be nested.

I made a keyframe at the end of the movie and Flash added the customary additional frames which totaled the entire timeline to 264 (those adidtional frames came out as repeat stills of the last frame. I  entered the code with my desired url at the keyframe (137)


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.