A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Animated menus

  1. #1
    Junior Member
    Join Date
    Oct 2008
    Posts
    3

    Animated menus

    Hi All,
    I am trying to replicate something like the menu from this site..
    http://meubelenvanaerde.be/

    But i am having some trouble figuring out where best to start, it seems I can do it linearly (as in menu item 1 - scroll to item 2 - to item 3 etc) however making it animate from menu item 1 - item 3, or say menu item 2 to 4 (more dynamically) i am struggling with..

    any pointers as to the best way to go about this would be great.

    Thanks!

  2. #2
    rabid_Delineator AttackRabbit's Avatar
    Join Date
    Dec 2003
    Location
    Orlando, Florida
    Posts
    481
    Thats going to be really difficult to do on the timeline , and to have it work flawless and not all buggy.

  3. #3
    Junior Member
    Join Date
    Oct 2008
    Posts
    3
    Quote Originally Posted by AttackRabbit View Post
    Thats going to be really difficult to do on the timeline , and to have it work flawless and not all buggy.
    Yeah thats what I figure - can you suggest a better method to do this?

  4. #4
    rabid_Delineator AttackRabbit's Avatar
    Join Date
    Dec 2003
    Location
    Orlando, Florida
    Posts
    481
    well it really depends on your skill level with actionscript and encapsulation. The way i would do it would be to have an xml file , with everything in it. so you would start with your top level items, in that examples case :

    home , catalog , info , etc

    so your xml would be something like

    <xml>
    <site>
    <nav>
    <navItem name="HOME" id="home">
    <subItem name = "SOMETHING GERMAN" id="wierdTHing"/>
    <subItem name = "SOMETHING ELSE GERMAN" id="wierdTHing2"/>
    </navItem>
    </nav>
    <navItem name="INFO" id="info">
    </navItem>
    </nav>
    </site>

    Then in your application , you would load your xml. Upon load complete , you parse your xml, and pass the object containing the nav node data into your nav which i wrote as a seperate class.

    so something like :

    nav = new Nav( xml.nav );
    addChild( nav )

    then in your nav , you would have an empty movieclip to hold the items ,
    and you would do a check to see if each nav item had subitems assocaited with it , if it does , once the top level nav is finished , you would call a sub routine like : addSubItems( id ) : where id is the numeric value of the node with nav that contains sub items.

    then in someother holder you would do the same thing , recursively loop through your data object , at the provided id number , and populate that other movieclip with sub items.

    Then onclick , of a subitem , you would dispatch an event

    dispatchEvent( new Event( "onNavigate" , true , false ));

    which would propagate up to the parent class , or to a sections manager , which would , say something like

    sectionManager.updateSection( evt.target.id )

    Theres a lot more to it then just that , but thats the o.o.p way of approaching a nav and sub nav and sections.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center