Link to home
Start Free TrialLog in
Avatar of Ozwazza
OzwazzaFlag for Australia

asked on

Insert flash movie - transition ot image map

I have created a flash movie that I want to insert as an intro movie object.  Once the movie has played or the user clicks on the skip movie I then want it to go to an image map that I have created that is used as part of the site navigation.  How do I do this in Dreamweaver?  Is it using the Dreamweaver timeline or can I just swap images?

Cheers
Avatar of cwickens
cwickens
Flag of United States of America image

I'm not clear about what you are asking.  

If you want to edit the swf and add actions to it in Dreamweaver: you can't do that with Dreamweaver.

If you want to edit what the navigation in dreamweaver, you could set up an XML file that held the text and URL's and then either LoadVars() for flash 8 or LoadXML() for CS3 to import the data to your swf.
Avatar of Ozwazza

ASKER

I want the flash movie to appear and start as soon as someone enters the site, this I know how to do.  What I want is that at the end of the movie or when the user clicks on skip movie it needs to go from the swf file to an image map that I use for navigation.

Cheers
Warren
oh, ok I understand.  you put your intro movie on the default page with a link under it:
<a href="http://www.yourmainsitepage.com">Skip the Intro</a>

and the page it refers to will be your main content page.
you also want to add an onEnterFrame() to the last frame of your SWF with a getURL() function that will send the user to the main page.
Avatar of Ozwazza

ASKER

Sorry, its been awhile since I looked at FLash, and the last time all I had to do was more or less add a behaviour, how do I do this now?  I now know that I will need to have a default.asp page with this flash movie and then point to index.asp at the end of the movie, the SKIP INTRO points to the last frame.

cheers
Warren
no problem,

2 ways we can go about this, you can upload the intro movie FLA file (change the extension to jpg or txt first) and I can add the function for you and also post the function(s) I add here, or I can walk you through the writing and testing of the function(s).

Which would you prefer?  Either way, it might be easier to walk you through it if you post the SWF or FLA.

c
Oh, one other question...

You mention an "image map created as part of the site navigation" is that also a SWF or is that an image file?
Avatar of Ozwazza

ASKER

HI, probably easier to walk me through, I managed to add a gotoAndPlay(450) mainly through luck ;-)   This frame 450 is the last frame before the background layers fade out, from that point it will point to index.asp page (this I don't know how to do)

The image map is on the index.asp page and is not part of the swf file.
ok, so you will need to add (to the very last frame of the SWF) this function:

this.onEnterFrame = function(){
getURL("index.asp", "_self");
}

That should do it...

c
Avatar of Ozwazza

ASKER

Cheers, put the code in and it came up with an error, do I need to have an import line in there somewhere, like import flash.net.getURL?
no, if you put that right on the last frame, not an object, you should be fine.

What error did you get?
Avatar of Ozwazza

ASKER

1180: Call to a possibly undefined method getURL
What version of Flash are you using?
Avatar of Ozwazza

ASKER

Adobe Flash CS3 Professional V9.0
ok, so if you select your "skip intro" button to go to the index page, you have this:


onRelease = function() {
                  getURL("index.asp", "_self");
}

and on the last frame of the movie clip (click on the last frame in your timeline and then press F9 to open the actions panel) you can try this:

this.onEnterFrame = function(){
                 var urlTag:String = "http://www.mysite.com/";
                  navigateToURL( new URLRequest( urlTag ) );
}
Avatar of Ozwazza

ASKER

HI, another step closer, when I publish it comes up with this warning:
Warning: 1090: Migration issue: The onEnterFrame is not triggered automatically by Flash Player at run time in ActionScript 3.0.  You must first register this handler for the event using addEventListener ( 'enterFrame', callback_handler).
oh, that's right...  with AS3 we need to tell the player to 'listen' for the enterframe...and set up the getURL as navigateToURL...  I tried this and it worked for me.

this.addEventListener(Event.ENTER_FRAME,EnterFrame );
function EnterFrame(event:Event):void {
    var url:String = "index.asp";
    var request:URLRequest = new URLRequest(url);
       try {
      navigateToURL(request, '_blank'); // second argument is target
      } catch (e:Error) {
      trace("Error occurred!");
}
}
Avatar of Ozwazza

ASKER

Hi, sort of works.  Goes to the index page but gets stuck in an infinite loop so that it continually loads IE windows until memory gets used up.
ASKER CERTIFIED SOLUTION
Avatar of cwickens
cwickens
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ozwazza

ASKER

HI, did the _self change and it worked fine. Cheers for this.