473,699 Members | 2,903 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mouse over action for a item in a list box

42 New Member
Hi guys , just a quick one, if anyone knows

I have a listbox that contains some items .
Is there mouse over action for that when i go over the item from that listbox to do something?

Thanks.
Jul 10 '09 #1
2 4080
44penfold
6 New Member
Which version of actionscript are you using?

I think this should work:

on (rollOver) {
I don't have flash any more so I havn't tested it.
Aug 10 '09 #2
gopan
41 New Member
If you have a list named ccList then you can have the roll over and roll out functions as this in AS2

Expand|Select|Wrap|Line Numbers
  1. var listenerObj:Object = new Object();
  2. listenerObj.itemRollOver = function(eventObj:Object) {
  3.     trace("Roll Over");
  4. };
  5. listenerObj.itemRollOut = function(eventObj:Object) {
  6.     trace("Roll Out");
  7. };
  8. ccList.addEventListener("itemRollOver", listenerObj);
  9. ccList.addEventListener("itemRollOut", listenerObj);
  10.  
and in AS3

Expand|Select|Wrap|Line Numbers
  1. import fl.events.ListEvent;
  2.  
  3. function rollout_fn(e:ListEvent):void{
  4.     trace("Roll Out");
  5. }
  6.  
  7. function rollover_fn(e:ListEvent):void{
  8.     trace("Roll Over");
  9. }
  10.  
  11. ccList.addEventListener(ListEvent.ITEM_ROLL_OUT, rollout_fn);
  12. ccList.addEventListener(ListEvent.ITEM_ROLL_OVER, rollout_fn);
  13.  
Aug 14 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
377
by: Nick Stubbs | last post by:
Can anyone tell me how to code the listbox so I can move an item up and down the listbox with the mouse. For example, the play list in Winamp 5 can be sorted by you selecting a song and moving it up or down the play list by selecting it with the mouse and dragging it where you want. The list box gets the contents from a .txt file. (if you need more info please let me know) Many Thanks Nick
5
17828
by: mabond | last post by:
Hi My project has a form, two list boxes (lstArchive and lstSchedule) and two buttons (btnSendArchive and btnSendSchedule) Each list box represents the content of a directory. The command buttons move the selected item out of one directory and into the other and refreshes the list boxes to reflect the change in directory contents I now want to add "context menu" functionality to the list boxes to preform
0
1232
by: dbuchanan | last post by:
Hello, The actions pane locks up after selecting a listbox. I have tried all kinds of things and have narrowed it down to this. If I click in the listbox the action pane locks up. Neither a combo box nor a button will work after clicking in the list box. There are no events associated with the list box. This is a mystery to me. What could be causing this behavior? What could be the remedy?
0
1794
by: jojobar | last post by:
We are using the ASP:Menu control (horizontal) for site navigation. We would prefer that the menu items only be expanded when we click on a top level menu item rather than when the cursor hovers over it. As it stands now, anytime the mouse is over a menu item its child items expands - even if the action is totally unrelated such as moving the mouse to click the back button on the browser. Is this possible?
2
2714
by: Roberto Reale | last post by:
While developing a drag&drop enabled application I found out this "strange" behaviour: if I put a message box into the QueryContinueDrag event handler the message box is shown but the mouse cursor is set to WaitCursor (Hourglass) and I can't click on OK or on X, so that the only way to close the message box is via the keyboard, by pressing SPACE key. The most strange thing is that if I place two message boxes, only the first one is...
1
5372
by: Sim | last post by:
Hello NG, I try to use drag and drop function between two list views. For this I found following code: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchimpdragdrop.asp It works fine, but I have another problem. I want to create functionality like a Windows Explorer. This means, if I select some items from list view No 1 and drag&drop this to the list view No 2, then I want to mark automatically
1
2553
by: rdemyan via AccessMonster.com | last post by:
My application is mostly about performing analyses on data: looking for errors/problems/potential savings, etc. I would like to create a form where a user can create action items for themselves, so that the next time they open the app, they will be able to see a list of action items that they need to resolve. I have a number of forms from which a user might want to create action items for themselves. I was thinking about launching the...
2
5523
by: Mohit | last post by:
Hi all, I am working on a windows application with a list view on a form. Now I wanted to show hand cursor when mouse is over list view item and default(arrow) cursor at other places. List view's ItemMouseHover event can tell me that mouse is on the item and here I can change my cursor to hand. But I have no clue to change it back to default cursor when mouse is moved out of the list view item.
0
9192
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8940
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8895
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7781
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4390
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3071
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.