Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 919
  • Last Modified:

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
0
Ozwazza
Asked:
Ozwazza
  • 11
  • 9
1 Solution
 
cwickensCommented:
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.
0
 
OzwazzaAuthor Commented:
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
0
 
cwickensCommented:
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.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
cwickensCommented:
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.
0
 
OzwazzaAuthor Commented:
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
0
 
cwickensCommented:
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
0
 
cwickensCommented:
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?
0
 
OzwazzaAuthor Commented:
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.
0
 
cwickensCommented:
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
0
 
OzwazzaAuthor Commented:
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?
0
 
cwickensCommented:
no, if you put that right on the last frame, not an object, you should be fine.

What error did you get?
0
 
OzwazzaAuthor Commented:
1180: Call to a possibly undefined method getURL
0
 
cwickensCommented:
What version of Flash are you using?
0
 
OzwazzaAuthor Commented:
Adobe Flash CS3 Professional V9.0
0
 
cwickensCommented:
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 ) );
}
0
 
OzwazzaAuthor Commented:
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).
0
 
cwickensCommented:
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!");
}
}
0
 
OzwazzaAuthor Commented:
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.
0
 
cwickensCommented:
Is the intro movie on the index page?

Oh, and change the
navigateToURL(request, '_blank');
to:
navigateToURL(request, '_self');
0
 
OzwazzaAuthor Commented:
HI, did the _self change and it worked fine. Cheers for this.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

  • 11
  • 9
Tackle projects and never again get stuck behind a technical roadblock.
Join Now