Current location: Hot Scripts Forums » General Web Coding » Flash & ActionScript » I'm having trouble with rollover sliding panel.


I'm having trouble with rollover sliding panel.

Reply
  #1 (permalink)  
Old 04-28-08, 10:46 PM
TheMexican TheMexican is offline
New Member
 
Join Date: Apr 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Angry I'm having trouble with rollover sliding panel.

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.
Attached Files
File Type: zip mc_tween_2_28_29.zip (54.5 KB, 148 views)
Reply With Quote
  #2 (permalink)  
Old 05-20-08, 11:11 AM
thatwebsitegirl thatwebsitegirl is offline
New Member
 
Join Date: May 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
You need to break up you functionality. You will need one button at the top of the screen which is not attached to the panel that invokes that "slide open" rollover behavior. Then, the easiest way to close it would be to create a seperate button at the bottom of your panel that invokes the "slide closed" rollover behavior.

I would also enable or disable the buttons that you don't need. Here's the code:

ActionScript Code:
  1. //first i would define by opened and closed y values and a move increment...
  2. // i'm just making stuff up here
  3. openY = panel._y+panel._height;
  4. closedY = panel._y;
  5. deltaY = panel._height/10;
  6. // then i would set up the behaviors of the buttons
  7. showPanelButton._visible = true;
  8. showPanelButton.onRollOver = _root.openPanel;
  9. panel.hidePanelButton._visible = false;
  10. panel.hidePanelButton.onRollOver = _root.closePanel;
  11.  
  12. function openPanel() {
  13.     // create a looping function to drop the panel down
  14.     panel.onEnterFrame = function() {
  15.         if ((this._y+_root.deltaY) < _root.openY) {
  16.             this._y += _root.deltaY;
  17.         } else {
  18.             // kill the looping behavior
  19.             this.onEnterFrame = null;
  20.             // assign the final resting place of the panel
  21.             this._y = _root.openY;
  22.             // enable/disable the buttons
  23.             this._parent.showPanelButton._visible = false;
  24.             this.hidePanelButton._visible = true;
  25.         }
  26.     }
  27. };
  28. function closePanel() {
  29.     // start a loop to slide the panel up
  30.     panel.onEnterFrame = function() {
  31.         if ((this._y - _root.deltaY) > _root.closedY) {
  32.             this._y -= _root.deltaY;
  33.         } else {
  34.             // kill the looping behavior
  35.             this.onEnterFrame = null;
  36.             // assign the final resting place of the panel
  37.             this._y = _root.closedY;
  38.             // enable/disable the buttons
  39.             this._parent.showPanelButton._visible = true;
  40.             this.hidePanelButton._visible = false;
  41.         }
  42.     }
  43. };
slidingPanel.zip

Last edited by UnrealEd; 05-20-08 at 11:30 AM. Reason: please use the [highlight=ActionScript] wrapper
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Select radioButton, switch panel in C#/.net bscsGrad Windows .NET Programming 4 08-22-06 08:31 PM
SHOUTCAST HOSTING CONTROL PANEL $14.99 /month! The Long Awaited Software Has Arrived! SCPanel General Advertisements 0 09-21-05 11:05 PM
Free windows hosting contorl panel parsv ASP 0 09-10-05 03:54 AM
I Need Control Panel Layout Patiek Job Offers & Assistance 1 01-24-05 02:32 PM
Game Server Control Panel - New urbanservers Script Requests 2 09-26-04 05:59 PM


All times are GMT -5. The time now is 06:41 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.