views:

56

answers:

2

I am new to flash and just learned some action Script 3 with some events.

I have to build site with dynamic menus and then contents for each page using xml.

Is there any example on web to show how I can build the site.

What is GAIA , will it help me or I should code my self

Thanks

+4  A: 

First, before people starts a "flamewar" against Flash, let me remind you that depending on your usage of the website, you wont get much "help" from Search engines such as Google, if you produce a website in complete Flash.

The SWF files are considered much like graphic, which is hard for computers to make any sense out of automatically.

So unless you do a lot of "pre-thinking" and "tricks" to make the pages of content selectable through normal URL's such as http://www.mywebsite.com/?page_id=home

Then you are in my opinion already on the wrong path.

Think of Flash as "a closed box". What you put in there can look awesome, but it has downsides when producing widespread websites.

Actionscript 3.0 is close to what Javascript (eg. browser script without plugins) and C# (Microsoft .NET) looks like.

Dynamic menus can be produced without Actionscript and Flash. There are loads of ways with DHTML (Dynamic HTML) - have a look at jQuery (www.jquery.com) and all the plugins or UI they have build - for you... for free.

Those will most of the time be "ok" for search engines.

Now... your question:

Actionscript 3.0 - load menu from XML.

First you need to design your XML format, lets say:

<?xml version="1.0" encoding="utf-8"?>
<navigation>
    <menu sortorder="1" url="page1.htm" />
    <menu sortorder="2" url="page2.htm" />
    ...
    <menu sortorder="99" url="page99.htm" />
</navigation>

From this you can select your "Decandents" called "menu". By reading all these into an array you can build the visual menu. Search for keywords such as: "actionscript, xml, menu" on Google for loads of samples.

Secondly you need some way for "storing" your page contents, so that you have something to show. You havent provided us with much details, so its hard to know if you will use normal HTML pages or just need text.

You can store those into XML files too. Same approach as above, or in a separate XML file per page like:

<?xml version="1.0" encoding="utf-8"?>
<page>
    <title>My test page</title>


    <headline>Here is the header</headline>
    <text>Here is some test text</text>
</page>

Problem with this approach though is that it starts to look A LOT like normal (X)HTML:

<?xml version="1.0" encoding="utf-8"?>
<html>
    <head>
         <title>My test page</title>
    </head>

    <body>
          <h1>Here is the header</h1>
          <p>Here is some test text</p>
    </body>
</html>

What I am saying is: make sure your goal is right and you choose the right tool for the task. Customers aren't always right. Infact, they often come to us, because they have an idea, but dont know how to make it become real.

You be the expert!

BerggreenDK
There are already available options such as SWFAddress to solve the deep-linking problem, and Flash sites can be SEO'd and indexed by Google like any other site, but that depends on the developer to make sure the Flash site is set up for that from the beginning. I agree that Flash isn't often the right tool for an entire site, and that the OP would be wise to explore jQuery and some other options, but a lot of the old arguments about deep-linking and SEO just aren't true anymore.
nerdabilly
Okay, let me try to explain it again. Flash is an "applet/application" - any script language used to build up a site, will require some parametres to open up exactly to the same page. You dont get this for free with Flash. You'll have to build special parts to "fix" what normally is standard i HTML. And yes, some parts of Flash can be indexed by Google, but what does it give when you click the link? most of the time, the "intro/front page" - not the actual content = useless SEO again. Dont take me wrong, I use Flash too for "elements" but never whole sites. Use HTML5 instead.
BerggreenDK
A: 

To add to what BerggreenDK said above: Use flash to complement a DHTML website, say for adding banners, videos etc, but not to build one.

Nivas
@Nivas exactly, thats how I use Flash!
BerggreenDK