473,748 Members | 2,574 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 4083
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
17834
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
1235
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
1801
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
2718
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
5375
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
2555
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
5527
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
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9386
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9254
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
8255
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...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
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.