A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: Help please

Hybrid View

  1. #1
    Junior Member
    Join Date
    Jul 2006
    Posts
    28

    Help please variable?

    ok guys need some help, i have a website that the home page has buttons in the middle so once clicked the bar goes to the top of the page, but then when i click a differnt link from another page (not homepage) it will replay the animation of the bar going up from the middle which ruins the whole thing..

    Now i believe i need a varible of some sort but i dont have a clue how to do it, i need it to say when its on anypage ecept homepage it should play a seperate animation to load a page.

    Cheers guys

    //ScottY
    Last edited by L33t_ScottY; 08-08-2006 at 05:22 AM.

  2. #2
    Junior Member
    Join Date
    Jul 2006
    Posts
    28
    Anybody?

  3. #3
    Island Boy
    Join Date
    Apr 2006
    Posts
    655
    If I am understanding you correctly, you are pressing a menu button from the main page and the menu animates to the top of the screen and loads the new page. Whne on this new page you click another menu item to navigate elsewhere and the menu re-animates from the center to the top of the screen ewverytime?


    If this is the case then yes you would need either if statements or probably the code to animate it needs to be elsewhere. Could you post the code you have now to animate the menu and where you have the code located? It would give more information that we can help you with.

  4. #4
    Junior Member
    Join Date
    Jul 2006
    Posts
    28
    Yes thats right, i dont have code to animate the menu upwards its a motion tween on the timeline.

    cheers

    //ScottY

  5. #5
    Island Boy
    Join Date
    Apr 2006
    Posts
    655
    would it be possible to post the file for me to look at?

    Have you thought about putting the menu into a seperate MC

  6. #6
    Junior Member
    Join Date
    Jul 2006
    Posts
    28
    here is the file. hope its the right one. there is also a animation that isnt used that closes the page up and drops the menu down which wll be linked for when people click home page, but its not linked up yet.

    If the site is a little dodgey its cus im a n00b

    LINK to file

    i hope thats the right one.

    cheers

    //ScottY

  7. #7
    Island Boy
    Join Date
    Apr 2006
    Posts
    655
    I downloaded the file and I briefly looked at it. I already see where your error is but i will go in depth with it tomorrow. but just to start you off, your problem lies in the fact that you have the menu animation repeating throughout the timeline at every frame label and this is what is causing your problem. You need to put the menu in it's own movie clip and have it sit at the beginning of the timeline when it animates in. You can do one of 2 things. You can create the buttone functions inside that menu movieclip or reference the buttons from the main timeline actionscript.

    there are a few other things that you need to change and fix in this fla to have a good working movie.(lots of little habbits you will need to break ) I will write up a list of things and post them for you tomorrow.

  8. #8
    Junior Member
    Join Date
    Jul 2006
    Posts
    28
    OK cheers mate, i should get used to it once ive done it a few times. i see your point about it shouldn't be at every label

    cheers

    //ScottY

  9. #9
    Junior Member
    Join Date
    Jul 2006
    Posts
    28
    VI Knight have you done the list that i need to do yet? cheers

    //ScottY

  10. #10
    Island Boy
    Join Date
    Apr 2006
    Posts
    655
    i was working on it.

    I can give you some quick notes to get you started on some stuff.

    1. Use a loader component for loading the content for menu choice.
    2. Seeing that you have animation in all the menu options I wouild suggest making seperate movieclips for each section.

    3. (Optional)You could raise the FPS from 15 to at least 24. or remove some of the frames of each section. That would make things go a little faster.

    4. The menu animation would be in it's own MC and will animate once when any of the menu buttons is pressed at the beginning of your site. You can do this by setting a variable that will trigger the animation on any button if it is the first button pressed. Initially the variable will be set to false (menuPressed = false). then you would have the button run a checking function that will test if the menuPressed is set to true. If not it will run the menu animation and set the variable to true. If it is true then just load the section for the menu item selected.

    5. Remove the attached actionscript from the buttons and put them on the main menu timeline in an actions layer after giving your buttons instance names.

    The menu MC will have frame labels that will specify the menu animation and stop area (bottom, animate, top).


    You can start off with those suggestions.
    Last edited by VI Knight; 08-10-2006 at 05:30 PM.

  11. #11
    Junior Member
    Join Date
    Jul 2006
    Posts
    28
    cheers ill see where i get with that

    //ScottY

  12. #12
    Junior Member
    Join Date
    Jul 2006
    Posts
    28
    well ive upped the FPS i agree it was slow.
    When you say menu in its own movie clip what do you mean, under its own page label? file? if not then what? and how would i go about it?
    currently its all undre its own page label.
    and i hate variables i dont get them at all, ive read tuts and every thing and they still dont like working for me

    //ScottY

  13. #13
    Island Boy
    Join Date
    Apr 2006
    Posts
    655
    Sent you a PM

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