ActionScript 2.0 :: Setting HitArea For Listbox Item?

Jan 17, 2007

I am trying to customise a listbox component so that when the user clicks on one of the items a movie clip containing 3 buttons appears. My problem is that as I have make the buttons appear whern the item in the listbox is clicked, they are attached to the movie clip and so dont work.I think that one way around this would be to define a seperate hitArea for the listbox item so that this does not interfere with the buttons when they appear

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Find Listbox Top Item's 'itemIndex Value'?

Jan 18, 2007

I am working with the listbox component and trying to find out the index of the top item that is displaying.Obviously this is 0 by default but if the scrollbar has moved down then this will change, I just can't find out how to get the value!

View 1 Replies

ActionScript 2.0 :: Remove Item From 2004 ListBox?

Sep 2, 2004

Is there a simple method of removing a selected Item in a listbox (v.2) which was populated dynamically?I have a feeling I have create a new function to loop thru the array again to remove the item that was selected.

View 7 Replies

ActionScript 2.0 :: Add Dynamic Tooltip When Roll Over List Item Of Listbox?

Dec 5, 2007

I have a listbox load data from sql. How to add dynamic tooltip when roll over list item of listbox.

View 2 Replies

Flex :: Programmatically Setting Chosen Item In ComboBox

Jan 26, 2011

I need to programmatically set the selected item in a combobox. I've got a combobox like this:
<mx:ComboBox id="MyComboBox" change="puzzleHandler(event);"prompt="Make a Selection">
<mx:ArrayCollection id="myDP">
<mx:Object id="first" label="Label 1" series="2" pageTitle="Title 1"/>
<mx:Object id="second" label="Label 2" series="7" pageTitle="Title 2"/>
<mx:Object id="third" label="Label 3" series="9" pageTitle="Title 3"/>
</mx:ArrayCollection></mx:ComboBox>

I've got a function that regards deep linking. [URL]. They'll be taken to the appropriate part of the site (without having selected Label 2 in the comboBox). How do I set the comboBox programatically, so that it corresponds with what the user it looking at? In my function's switch statement, I want to set the comboBox to the label that corresponds with the view. If "view=2" then the comboBox should show "Label 2" as selected.

case "view=1":
MyComboBox.selectedItem.label="Label 1";
parseUrl();
case "view=2":
[Code] .....
I tried this: MyComboBox.selectedItem.label="Label 1" But it's not working.

View 1 Replies

Flex :: DataGroup - Setting Height Of Item Renderer

Nov 28, 2011

I've been playing around with renderers the last few days for a mobile application. I'm creating a gridlike renderer that has columns that is light weight for a mobile app. It is a bit of a poor man's datagrid. The layout is fine. The question I have is controlling the height of each row in the list.

When measure() is called, I set the measuredHeight to:
measuredHeight = getElementPreferredHeight(ld) + verticalPadding;
Where vertical padding is:
var verticalPadding:Number = getStyle("paddingTop") + getStyle("paddingBottom");

When I debug on the desktop, the measuredHeight is set to 12 and on the device (Motorola Atrix), it is set to 12. But when layoutContents is called, the unscaledHeight is a number much larger than my measuredHeight value (44 on the device, 66 when running on the desktop), resulting in more vertical whitespace surrounding each item than I care to have. How do I control that row height? I happen to be using a Datagroup for this particular example but in some playing around I did with just a simple list, I had the same issue. Somewhere the system is overriding my measuredHeight with some other value.

View 1 Replies

Flex :: Item Renderer And Setting Values For Named Objects (Odd Bug)?

Oct 19, 2010

I have a custom component as an item renderer.In this renderer there is an item called dlFirstChoice.Now when I add more items to this list and force the list to rebuild itself something odd happens.Part of the creation of the renderer I set a default selection for the DropDownlist as follows: dlFirstChoice.selectedIndex=0The problem is once I have more than one item to render from my dataset this property stops working. So if my dataset has only 1 item to render the drop downlist sets itseld up properly, the momment I need to render more than 1 copy of my item renderer, all of a sudden nothing gets set fo

