A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Buttons in scrollbar dont work!

  1. #1
    Senior Member OvN-'s Avatar
    Join Date
    Feb 2001
    Location
    Puerto Rico
    Posts
    218

    Buttons in scrollbar dont work!

    I attached a .fla, showing the problem - i use FlashMXPRO 2004 -

    First

    I create the buttons, then i give them diferrents actions
    Then put the long button list on a small movieclip scroller -

    when i preview the movie, the buttons dont work.
    i need that each button go to a diferent frame on the scence 1 -


    I dont know what im doing wrong...
    please help
    Thanks!
    Attached Files Attached Files
    imagine

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Posts
    135
    I can't see your FLA (I have an older version of Flash), but it sounds like you might have a path problem.

    Make sure you include the target level in your path. For instance, if the MC you want to affect is on the main timeline, add _root. to the path.

  3. #3
    Senior Member OvN-'s Avatar
    Join Date
    Feb 2001
    Location
    Puerto Rico
    Posts
    218
    When you say MC , u r talking about a dynamic field?

    cause i only want that when the user click a button, goes to a specific frame on the main timeline

    The first button have this action

    on (release) {
    gotoAndPlay('118',12);
    }

    maybe is what you say!

    Thanks for the help!
    Last edited by OvN-; 05-20-2004 at 11:43 PM.
    imagine

  4. #4
    Senior Member
    Join Date
    Sep 2000
    Posts
    135
    I got to look at your FLA.

    First of all, I've never built my own components - only used the ones that come with Flash and reskinned them. The only comments I can contribute have to do with that.

    If you choose to go this route:

    You need to drag the scrollPane component on to the stage and give it a name, then resize and position it however you'd like.

    Place the content that you want to display in a movie clip (MC). Make sure that when you create this MC you check "Export for Actionscript" in the Advanced properties, and give it an identifier name.

    In the Properties pallette, click the Parameters tab and enter the name of your MC into the "contentPath."

    When creating the buttons inside your MC, add _root. or specify whatever level you want to affect to your action.

    Example:

    Code:
    on (release) {
    	_root.gotoAndPlay("myFrameLabel");
    }
    Then you should be good to go.

    If I missed something, I'm sure one of the Flash gods will correct me .

  5. #5
    Senior Member OvN-'s Avatar
    Join Date
    Feb 2001
    Location
    Puerto Rico
    Posts
    218
    I put your code and the button works! But when i click 2 times, the button send me to the next frame.

    How i can fix this?


    Thanks for the help
    imagine

  6. #6
    Senior Member
    Join Date
    Sep 2000
    Posts
    135
    One of the things that may be causing this to happen is that you need to have similar code attached to each instance of the button. In other words, each button in every frame should have the appropriate code telling it what to do when pressed.

    Look in the Behaviors palette (if that's how you attached your code), or in the Actions palette.

    Good luck.

    Neumy

  7. #7
    Senior Member OvN-'s Avatar
    Join Date
    Feb 2001
    Location
    Puerto Rico
    Posts
    218
    I dont do the scrollbar with the components - i do the scrollbar manually from a tutorial -> the scrollbar works fine, the problem are the buttons -
    i give each frame the same instance name that appears on each button on the list - The problem is that if i click the first button 2 times, the button goes to the next frame.

    Look this

    Scene 1 -

    Layer 1: 50 keyframes with the stop action
    Layer 2: 50 keyframes - each one have a diferent image
    Layer 3 : Is where the list are, and is frame 1 to frame 50


    The Code works fine is only that problem - but im sure that is not the instance name

    Again Thanks! i really need this help!
    imagine

  8. #8
    Senior Member
    Join Date
    Sep 2000
    Posts
    135
    I guess I don't understand what you've got going on.

    Are you using frame label names instead of specifying a frame number?

    On layer 3 what list are you talking about?

    Maybe post your updated FLA if not too big?

    I'm sure there's an easy answer to this, I'm just not sure how you've got things built.

    Neumy

  9. #9
    Senior Member OvN-'s Avatar
    Join Date
    Feb 2001
    Location
    Puerto Rico
    Posts
    218
    Im doing a shoping cart, when the person click the name of a item, the image of the item appears in a place.

    the list of the items, are 37 buttons in a movieclip
    i make a scrollbar for the list reading a tutorial.

    In another Layer i have 37 keyframes with the stop action

    And in another Layer i have 37 keyframes with 37 differents items
    with their own instance name

    so each button goes to a specific frame with the code that you give me:

    on (release) {
    _root.gotoAndPlay("item1");
    }

    If i click the item 1 for example - the item 1 image appears but if i click 2 times like some people do - the image of item 2 appears.

    By the way!

    i can make a preloader for each frame?
    The size of the proyect goes now to 800k. If not, how i can make the size lower?

    Again Thanks for your help!
    imagine

  10. #10
    Senior Member
    Join Date
    Sep 2000
    Posts
    135
    I'm not sure what you can do about that besides give instructions to users to click only once, or put a time delay of some sort, whether AS or frame based.

    If the on(release) function/behavior is taking them to another frame in the timeline, then it's doing exactly what it's supposed to do - click twice, move twice.

    I seem to remember reading somthing about document.mouseDblClk but I'm not sure how you'd implement that here.

    Neumy

  11. #11
    Senior Member
    Join Date
    Sep 2000
    Posts
    135
    I'm not sure what you can do about that besides give instructions to users to click only once, or put a time delay of some sort, whether AS or frame based.

    If the on(release) function/behavior is taking them to another frame in the timeline, then it's doing exactly what it's supposed to do - click twice, move twice.

    I seem to remember reading somthing about document.mouseDblClk but I'm not sure how you'd implement that here.

    Neumy

  12. #12
    Senior Member OvN-'s Avatar
    Join Date
    Feb 2001
    Location
    Puerto Rico
    Posts
    218
    well! the button after all works. Thanks for the code, i really need that help.

    Thanks for all your help!
    Later!
    imagine

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