|
-
Scrollbar within button?
I have a movie clip button with a text box within it. The text box also has a scrollbar component attached.
Since the movie clip button has roll-over functionality [ btn.onRollover = function() ], I believe that's taking precedence over the inner scrollbar. I guess this goes back to the common problem of a button inside of a button.
Any good fixes out there?
Thanks.
-
Just don't use button-behavior actions for the movieclip, use movieclip-behavior actions, like onMouseMove and hitTest.
gparis
-
I've been doing a lot of modification to make that work for my situation. I think this may work; however, do you know of any other ways around it?
Thanks.
-
no. just this one (onMouseMove and hitTest). A button in a button will never work.
gparis
-
I'm just having trouble because I'm duplicating the movie clip dynamically and I only want one to work at a time.
There are little people. When you hover over one, it shows the speech bubble with text & scrollbar. The characters need to be at random positions, so sometimes they will overlap. For example, the speech bubble may be over top of the hit area of a person behind it. Now there are 2 bubbles open (not good).
I've tried a bunch of things like using a boolean so it only shows 1 at a time, but still now luck.
-
The overlap could be solved with swapDepths on the hitTest. The 'one at a time' can be solved with a shape, invisible, button (useHandCursor:false) on the lowest layer of the little person's mc.
gparis
-
Oh I was already using swapDepths(), so they were overlapping properly.
Could you please further explain:
The 'one at a time' can be solved with a shape, invisible, button (useHandCursor:false) on the lowest layer of the little person's mc.
I think I know what you mean, but since it's onMouseMove, rather than onRollOver, it's able to show the rollOver for 2 (movie clip) buttons at the same time, you know?
-
An invisible button (a shape in the hit Area of the button) will prevent being able to target the object that is underneath the one that has the highest depth (therefore is in front).
In order to prevent the cursor to change into a hand when hovering over that invisible button, give the button an instance name, for example 'hidder' and write:
Actionscript Code:
hidder.useHandCursor = false;
gparis
-
the one behind it stills shows because it's using a hitTest with the mouse, not a rollOver
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|