View 1 Replies

Flex :: Itemrenderer - Referencing And Setting A Single Item Renderer Instance In A Flex Tree At Runtime?

Oct 17, 2010

Anyone know how to change a single instance of an item renderer for a Flex tree item at runtime? To reiterate, I'm not trying to change the entire tree's item renderer like this:tree.itemRenderer = new ClassFactory(ItemRenderer2);I'm trying to change the item renderer of a single tree item like this (the following code does not work):tree.selectedItem.itemRenderer = new ClassFactory(ItemRenderer2);To put it more simply, does anyone know how to reference an instance of an item renderer and set it to a new item renderer class? I've tried using the Tree's itemToItemRenderer() method with no success.

View 1 Replies

ActionScript 1/2 :: Disable HitArea Once It's Set?

Mar 13, 2009

If I create a Movie Clip and assign a child Movie Clip as the hit area using this.hitArea = this.mcClipName; is there a way for me to disable that hit area? For instance, mcButton is a button. When I click mcButton, it triggers a function that reveals other content in my movie. I don't want them to be able to click that button again unless they close the new content (using another button that appears with the new content).

View 3 Replies

ActionScript 2.0 :: Use Loaded PNG As Hitarea?

Oct 8, 2006

is there a way to assign a dynamically created movie clip the hitarea of a PNG file that is loaded into it via actionscript, basically creating a none square/circle hitarea that is a mask of the bitmap image.

View 1 Replies

ActionScript 3.0 :: Embedding Swf Button Changes Hitarea

Aug 23, 2011

I am embedding swf files into flex and no matter what button I use, mine or one of the library swf's that comes with Flash, the hitarea shifts upwards to the top 10 pixels of the button and up from there outside the button area.

View 0 Replies

ActionScript 2.0 :: Set Up A Cicular MovieClip As A HitArea?

Feb 1, 2008

I am trying to set up a cicular movieClip as a hitArea for another, but the circular shape is not detected rather the bounding box of the movieClip. is there any way around it? am i doing something wrong?

Code:

TurretRange_mc.hitArea = TurretActive_mc.TurretHitArea;
TurretRange_mc.hitArea (TurretActive_mc.TurretHitArea);

so far i've tried these two methods.

View 5 Replies

Professional :: RadioButton Component - How To Remove HitArea

Jul 30, 2010

Flash CS4
AS2
RadioButton Component

I want to remove the so called "HitBox/HitArea" on the RadioButton component - I don't want the user to be able to click anywhere else except the button - and I don't want to just resize the hit area so it's as big as the button (the hit area is a square, and my button is a circle)... can this be done? or does the button absolutely depend on hit area? Part of my reason for asking this, is when I publish my .swf with the radiobutton - the hitarea is displaying as a big white rectangle that is covering the button and part of the text up... why is this?

View 3 Replies

Flex :: How To Programmatically Enlarge Buttons HitArea

Aug 13, 2010

How to programmatically enlarge a flex 3 button's hitArea. Is there some function that I can override? There is no function in the button class called hitArea. What I have done is, I have created a programmaticskin for a button. The form of the skin consists out four arrows. In between the arrows there is nothing (meaning transparent). Because of the way the skin is shaped, it's difficult to click on the button. The skin has alter the buttons hitArea. What I'm looking for is a way to enlarge the hitArea and alter the hitArea shape in to an square. (the hit area must ofcourse still be invisible).

View 4 Replies

Actionscript 3 :: Shrink HitArea Of A Sprite On RollOver?

Dec 17, 2011

I have a grid of many 10x10 pixel squares separated only by a pixel line. When the user rolls over the sprite, it grows, animating to about 4 times its size--to around 40x40 pixels. The sprite stays large while the mouse is over the sprite, but if the user wants to rollover the neighboring sprite it is obscured by this sprite and its larger size.

Is it possible to shrink the size of the hit area so that even though the sprite grows in size the mouse can still access or trigger the neighboring sprites underneath--to the right, left, top, bottom? I thought about using Mouse_move, but wasn't sure if that would fire off too many events.

