Solved

Insert flash movie  - transition ot image map

Posted on 2008-06-24
20
912 Views
Last Modified: 2012-06-21
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
Comment
Question by:Ozwazza
  • 11
  • 9
20 Comments
 
LVL 5

Expert Comment

by:cwickens
ID: 21864626
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
 

Author Comment

by:Ozwazza
ID: 21870951
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
 
LVL 5

Expert Comment

by:cwickens
ID: 21871360
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 5

Expert Comment

by:cwickens
ID: 21871366
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
 

Author Comment

by:Ozwazza
ID: 21872341
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
 
LVL 5

Expert Comment

by:cwickens
ID: 21873942
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
 
LVL 5

Expert Comment

by:cwickens
ID: 21873959
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
 

Author Comment

by:Ozwazza
ID: 21880038
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
 
LVL 5

Expert Comment

by:cwickens
ID: 21880123
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
 

Author Comment

by:Ozwazza
ID: 21880272
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
 
LVL 5

Expert Comment

by:cwickens
ID: 21880290
no, if you put that right on the last frame, not an object, you should be fine.

What error did you get?
0
 

Author Comment

by:Ozwazza
ID: 21880325
1180: Call to a possibly undefined method getURL
0
 
LVL 5

Expert Comment

by:cwickens
ID: 21882581
What version of Flash are you using?
0
 

Author Comment

by:Ozwazza
ID: 21895696
Adobe Flash CS3 Professional V9.0
0
 
LVL 5

Expert Comment

by:cwickens
ID: 21899171
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
 

Author Comment

by:Ozwazza
ID: 21904033
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
 
LVL 5

Expert Comment

by:cwickens
ID: 21906840
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
 

Author Comment

by:Ozwazza
ID: 21912558
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
 
LVL 5

Accepted Solution

by:
cwickens earned 500 total points
ID: 21915360
Is the intro movie on the index page?

Oh, and change the
navigateToURL(request, '_blank');
to:
navigateToURL(request, '_self');
0
 

Author Comment

by:Ozwazza
ID: 21922322
HI, did the _self change and it worked fine. Cheers for this.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to dynamically set the form action using jQuery.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question