Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Apr 2008
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Unhappy [F8] URGENT:Rollover/Downstate for sliding panel.

    COULD SOMEONE PLEASE HELP ME GET THROUGH THIS LAST PART?

    1)Well here's what I figured out so far; got the panel to drop down when I rollover at a Ymouse of 70. However, I want to put an input form in the panel; but if the users mouse goes below a Ymouse of 70 the panel slides back-up.

    So you say '"Well just make the Ymouse more than 70 or whatever the length of the form field"'

    Here's the problem: I plan on putting a FullScreen button on my Main Stage (about 1/4 distance from the top).
    When the user moves their mouse anywhere near that FS button, it's going to bring down the panel. I don't want that.

    What I want is for the panel to slide back-up when the users mouse is at the bottom of the panel. Much like the claudiesong.com site.

    2)I did a google search on how to create a down/disable button state. There were so many out there but none that I could understand without an actual working fla file. What I wanted to do is when the viewer first rolls over the panel; the "Helen Newman" title is already highlighted with content.
    I created a movie clip button with an instance name of 'btn1', and another movie clip inside of that one with an instance name 'btnStates_mc' and inside of that is my timeline animation(which doesn't work when I place my button on the main stage). Could you please take a look at my fla file.


    Am I making any sense?

    Thanks for any help you can throw my way.

    The '.as' can be found at: http://hosted.zeh.com.br/mctween/downloads.html
    Attached Files Attached Files

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    First you should probably combine all of your panel into one movieClip. That would make it easier to manage this script. You could replace the text inside of the panel clip easily.

    You have the code like this:

    Code:
    //Set up panel --- remember to put the ymouse back to 70.
    panel.onEnterFrame = function() {
    	if (_root._ymouse<=200) {
    		//open panel
    		panel.slideTo(null,0,.8,"easeOutExpo");
    	} else {
    		// close panel
    		panel.slideTo(null,-285,2,"easeOutExpo");
    	}
    };
    Which says only when the mouse is above 200 marker will it be visible. I think a better method would be to include a small tab at the bottom of the panel which is always visible in the main window. Then use this code

    Code:
    //Set up panel --- remember to put the ymouse back to 70.
    panel.onRollOver = function() {
    		panel.slideTo(null,0,.8,"easeOutExpo");
    };
    panel.onRollOut = function() {
    	panel.slideTo(null,-285,2,"easeOutExpo");
    };
    Which would keep the panel visible while the mouse is over it.

    For the second question, you could just have onRollOver and onRelease methods which would gotoAndStop at the proper frames. To me that is the most straightforward method. For instance:

    Code:
    btn.onRollOver = function() {
         btn.gotoAndStop(3);
    }
    btn.onRollOut = function() {
         btn.gotoAndStop(1);
    }
    btn.onPress = function() {
         btn.gotoAndStop(5);
    }
    btn.onRelease= function() {
         btn.gotoAndStop(1);
    }
    It would need to be manipulated for your exact purposes, but you could also track the state of the button with a variable.

  • #3
    New Coder
    Join Date
    Apr 2008
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I see...so I should create an invisible Hot Spot with a 70 height and 1280 width and attach it to my panel in the movieclip. This Hot Spot will slide with the panel, thus when the viewer rollsOver or rollsOut; the panel will slide. Is that correct?

    I'll also apply your button commands to my buttonsMC.

    Should I combine my panel,buttons and content onto 1 layer on my timeline OR leave as is and keep them on their own respective layers?

    Thank you for your help. I really do appreciate this.

  • #4
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    I think you misunderstood what I said about the panel. Take all of the panel elements which are currently on the main timeline and put them into a movieclip, putting each button, text block, graphic, on its own layer. Then you can use that code I provided. You don't need a hidden button or Hot Spot to activate it.

  • Users who have thanked gnomeontherun for this post:

    TheMexican (04-30-2008)


  •  

    Posting Permissions

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