09 February 2011

Interactive Menu

To be honest, I did not know what to put in my index page, and I remember before when I researched for the layout of my website. Most of the portfolio page either start with a short paragraph to tell the visitor that what is it about, a HELLO page or a big navigation menu.



Therefore, I decided to put an interactive menu on my home page. I created this in Flash. This was another task for me that I have to spend more time to finish my website. I did lots of research of how to build an interactive menu. To build it and make it interact with the users is easy. The difficult section was how to make it link with the html pages that I created in Dream weaver. The principle is the same with Dream weaver “code edit”, but the format of the code is totally different. For a link in Dreamweaver with use the <a> tag to represent a link but in AS3 it is the following:

button_3.addEventListener(MouseEvent.CLICK, to_info);
function to_info(e:MouseEvent):void {
var url:String = "info.html";
var request:URLRequest = new URLRequest(url);
navigateToURL(request, '_self');
}

We have to set a name for the button in order to make it link with the action.


Before the action add and buttons create. Flash allows us to import Photoshop file. Therefore, I had used the lasso tool to cut the objects that I want interact and separate them in different layers then import it in Flash. Layers are automatically separate once import.


Then I have to convert the object that I cut out into a button. Once button create, go back to the scene then add the action. Save it and insert it into Dream weaver. Done!

No comments:

Post a Comment