![]() |
Кнопка в кнопке...
Господа,
подскажите пожалуйста, как сделать кнопку внутри кнопки (допустим Button) несколько внутренних кнопок (допустим b1,b2)??? А то при наведении на B1 все нормально, при дальнейшем наведении курсора на b1 или b2, - Button считает что с нее убрали курсор.... |
В самом нижнем слое в B1 положить мувик нужного размера и сделать его прозрачным. Или же руками поправить Hit Area в соотвествующем кадре
|
я пробовал, не помогает....
в данный момент следующая картина: есть облать (прозрачная кнопка), при наведении на которую на ее же месте запускается мувик (подсветка этой области). Внутри мувика располагается несколько кнопок, при наведении на которые, они должны меняться. Так вот как бы я не располагал эти внутенние кнопки, почему-то получаются глюки... Пробовал установить флаг, чтобы при наведении на внутренние кнопки, on (rollOver) кнопки зоны временно не функционировала. Но не получилось... |
кнопка в кнопкуе в принципе невозможна
т.к. событие внешнего клипа перекравает аналогичные события вложенных используй hitTest |
а что за hitTest??
и с чем его едят..... жаль что это не возможно.... |
цитата из хелпа
----------------------------- MovieClip.hitTest() Availability Flash Player 5. Usage my_mc.hitTest(x:Number, y:Number, shapeFlag:Boolean) : Boolean my_mc.hitTest(target:Object) : Boolean Parameters x The x coordinate of the hit area on the Stage. y The y coordinate of the hit area on the Stage. The x and y coordinates are defined in the global coordinate space. target The target path of the hit area that may intersect or overlap with the instance specified by my_mc. The target parameter usually represents a button or text-entry field. shapeFlag A Boolean value specifying whether to evaluate the entire shape of the specified instance (true), or just the bounding box (false). This parameter can be specified only if the hit area is identified using x and y coordinate parameters. Returns A Boolean value of true if my_mc overlaps with the specified hit area, false otherwise. Description Method; evaluates the instance specified by my_mc to see if it overlaps or intersects with the hit area identified by the target or x and y coordinate parameters. Usage 1: Compares the x and y coordinates to the shape or bounding box of the specified instance, according to the shapeFlag setting. If shapeFlag is set to true, only the area actually occupied by the instance on the Stage is evaluated, and if x and y overlap at any point, a value of true is returned. This is useful for determining if the movie clip is within a specified hit or hotspot area. Usage 2: Evaluates the bounding boxes of the target and specified instance, and returns true if they overlap or intersect at any point. Example The following example uses hitTest() to determine if the movie clip circle_mc overlaps or intersects the movie clip square_mc when the user releases the mouse button: square_mc.onPress = function() { this.startDrag(); }; square_mc.onRelease = function() { this.stopDrag(); if (this.hitTest(circle_mc)) { trace("you hit the circle"); } }; -------------------------------- *_- |
Нет, не перекрывает, два RollOver-события возможны, если совпадают hit area кнопки и ее дочерней кнопки.
Но куда проще использовать упомянутый хит-тест... |
| Часовой пояс GMT +4, время: 13:15. |
Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.