I read the following posts. However, my hitArea needs to be the same size or just slightly larger than the original 10x10 pixel sprite. I've had little success. [code]...

View 1 Replies

ActionScript 2.0 :: Define A HitArea Without Creating A New Movieclip?

Nov 1, 2009

Is it possible to define a hitArea without creating a new movieclip? I want to define by using xMin, xMax, yMin, yMax.

View 2 Replies

ActionScript 3.0 :: Button Hitarea Is Off/ Distorted (weird)?

Aug 13, 2010

Got this weird issue going on today. The hitarea, the 'interactive space' of some of my buttons is off/ distorted. I created several buttons in a class with the pen tool and converted them to Buttons. I added some eventlisteners, but when I tested my Movie, I noticed the interactive space of some buttons was gone or at a different position or not the size I made it.

I made another button using the rectangle tool, and tested again. I noticed the visual button was at the place I put it, but the 'interactive space' was at the bottom right. Whenever I would move over this interactive space with my cursor, the visual button would instantly go to the place the interactive space is. Whenever I move the mouse out of the interactive space, the visual button goes back to its inital place.

Check it: (press start, 2 times the right arrow, then the window, then go to one of the buildings in the landscape and click on it)[URL].. Here you see two rectangle shape buttons. Hover over them, no interactivity. Move the mouse somewhat down to the right, and weirdness happens.

[Code]...

View 4 Replies

ActionScript 2.0 :: Enlarge HitArea For A Selected Movieclip On Stage

Jul 6, 2009

Is it possible? What I'm trying to do is enlarge the hitArea for a selected movieclip on my stage, but only onRollover. I have 5 MCs on my stage acting as buttons of sorts. onRollover of any of the clips, they grow in scale and I'd like the hitArea to do the same so they (MC and hitArea) are proportional.

View 2 Replies

Actionscript 3 :: Changing SimpleButton.y Does Not Appear To Move The HitArea Of The Button

Feb 9, 2010

It transpires that there was another Sprite being create and set to alpha=0 which just happend to be at the same Y position as the height of the SimpleButton. This was preventing interaction with the button.

I have a SimpleButton which I am positioning on the stage. I'm doing a variety of things with it buy when I set it's Y position it breaks/alters the hitArea.

var playUp:Bitmap = getBitmap('play_up');
var playDown:Bitmap = getBitmap('play_down');
var Y:Number = 100;

[Code].....

View 2 Replies

Flash8 :: Disable The HitArea On Specific Frames Within A Movie Clip?

Jul 10, 2010

I have been having some trouble with a movie clip basically designed to act as a button for a store front for a website.This movie clip has, stored as the front of the movie (i.e. before you click in to edit the movie) the following code:

on(rollOver){
gotoAndPlay("Over");
}[code]..........

This gives the movie the hover over and out effect and animates the button so as once pressed the button expands to give a 'Product Details' view.However, when clicked the info shows up as it should but the hit area which I put into the Movie Clip is still on the info area so none of the contents on this new window are accessible and when the cursor leaves the designated info area the movie clip returns to its first stage as it would appear at the start of the animation.Is there any simple way to disable the HitArea on specific frames within a Movie Clip?

View 16 Replies

ActionScript 2.0 :: Define HitArea Of External Assets With Alpha Channels (for Example PNG)?

Nov 14, 2010

I copied this from some other forum because it's explain well "...Let�s say you are loading in an external asset that has an alpha channel, such as a PNG. Now let�s say that you want that asset to act like a button, with rollover and click actions. No problem. No reason you can't do that. But, actually, there is a problem. The hit area for that external asset will be its entire bounding box. Take this octy image for example: Even if you rolled over the top left of the image where it�s totally transparent, it will still trigger rollover actions, which is certainly not ideal and could potentially be very confusing for a user..."

[Code]....

View 2 Replies

Flex :: Select Item In Details Form Dropdown When Datagrid Item Is Selected

Feb 15, 2011

I have this datagrid:

<mx:DataGrid id="dgCompetenteN" includeIn="Test" left="10" right="472" top="69" bottom="149"
dataProvider="{colCompetente}" editable="false">
<mx:columns>

