Solved

integrating flash based navigation bar on dreamweaver

Posted on 2009-07-03
6
483 Views
Last Modified: 2013-11-11
Hi all,

Newbie flash user here :)

I am creating a website and have decided to create my navigation bar using adobe flash cs4. In doing so, i opted to use movie clips so i can animate the buttons during mouse events, and not the typical on-off states when using the button symbol (much like when using fireworks).

To animate the buttons on mouse rollover and rollout, I used the AS 2.0 code as follows.

First off, how will I be able to integrate my flash navigation bar onto dreamweaver cs4 so it will link to the appropriate pages on my site? And as a side question, is there a way for me to achieve smooth animation (like tweens on movie clips) while using the button symbol?

Thanks!

Note: i have attached the flash movie if you would want to see the effect i am after. and since ee does not have the ability to upload .fla files, i changed the extension to .png. Just revert the extension to .fla or .swf to view the movie
b1.onRollOver = over;
b1.onRollOut = out;
b1.btntext.text = "Homepage";
 
b2.onRollOver = over;
b2.onRollOut = out;
b2.btntext.text = "Services";
 
b3.onRollOver = over;
b3.onRollOut = out;
b3.btntext.text = "Company";
 
b4.onRollOver = over;
b4.onRollOut = out;
b4.btntext.text = "Contact Us";
 
b5.onRollOver = over;
b5.onRollOut = out;
b5.btntext.text = "News";
 
function over(){
	this.gotoAndPlay(2);
}
function out(){
	this.gotoAndPlay(11);
}

Open in new window

navbar.png
0
Comment
Question by:ocamporuss
  • 2
  • 2
  • 2
6 Comments
 
LVL 18

Expert Comment

by:Graphixer
ID: 24774749
I'd probably do something like this:

b1.onRelease = function() {
        getURL("/");
}
 b2.onRelease = function() {
        getURL("/services/");
}

...etc, etc.

This should work on buttons and movie clips (but not graphics).  Let me know if that doesn't work, or if you had something else in mind.



0
 
LVL 30

Expert Comment

by:IanTh
ID: 24776645
have you thought about using a ajax/spry menu as its and it can be done by using the javascript css
0
 

Author Comment

by:ocamporuss
ID: 24783440
Thanks for the replies!

IanTh, thanks for the input but I have not used ajax/spry nor javascript before.. its only been a few weeks since i first opened dreamweaver and flash :) if you could help me do achieve my nav bar goal easier with those you mentioned, it would really be appreciated :)

Graphixer, I was able to use the code you provided, thank you very much. But I can't seem to find a way to integrate my flash file onto my dreamweaver file (unlike with a fireworks file, i can use the Insert >> Image objects >> fireworks html).

Any ideas? Thanks! :)
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 30

Assisted Solution

by:IanTh
IanTh earned 100 total points
ID: 24784222
have a look at my last web design and look ate the menu
http://www.up2youmobiles.co.uk/

the code for that is
<div id="menu">
      <ul id="MenuBar1" class="MenuBarHorizontal">
        <li><a href="../index.html">Home</a></li>
        <li><a href="../contactus.html">Contact Us</a></li>
        <li><a href="../phonerepair.html">Phone Repair</a></li>
        <li><a href="../phoneunlock.html">Phone Unlock</a></li>
      </ul>

but its really simple you just create a div for the menu I would do that in a template ( thats why they are ../ because its a template )as its not going to change really between pages then insert spry menu bar and say horizontal then in the properties panel for that spry widget or in code view you can change it to whatever you need
0
 
LVL 18

Accepted Solution

by:
Graphixer earned 400 total points
ID: 24787929
ocamporuss, can I make the assumption that you're publishing to SWF before trying to bring it in to Dreamweaver, and not just trying to import the FLA?  

Importing an SWF into Dreamweaver should be just as easy as it is to import an image (see image below).  If all else fails, you could always try dragging-and-dropping the SWF file into the Dreamweaver layout.

dw-swf.gif
0
 

Author Closing Comment

by:ocamporuss
ID: 31599509
Hi guys, thanks for all the help!

IanTh, thanks for the input, but i was not able to get the effects i got while using flash. i will try to study sprys/ajax on a later date, just have to finish my current project.

And to Graphixer, thanks a lot for your input! i was able to do what i wanted to with your help \m/ :D
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

786 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