dcsimg
A Flash Developer Resource Site

Results 1 to 14 of 14

Thread: ------------can someone explain this navagation-----its basic-----------

  1. #1
    :the D. Ziner: GraphicsGuru's Avatar
    Join Date
    Apr 2003
    Location
    sitting in front of my computer.
    Posts
    379

    ------------can someone explain this navagation-----its basic-----------

    can someone help me out here,
    and tell me how the navagation on www.katrinamodel.com is built?

    tell me if I am on the right track or what I need to do to get there?

    So all it is, is the following:

    when you click the navagation button:
    there is movie clip which has the following buttons in it:
    -biography
    -stats
    -portfolio
    ect.

    these buttons alpha fade in and move to their correct position.

    Now?

    how do they stay in that position, and not move when you move the mouse over them. Like, there is a hit state on these buttons?

    Secondly,

    How do they make the buttons fade out, when you move the mouse out of the "hit area".

    Please help me. it's a huge help.

    explain in newbie terms...

    thank you, thank you, thank you.
    imac, do you?
    www.carpedenimjeans.com
    seize life.

  2. #2
    Senior Member
    Join Date
    Jul 2001
    Posts
    120
    BUMP
    i wanna know how to do it too...
    You have just read one of Alvin Tan's award-winning posts.

  3. #3
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    Hi,

    first create a new movie clip, give this the instance name container. in frame 1 of this leave a blank keyframe with a stop(); action and in the last frame also add a stop(); action.

    In between these 2 frames place your buttons (in separate layers within the clip) and use motion tweens to get them to slide up into position.

    Now return to the main timeline.

    Create a new button (give this the instance name showNav) and place it below your container clip

    Over the top of all create a large filled square (so the square is a reasonable amount bigger than the visible area of the clip will be) from this cut out a smaller square that the visible content in the container clip and the showNav button will be able to show through.
    Once you've made this cutout you should have an area of solid colour around the outside of the area where your buttons will eventually appear. convert this shape to a button and move the buttons contents into the hit frame (leaving the first 3 frames blank)
    Give this new button the instance name hiddenButton. This will be used to detect when the mouse has moved away from the nav bar.

    Now add some actions (in the timeline that contains your clips and buttons),

    code:

    this.hiddenButton.useHandCursor = false; // hide the mouse pointer when it is over the hiddenButton
    this.hiddenButton.onRollOver = function() {
    this._parent.container.onEnterFrame = rewind; // give the container clip an enterFrame event
    };
    this.showNav.onPress = function() { // show the navigation
    delete this._parent.onEnterFrame; // stop the enterFrame event
    if (this._parent.container._currentframe != this._parent.container._totalframes) { // if the navigation movie isn't in its last frame already
    this._parent.container.play(); // play the clip
    }
    };
    function rewind() { // function to make a clip play backwards
    this.prevFrame();
    if (this._currentframe == 1) { // if the beginning of the clip has been reached, we can't go back further so delete the enterFrame event
    delete this.onEnterFrame;
    }
    }


  4. #4
    :the D. Ziner: GraphicsGuru's Avatar
    Join Date
    Apr 2003
    Location
    sitting in front of my computer.
    Posts
    379
    I will def. try this tonight...
    I will be so happy if this works.


    thank you so much for your help.

    g.g

    "life as a newbie, coudn't be so rough"

    -ta ta!
    imac, do you?
    www.carpedenimjeans.com
    seize life.

  5. #5
    :the D. Ziner: GraphicsGuru's Avatar
    Join Date
    Apr 2003
    Location
    sitting in front of my computer.
    Posts
    379
    here is where I got stuck:

    you posted:

    Over the top of all create a large filled square (so the square is a reasonable amount bigger than the visible area of the clip will be) from this cut out a smaller square that the visible content in the container clip and the showNav button will be able to show through.
    Once you've made this cutout you should have an area of solid colour around the outside of the area where your buttons will eventually appear. convert this shape to a button and move the buttons contents into the hit frame (leaving the first 3 frames blank)

    **right now, there are only 3 things on my main timeline. (in order they would look on screen).
    1. the keyframe which has the invisible button, named hiddenButton.
    2.the container movie clip, which contains tweens of buttons, ect. and stop actions on first and last, in its own layer.
    3. the showNav button , which only has nothing special done to it. just a normal button. with normal frames filled, (up, over, hit)

    Where exacty do I place the AS?

    Im confused?

    sorry.

    imac, do you?
    www.carpedenimjeans.com
    seize life.

  6. #6
    Junior Member
    Join Date
    Jun 2003
    Posts
    4
    I tried it too, and i'm stuck also
    Do we dump the actionscript into frame1?
    And, i'm not sure if i have named my instances right... i did give the movie clip in the scene the instance name "container" except i don't know how to name the instances of the buttons other than when i created the button, and i'm sure this can't be right..?
    okie dokie thanks

  7. #7
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    Hi,

    The fla file is attached. I hope it helps
    Attached Files Attached Files

  8. #8
    :the D. Ziner: GraphicsGuru's Avatar
    Join Date
    Apr 2003
    Location
    sitting in front of my computer.
    Posts
    379
    Thanks so much for posting the fla. I should be able to see what exactly is going on now.

    Question?

    -Where exactly is your movie clip:

    mc: holder

    placed?

    I can't seem to find it, and this is what I was having trouble with.

    Also, like the example I gave you in the beginning, how do we make ours so that its not on a click, but on a roll-over? I think the user will find this easier to use. I'm sure its not that much diffrent, but moving something to the over state?


    Thanks alot...I really apprecaite all the help.

    g.g.
    imac, do you?
    www.carpedenimjeans.com
    seize life.

  9. #9
    :the D. Ziner: GraphicsGuru's Avatar
    Join Date
    Apr 2003
    Location
    sitting in front of my computer.
    Posts
    379
    never mind to my stupid question. (the first one)

    -I was not paying attention, def. noticed it. Didn't see the movie clip mark as it was covered by other layers.


    still pondering the second question.



    -g.g.
    imac, do you?
    www.carpedenimjeans.com
    seize life.

  10. #10
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    Hi,

    In the actions, find the line,

    this.showNav.onPress = function() {

    and change it to

    this.showNav.onRollOver = function() {

    now the menu appears when the show navigation button is rolled over instead of when it is pressed

  11. #11
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    oops, sorry I just noticed a small mistake in that function,

    this line,

    delete this._parent.onEnterFrame;

    should be,

    delete this._parent.container.onEnterFrame;

  12. #12
    :the D. Ziner: GraphicsGuru's Avatar
    Join Date
    Apr 2003
    Location
    sitting in front of my computer.
    Posts
    379
    anything, so it works on the rollover state?


    -if its a big deal don't sweat it..


    thanx.

    gg.
    imac, do you?
    www.carpedenimjeans.com
    seize life.

  13. #13
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    Make it work on rollover? thats up a couple of posts

    the events for the showNav button control the menu appearing. so instead of using an onPress event, you need an onRollOver event, thats the only change.

    the showNav events (in full should be)

    code:

    this.showNav.onRollOver = function() { // show the navigation
    delete this._parent.container.onEnterFrame; // stop the enterFrame event
    if (this._parent.container._currentframe != this._parent.container._totalframes) { // if the navigation movie isn't in its last frame already
    this._parent.container.play(); // play the clip
    }
    };


  14. #14
    :the D. Ziner: GraphicsGuru's Avatar
    Join Date
    Apr 2003
    Location
    sitting in front of my computer.
    Posts
    379
    nice.

    it worked..

    thank you very much...

    got another question:

    I got this text scroller I grabbed off here, a FLA, of course. And there is 15 diffrent sections of diffrent swf's on the site I am building that will be loading on diffrent levels. I wanted the scroller to appear on each section, but of course with diffrent text. I attempted to do this, but as I made one sections text in one scene, the other scene would change to the most recent text , I placed.

    -I tried to change the new text, and convert it to a new symbol (graphic) but had no luck.

    Is there any way I can do this, without having to build 15 diffrent scrollers? I can't even build one. I thought this sounded like a great idea but now here I am.

    Searching for help into the future...

    Thanks...I appreciate all the help.

    g.g.
    imac, do you?
    www.carpedenimjeans.com
    seize life.

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