[Code]....

What I want to do is, when I select an item in the datagrid, the selected item of the dropdown should be the correct one (the one which has the field idCompSuperioara equal to the third element in the selected datagrid row).

View 1 Replies

Flex :: Get List Item Selection Working When Using A Png Mask In An Item Renderer In A 4.5 Mobile App?

Jun 10, 2011

I'm creating a mobile app in which I need to show a calendar with months at the top. The months are part of a component that extends from SkinnableDataContainer (and has some custom scrolling/behaviour - which is why I did'nt use a spark list). I need the months to be shown as a 'trapezium' shaped tab and so I'm using a png image as a mask in the item renderer for the component.

When the mask is not applied, it all works well - the months render, the list/data container selection works when I click on a month and so on.When the mask is applied, it renders well, scrolling and everything else seems to work well - but when I click on a month, nothing happens visually. And from the trace statements in my code, it appears list item selection is not changing. Looks like mouse clicks are not working.

Code:

public class TopCalendarMonthRenderer extends LabelItemRenderer {
[Embed(source="/assets/trapezium_alpha.png")]
private static var TrapeziumMask:Class;
private static var trapeziumMaskInstance:BitmapAsset;

[code]...

View 1 Replies

ActionScript 2.0 :: Display Item In Datagrid In Order It Was Chosen And Remove Selected Item

Jul 20, 2010

I am in search of finding a way to display shopping cart items in a flash 8 datagrid in the order it was chosen by the user & also to ability to delete an item if the user choses. Currently I have the items displaying however they are displaying in a position as it is stored and called in the array. [code]

View 5 Replies

Drop Down Menu Bug - Invisible Bottun Around Each Item Interferes With The Item Besid It

Jul 22, 2011

I have made a drop down menu with 7 items but as the invisible bottun around each item interferes with the item besid it, when i try to roll the mouse from one item to another, the invisible bottum dont work and the dropdown remains open.

View 1 Replies

Flex :: Access TileList Item Index In A Custom Item Renderer?

Mar 4, 2011

<mx:itemRenderer>
<mx:Component>
<mx:Canvas>

[code]......

View 2 Replies

Flex :: Toggling States - When Other Item Is Selected The First Item Does Not Change Its State?

Apr 26, 2011

I have used states in my application.The thing is I have made the first item in my list to be selected. so I gave like this,

if(itemIndex == 0)
this.currentState="selected";

this works fine.The problem is when other item is selected the first item does not change its state,it remains in the selected state until its clicked.My code looks like this,

<s:BorderContainer id="outerCont" width="275" height="100" borderVisible="false"
backgroundColor.normal="#3D3C3C" backgroundAlpha.selected="0.1"
backgroundColor.selected="{data.color}">

My states are like this,

<s:states>
<s:State name="normal" />
<s:State name="hovered" />[code]........

View 1 Replies

Actionscript 3 :: Trigger Flex Piechart Item Click Event When A Datagrid Item Is Clicked?

Nov 4, 2011

Is it possible to trigger Flex Piechart Item click event when a Datagrid Item is clicked.If so can anyone give some example.

View 3 Replies

ActionScript 2.0 :: Select An Item From List Component And Fire A Function Directly Related To Selecting That Item

Jul 13, 2009

I want to be able to select an item from my list component and fire a function directly related to selecting that item. list is called "tidlist" function is "selecttid(n)" the "n" needs to be replaced with the index number... so if run my swf and the list component displays my items... when i select one (the third one for example)... i want to fire "selectTid(3)".... cant seem to grasp.

View 1 Replies

Actionscript 2.0 :: Select An Item From List Component And Fire A Function Directly Related To Selecting That Item?

Jul 13, 2009

I want to be able to select an item from my list component and fire a function directly related to selecting that item.

list is called "tidlist"
function is "selecttid(n)"

the "n" needs to be replaced with the index number... so if run my swf and the list component displays my items... when i select an item (the third one for example)... i want to fire "selectTid(3)".... cant seem to grasp.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved