Solved

Insert flash movie  - transition ot image map

Posted on 2008-06-24
20
903 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The goal of the tutorial is to teach the user how to how to record live broadcast.

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now