header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
Gourav_flex
Points:150
Posts:0

9/7/2011 10:49:08 PM

Title: How to show Diffrent cursor in parrent and child Component in flex3


Hi ,
I have a Component for eg UserBox now i use this component in other page and add some child ,for eg. canvas inside canvas i have Button,in this button i use handCurser = true , ans i also use costume Cursor for UserBox Component .

Problem: when i use rollover on Button inside UserBox Component its showing "costume Cursor" but i want UseHandcursor there.


application structure.
================
UserBox Component(I want 'costume Cursor' here)----> Canvas -----> Button.(i want hand cursor here)



Plz reply me if u have solution.




1
Shawn
Points: 680
Posts:0
9/9/2011 8:11:47 AM



you need to remove the custom cursor on button rollover event else custom cursor class will replace the default cursors and hand cursor will not appear

2
Gourav_flex
Points: 150
Posts:0
9/9/2011 10:23:05 AM



Thanks for reply but i need costume cursor on parent component and also need hand cursor on child button of that component.



3
Shawn
Points: 680
Posts:0
9/9/2011 10:39:10 AM



you are not getting me .

You need to remove the custom cursor on rollover of button so that hand button can appear. And also on rollover of parent apply the custom cursor. This way when mouse will enter parent it will be custom cursor and when mouse moves over to button it will be hand cursor. When mouse moves out from button to parent then again custom cursor will work.

4
Gourav_flex
Points: 150
Posts:0
9/9/2011 12:43:30 PM



yes ur right, shawn i know this and even i found the solution but for this i have to pass some pram from child button.

so did u mean there is no solution for that, i also try cursor priority but its not working there.

5
Salvio
Points: 0
Posts:0
9/9/2011 11:09:01 PM



cursor priority wont work between default cursors and custom cursors. There should be no need to send any parameter. You just need to remove the custom cursor on rollover of button like this

rollOver="CursorManager.removeCursor(cursorID);"

This will make hand cursor appear on button.

then on rollOut event of same button apply the custom cursor again.

Refer this article if you have problem implementing custom cursor


http://blog.flexexamples.com/2007/09/10/changing-the-cursor-in-a-flex-application-using-the-cursormanager-class/

6
Gourav_flex
Points: 150
Posts:0
9/14/2011 12:46:34 AM



yes , i did the same but the problem is we have to pass some pram to the class(where we add and remove costume cursor) and for this purpose we have to make object of that class (if we want to apply this functionality in any inner child component) so i dont want to pass any pram.so that this component can work as a generic component.


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 1+3 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions