RE: [Flashcoders] Tooltip rollovers for textinput..help plss
Hi Chuck, Thank you very much for giving this idea.Even our designer had the same thought and we got it working now.We are having a catch-all movie clip and textinput on them and all the small movie clips(for textinputs) are behind this big movie clip...and it is working grea.!!! I also thank Chris who helped me all this way to get this thing working perfect. Cheers to Chris and Chuck. Thanks, Subba -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, August 10, 2006 2:23 PM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Tooltip rollovers for textinput..help plss Would creating a catch-all full screen invisible MC work for you? Similar to the invisible clip you are using now, just have the full screen clip on a lower layer catch the onRollOver and destroy the tooltip. Just a thought. -- Chuck ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Tooltip rollovers for textinput..help plss
Would creating a catch-all full screen invisible MC work for you? Similar to the invisible clip you are using now, just have the full screen clip on a lower layer catch the onRollOver and destroy the tooltip. Just a thought. -- Chuck ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Tooltip rollovers for textinput..help plss
Hi chris, I got an idea and when I implemented it worked very good(except for small bugs). I added a movieclip(invisible) behind the textinput and and used rollover and rollout by using the coordinates of the movie clip. It is working good as I could see the rollover and enter the data and also when out of the textinput,rollover is disappearing.The small bug is that when I drag the mouse very fast out of the textinput,the rollover is getting carried and randomly(maybe once in 15-20 times) dragging out of the textinput,rollover is staying...atleast for sometime...it is perfect and is working what we wanted.Here is the code. var txt_invisible_mc:MovieClip; Function onLoad() { txt_invisible_mc.onRollOver = Delegate.create(this,function() { if(tt == undefined) { tt = new customToolTip(0xE5E5E5,0x022954,0x022954,50,10,15,20); tt.showTip("Total Annual sales"); } }); txt_invisible_mc.onRollOut = txt_invisible_mc.onDragOut = Delegate.create(this,function() { if(_xmouse <= txt_invisible_mc._x || _xmouse >= txt_invisible_mc._x + txt_invisible_mc._width || _ymouse <= txt_invisible_mc._y || _ymouse >= txt_invisible_mc._y + txt_invisible_mc._height) { trace("tool tip hidden"); tt.removeTip(); tt = undefined; } }); } Everything is working good except for sometime, the rollovers are getting carried... Thanks, Subba -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Hill Sent: Thursday, August 10, 2006 11:59 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Tooltip rollovers for textinput..help plss Yeah, I tried a lot of methods to attempt to get the tooltip to disappear and ran into just too many problems. I'm sure there's a way tho using some ridiculous workaround. If you find the answer, please post it! And, perhaps I should've mentioned this earlier, but I do have a ToolTip class available on my website: http://ubergeek.tv/article.php?pid=96 I just updated it with the latest version, which has a couple fixes/features added. For my own projects, I don't actually use onRollOver/Out etc. for toolitps because they generally muck up event handling elsewhere. I don't recommend my method necessarily but it has worked for me in the past better than mucking with event handling. Adding a tooltip to a TextInput using my method is as simple as this: ToolTip.getInstance().addClip(txt, "My tooltip text"); You can download the zip, check out the fla, and install and modify the packages if it works for you. C Subba Chalamalasetty wrote: >Hey chris, > >Thank you very much for your help and time.I have good news about this >program. focusIn and focusOut events worked and now as long as I am not >using onRollOver, onROllOut, onPress, onRelease the program is working >fine. But there is one problem when I use focus in and out..i.e when I >click on the textinput, I am getting the rollover and also could enter >data, but when I come out (focus out)...untill I click somewhere else, >that rollover is getting carried. If that small problem is solved..that >will be a huge conquer for me. I am trying different ways to get it. If >you have time, can you please suggest me some ideas from your side. Once >again thank you very much for your help...here is the code > > txt.addEventListener("focusIn",Delegate.create(this,txtOver)); > > txt.addEventListener("focusOut",Delegate.create(this,txtPress)); > >private function txtOver(){ > tt786 = new >customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); > tt786.showTip("Total sales."); > > } > >private function txtPress(){ >tt786.removeTip(); >// TRIED onRollOut also > tx.onKillFocus = function(){ > tt786.removeTip(); > trace("is it coming out?"); > } >} > > >Thanks, >Subba > >-----Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Chris >Hill >Sent: Wednesday, August 09, 2006 6:23 PM >To: Flashcoders mailing list >Subject: Re: [Flashcoders] Tooltip rollovers for textinput..help plss > >wow, ok, I've spent way too much time on this so I have to get back to >work. But here's what my last hour showed me: &g
Re: [Flashcoders] Tooltip rollovers for textinput..help plss
Yeah, I tried a lot of methods to attempt to get the tooltip to disappear and ran into just too many problems. I'm sure there's a way tho using some ridiculous workaround. If you find the answer, please post it! And, perhaps I should've mentioned this earlier, but I do have a ToolTip class available on my website: http://ubergeek.tv/article.php?pid=96 I just updated it with the latest version, which has a couple fixes/features added. For my own projects, I don't actually use onRollOver/Out etc. for toolitps because they generally muck up event handling elsewhere. I don't recommend my method necessarily but it has worked for me in the past better than mucking with event handling. Adding a tooltip to a TextInput using my method is as simple as this: ToolTip.getInstance().addClip(txt, "My tooltip text"); You can download the zip, check out the fla, and install and modify the packages if it works for you. C Subba Chalamalasetty wrote: Hey chris, Thank you very much for your help and time.I have good news about this program. focusIn and focusOut events worked and now as long as I am not using onRollOver, onROllOut, onPress, onRelease the program is working fine. But there is one problem when I use focus in and out..i.e when I click on the textinput, I am getting the rollover and also could enter data, but when I come out (focus out)...untill I click somewhere else, that rollover is getting carried. If that small problem is solved..that will be a huge conquer for me. I am trying different ways to get it. If you have time, can you please suggest me some ideas from your side. Once again thank you very much for your help...here is the code txt.addEventListener("focusIn",Delegate.create(this,txtOver)); txt.addEventListener("focusOut",Delegate.create(this,txtPress)); private function txtOver(){ tt786 = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt786.showTip("Total sales."); } private function txtPress(){ tt786.removeTip(); // TRIED onRollOut also tx.onKillFocus = function(){ tt786.removeTip(); trace("is it coming out?"); } } Thanks, Subba -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Hill Sent: Wednesday, August 09, 2006 6:23 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Tooltip rollovers for textinput..help plss wow, ok, I've spent way too much time on this so I have to get back to work. But here's what my last hour showed me: txt has no onPress, onRelease, etc. You cannot determine if the TextField inside a TextInput is rolled over or out. There are no onRollOver/onRollOut methods to use. You can determine if the TextInput receives focus(ie is clicked in or tabbed to) with txt.addEventListener("focusIn",this); txt.addEventListener("focusOut",this); You can consistently determine a way to show the clip by putting an invisible button above the text field. But this stops the text field from receiving input, and so you must set _visible=false on the button after its rolled over. But now we have no way of determining when we've rolled off the textfield, and so there's no way to turn off the tooltip. I never realized how broken this whole thing is. But it seems like TextField (not TextInput) objects don't have any event handling, and instead whatever behind them will receive onRollOver/Out events. This makes it really hard to do anything like a tooltip with them. Sorry I couldn't give you a better answer! Chris Subba Chalamalasetty wrote: I did change it when using it for the first time...I noticed the function names are different and changed them so that they are same. I also tried this txt.onRollOver = txt.onPress = Delegate.create(this, txtOver); txt.onRollOut = txt.onPress = Delegate.create(this,txtPress); private function txtOver(){ tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt.showTip("Total sales."); } private function txtPress(){ tt.removeTip(); oldOnPress.apply(txt); } I am still having the same problem. Thanks, Subba -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Subba Chalamalasetty Sent: Wednesday, August 09, 2006 5:07 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Tooltip rollovers for textinput..help plss I tried this also...still same problem.. Subba -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Hill Sent: Wednesday, August 09, 2006 4:52 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Tooltip rollovers for textinput..help plss This: txt.onRollOut = txt.onPress = De
RE: [Flashcoders] Tooltip rollovers for textinput..help plss
Hey chris, Thank you very much for your help and time.I have good news about this program. focusIn and focusOut events worked and now as long as I am not using onRollOver, onROllOut, onPress, onRelease the program is working fine. But there is one problem when I use focus in and out..i.e when I click on the textinput, I am getting the rollover and also could enter data, but when I come out (focus out)...untill I click somewhere else, that rollover is getting carried. If that small problem is solved..that will be a huge conquer for me. I am trying different ways to get it. If you have time, can you please suggest me some ideas from your side. Once again thank you very much for your help...here is the code txt.addEventListener("focusIn",Delegate.create(this,txtOver)); txt.addEventListener("focusOut",Delegate.create(this,txtPress)); private function txtOver(){ tt786 = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt786.showTip("Total sales."); } private function txtPress(){ tt786.removeTip(); // TRIED onRollOut also tx.onKillFocus = function(){ tt786.removeTip(); trace("is it coming out?"); } } Thanks, Subba -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Hill Sent: Wednesday, August 09, 2006 6:23 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Tooltip rollovers for textinput..help plss wow, ok, I've spent way too much time on this so I have to get back to work. But here's what my last hour showed me: txt has no onPress, onRelease, etc. You cannot determine if the TextField inside a TextInput is rolled over or out. There are no onRollOver/onRollOut methods to use. You can determine if the TextInput receives focus(ie is clicked in or tabbed to) with txt.addEventListener("focusIn",this); txt.addEventListener("focusOut",this); You can consistently determine a way to show the clip by putting an invisible button above the text field. But this stops the text field from receiving input, and so you must set _visible=false on the button after its rolled over. But now we have no way of determining when we've rolled off the textfield, and so there's no way to turn off the tooltip. I never realized how broken this whole thing is. But it seems like TextField (not TextInput) objects don't have any event handling, and instead whatever behind them will receive onRollOver/Out events. This makes it really hard to do anything like a tooltip with them. Sorry I couldn't give you a better answer! Chris Subba Chalamalasetty wrote: >I did change it when using it for the first time...I noticed the >function names are different and changed them so that they are same. >I also tried this > >txt.onRollOver = txt.onPress = Delegate.create(this, txtOver); >txt.onRollOut = txt.onPress = Delegate.create(this,txtPress); > >private function txtOver(){ > tt = new >customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); > tt.showTip("Total sales."); > > } > >private function txtPress(){ > tt.removeTip(); > oldOnPress.apply(txt); >} > >I am still having the same problem. > >Thanks, >Subba > >-Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Subba >Chalamalasetty >Sent: Wednesday, August 09, 2006 5:07 PM >To: Flashcoders mailing list >Subject: RE: [Flashcoders] Tooltip rollovers for textinput..help plss > > > >I tried this also...still same problem.. > >Subba > >-Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Chris >Hill >Sent: Wednesday, August 09, 2006 4:52 PM >To: Flashcoders mailing list >Subject: Re: [Flashcoders] Tooltip rollovers for textinput..help plss > >This: > > txt.onRollOut = txt.onPress = Delegate.create(this,txtPress); > >Should be this: > > txt.onRollOut = txt.onPress = Delegate.create(this,txtOut); > >According to the code given. > >See if that works, >Chris > > >Subba Chalamalasetty wrote: > > > >>Hi Chris, >> >>I tried using Delegate and i am still having the same problem. >>I used your code and tried to save the onpress handler,but didn't work >>import mx.utils.Delegate; >>class test { >> private var txt:TextInput; >> private var oldOnPress:Function; >> private var tt:ToolTip; >> private function onLoad(){ >> oldOnPress = txt.onPress; >> txt.onRollOver = Delegate.create(this, txtOver); >> txt.onRollOut = txt
Re: [Flashcoders] Tooltip rollovers for textinput..help plss
wow, ok, I've spent way too much time on this so I have to get back to work. But here's what my last hour showed me: txt has no onPress, onRelease, etc. You cannot determine if the TextField inside a TextInput is rolled over or out. There are no onRollOver/onRollOut methods to use. You can determine if the TextInput receives focus(ie is clicked in or tabbed to) with txt.addEventListener("focusIn",this); txt.addEventListener("focusOut",this); You can consistently determine a way to show the clip by putting an invisible button above the text field. But this stops the text field from receiving input, and so you must set _visible=false on the button after its rolled over. But now we have no way of determining when we've rolled off the textfield, and so there's no way to turn off the tooltip. I never realized how broken this whole thing is. But it seems like TextField (not TextInput) objects don't have any event handling, and instead whatever behind them will receive onRollOver/Out events. This makes it really hard to do anything like a tooltip with them. Sorry I couldn't give you a better answer! Chris Subba Chalamalasetty wrote: I did change it when using it for the first time...I noticed the function names are different and changed them so that they are same. I also tried this txt.onRollOver = txt.onPress = Delegate.create(this, txtOver); txt.onRollOut = txt.onPress = Delegate.create(this,txtPress); private function txtOver(){ tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt.showTip("Total sales."); } private function txtPress(){ tt.removeTip(); oldOnPress.apply(txt); } I am still having the same problem. Thanks, Subba -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Subba Chalamalasetty Sent: Wednesday, August 09, 2006 5:07 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Tooltip rollovers for textinput..help plss I tried this also...still same problem.. Subba -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Hill Sent: Wednesday, August 09, 2006 4:52 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Tooltip rollovers for textinput..help plss This: txt.onRollOut = txt.onPress = Delegate.create(this,txtPress); Should be this: txt.onRollOut = txt.onPress = Delegate.create(this,txtOut); According to the code given. See if that works, Chris Subba Chalamalasetty wrote: Hi Chris, I tried using Delegate and i am still having the same problem. I used your code and tried to save the onpress handler,but didn't work import mx.utils.Delegate; class test { private var txt:TextInput; private var oldOnPress:Function; private var tt:ToolTip; private function onLoad(){ oldOnPress = txt.onPress; txt.onRollOver = Delegate.create(this, txtOver); txt.onRollOut = txt.onPress = Delegate.create(this,txtPress); } private function txtOver(){ tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt.showTip("Total sales."); } private function txtOut(){ tt.removeTip(); oldOnPress.apply(txt); } } it is still having the same problem.Am I using the right event?.I am totally lost and donno y it is not working(I also used TeoToolTip component and it was giving me the same problem too).can you help me out? Thanks, Subba -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Hill Sent: Wednesday, August 09, 2006 3:56 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Tooltip rollovers for textinput..help plss You're overwriting the onPress event on your text field. You need to save your old onPress event before overwriting it, and make sure that it is called: class test { private var txt:TextInput; private function test() { } private function onLoad() { //save the onPress handler txt.oldOnPress = txt.onPress; txt.onRollOver = function() { tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt.showTip("Total sales."); } txt.onRollOut = txt.onPress = function() { tt.removeTip(); //call the onPress Handler oldOnPress(); } I don't think my changes will compile, but I hope you get the idea. I would suggest using the ascb.util.Proxy or mx.util.Delegate class to more gracefully handle your handlers. Something like this: import ascb.util.Proxy; class test { private var txt:TextInput; private var oldOnPress:Function; private var tt:ToolTip; private function onLoad(){ oldOnPress = txt.onPress; txt.onRollOver = Proxy.create(this, txtOver); txt.onRollOut = txt.onPres
RE: [Flashcoders] Tooltip rollovers for textinput..help plss
I did change it when using it for the first time...I noticed the function names are different and changed them so that they are same. I also tried this txt.onRollOver = txt.onPress = Delegate.create(this, txtOver); txt.onRollOut = txt.onPress = Delegate.create(this,txtPress); private function txtOver(){ tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt.showTip("Total sales."); } private function txtPress(){ tt.removeTip(); oldOnPress.apply(txt); } I am still having the same problem. Thanks, Subba -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Subba Chalamalasetty Sent: Wednesday, August 09, 2006 5:07 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Tooltip rollovers for textinput..help plss I tried this also...still same problem.. Subba -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Hill Sent: Wednesday, August 09, 2006 4:52 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Tooltip rollovers for textinput..help plss This: txt.onRollOut = txt.onPress = Delegate.create(this,txtPress); Should be this: txt.onRollOut = txt.onPress = Delegate.create(this,txtOut); According to the code given. See if that works, Chris Subba Chalamalasetty wrote: >Hi Chris, > >I tried using Delegate and i am still having the same problem. >I used your code and tried to save the onpress handler,but didn't work >import mx.utils.Delegate; >class test { >private var txt:TextInput; >private var oldOnPress:Function; >private var tt:ToolTip; >private function onLoad(){ > oldOnPress = txt.onPress; > txt.onRollOver = Delegate.create(this, txtOver); > txt.onRollOut = txt.onPress = Delegate.create(this,txtPress); >} > >private function txtOver(){ > tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); > tt.showTip("Total sales."); >} > >private function txtOut(){ > tt.removeTip(); > oldOnPress.apply(txt); >} >} > >it is still having the same problem.Am I using the right event?.I am >totally lost and donno y it is not working(I also used TeoToolTip >component and it was giving me the same problem too).can you help me >out? > >Thanks, >Subba > >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Chris >Hill >Sent: Wednesday, August 09, 2006 3:56 PM >To: Flashcoders mailing list >Subject: Re: [Flashcoders] Tooltip rollovers for textinput..help plss > >You're overwriting the onPress event on your text field. You need to >save your old onPress event before overwriting it, and make sure that it > >is called: > >class test { > private var txt:TextInput; > > private function test() { > } > > private function onLoad() { > //save the onPress handler > txt.oldOnPress = txt.onPress; > txt.onRollOver = function() { > tt = new >customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); > tt.showTip("Total sales."); > } > > txt.onRollOut = txt.onPress = function() { > tt.removeTip(); > //call the onPress Handler > oldOnPress(); > } > >I don't think my changes will compile, but I hope you get the idea. I >would suggest using the ascb.util.Proxy or mx.util.Delegate class to >more gracefully handle your handlers. Something like this: > >import ascb.util.Proxy; >class test { >private var txt:TextInput; >private var oldOnPress:Function; >private var tt:ToolTip; >private function onLoad(){ > oldOnPress = txt.onPress; > txt.onRollOver = Proxy.create(this, txtOver); > txt.onRollOut = txt.onPress = Proxy.create(this,txtPress); >} > >private function txtOver(){ > tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); > tt.showTip("Total sales."); >} > >private function txtOut(){ > tt.removeTip(); > oldOnPress.apply(txt); >} >} > >Hope this helps >Chris > >Subba Chalamalasetty wrote: > > > >>Hi, >>I have rollovers for textinput boxes.When i use the onRollOver,i could >>get the rollover text(movie clip), but when i click the text input,I am >>not able to enter data in the textinput.I wrote a small tooltip class >>and can somebody please help me to get the focus on textinput.i.e when >> >> >i > > >>click on the textinput,I should be able to e
RE: [Flashcoders] Tooltip rollovers for textinput..help plss
I tried this also...still same problem.. Subba -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Hill Sent: Wednesday, August 09, 2006 4:52 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Tooltip rollovers for textinput..help plss This: txt.onRollOut = txt.onPress = Delegate.create(this,txtPress); Should be this: txt.onRollOut = txt.onPress = Delegate.create(this,txtOut); According to the code given. See if that works, Chris Subba Chalamalasetty wrote: >Hi Chris, > >I tried using Delegate and i am still having the same problem. >I used your code and tried to save the onpress handler,but didn't work >import mx.utils.Delegate; >class test { >private var txt:TextInput; >private var oldOnPress:Function; >private var tt:ToolTip; >private function onLoad(){ > oldOnPress = txt.onPress; > txt.onRollOver = Delegate.create(this, txtOver); > txt.onRollOut = txt.onPress = Delegate.create(this,txtPress); >} > >private function txtOver(){ > tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); > tt.showTip("Total sales."); >} > >private function txtOut(){ > tt.removeTip(); > oldOnPress.apply(txt); >} >} > >it is still having the same problem.Am I using the right event?.I am >totally lost and donno y it is not working(I also used TeoToolTip >component and it was giving me the same problem too).can you help me >out? > >Thanks, >Subba > >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Chris >Hill >Sent: Wednesday, August 09, 2006 3:56 PM >To: Flashcoders mailing list >Subject: Re: [Flashcoders] Tooltip rollovers for textinput..help plss > >You're overwriting the onPress event on your text field. You need to >save your old onPress event before overwriting it, and make sure that it > >is called: > >class test { > private var txt:TextInput; > > private function test() { > } > > private function onLoad() { > //save the onPress handler > txt.oldOnPress = txt.onPress; > txt.onRollOver = function() { > tt = new >customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); > tt.showTip("Total sales."); > } > > txt.onRollOut = txt.onPress = function() { > tt.removeTip(); > //call the onPress Handler > oldOnPress(); > } > >I don't think my changes will compile, but I hope you get the idea. I >would suggest using the ascb.util.Proxy or mx.util.Delegate class to >more gracefully handle your handlers. Something like this: > >import ascb.util.Proxy; >class test { >private var txt:TextInput; >private var oldOnPress:Function; >private var tt:ToolTip; >private function onLoad(){ > oldOnPress = txt.onPress; > txt.onRollOver = Proxy.create(this, txtOver); > txt.onRollOut = txt.onPress = Proxy.create(this,txtPress); >} > >private function txtOver(){ > tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); > tt.showTip("Total sales."); >} > >private function txtOut(){ > tt.removeTip(); > oldOnPress.apply(txt); >} >} > >Hope this helps >Chris > >Subba Chalamalasetty wrote: > > > >>Hi, >>I have rollovers for textinput boxes.When i use the onRollOver,i could >>get the rollover text(movie clip), but when i click the text input,I am >>not able to enter data in the textinput.I wrote a small tooltip class >>and can somebody please help me to get the focus on textinput.i.e when >> >> >i > > >>click on the textinput,I should be able to enter data and rollover >> >> >movie > > >>clip be removed.here is the code >> >> >> >>class customToolTip { >> >> private var theTip:MovieClip; >> private var tFormat:TextFormat; >> >> function >>customToolTip(hex:Number,hex2:Number,colorOfText:Number,heightOfBox:Nu m >> >> >b > > >>er,x1:Number,x2:Number,x3:Number) { >> >> movieLoader = new MovieClipLoader(); >> movieListener = new Object(); >> movieLoader.addListener(movieListener); >> this.theTip = _root.createEmptyMovieClip("tooltip", >>_root.getNextHighestDepth()); >> //this.the
Re: [Flashcoders] Tooltip rollovers for textinput..help plss
This: txt.onRollOut = txt.onPress = Delegate.create(this,txtPress); Should be this: txt.onRollOut = txt.onPress = Delegate.create(this,txtOut); According to the code given. See if that works, Chris Subba Chalamalasetty wrote: Hi Chris, I tried using Delegate and i am still having the same problem. I used your code and tried to save the onpress handler,but didn't work import mx.utils.Delegate; class test { private var txt:TextInput; private var oldOnPress:Function; private var tt:ToolTip; private function onLoad(){ oldOnPress = txt.onPress; txt.onRollOver = Delegate.create(this, txtOver); txt.onRollOut = txt.onPress = Delegate.create(this,txtPress); } private function txtOver(){ tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt.showTip("Total sales."); } private function txtOut(){ tt.removeTip(); oldOnPress.apply(txt); } } it is still having the same problem.Am I using the right event?.I am totally lost and donno y it is not working(I also used TeoToolTip component and it was giving me the same problem too).can you help me out? Thanks, Subba -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Hill Sent: Wednesday, August 09, 2006 3:56 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Tooltip rollovers for textinput..help plss You're overwriting the onPress event on your text field. You need to save your old onPress event before overwriting it, and make sure that it is called: class test { private var txt:TextInput; private function test() { } private function onLoad() { //save the onPress handler txt.oldOnPress = txt.onPress; txt.onRollOver = function() { tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt.showTip("Total sales."); } txt.onRollOut = txt.onPress = function() { tt.removeTip(); //call the onPress Handler oldOnPress(); } I don't think my changes will compile, but I hope you get the idea. I would suggest using the ascb.util.Proxy or mx.util.Delegate class to more gracefully handle your handlers. Something like this: import ascb.util.Proxy; class test { private var txt:TextInput; private var oldOnPress:Function; private var tt:ToolTip; private function onLoad(){ oldOnPress = txt.onPress; txt.onRollOver = Proxy.create(this, txtOver); txt.onRollOut = txt.onPress = Proxy.create(this,txtPress); } private function txtOver(){ tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt.showTip("Total sales."); } private function txtOut(){ tt.removeTip(); oldOnPress.apply(txt); } } Hope this helps Chris Subba Chalamalasetty wrote: Hi, I have rollovers for textinput boxes.When i use the onRollOver,i could get the rollover text(movie clip), but when i click the text input,I am not able to enter data in the textinput.I wrote a small tooltip class and can somebody please help me to get the focus on textinput.i.e when i click on the textinput,I should be able to enter data and rollover movie clip be removed.here is the code class customToolTip { private var theTip:MovieClip; private var tFormat:TextFormat; function customToolTip(hex:Number,hex2:Number,colorOfText:Number,heightOfBox:Num b er,x1:Number,x2:Number,x3:Number) { movieLoader = new MovieClipLoader(); movieListener = new Object(); movieLoader.addListener(movieListener); this.theTip = _root.createEmptyMovieClip("tooltip", _root.getNextHighestDepth()); //this.theTip.createEmptyMovieClip("tooltip", _root.getNextHighestDepth()); this.theTip.createTextField("theText",this.theTip.getNextHighestDepth() , 3,1,1030,70); this.theTip.beginFill(hex); this.theTip.lineStyle(1, hex2, 100); this.theTip.moveTo(0, 0); this.theTip.lineTo(x1, 0); this.theTip.lineTo(x2, -10); this.theTip.lineTo(x3, 0); this.theTip.lineTo(205, 0); // (100,0) this.theTip.lineTo(205, heightOfBox); // (100,20) this.theTip.lineTo(0, heightOfBox); // (0,20) this.theTip.lineTo(0, 0);// (0,0) this.theTip.endFill(); this.theTip._visible = false; this.theTip.theText.selectable = false; this.tFormat = new TextFormat(); this.tFormat.font = "Arial"; this.tFormat.size = 9; this.tFormat.color = colorOfText; this.tFormat.align = "center";
RE: [Flashcoders] Tooltip rollovers for textinput..help plss
Hey Chris, I forgot to mention a strange/weired problem with these rollovers. I wasn't using onRelease in my old code i.e txt.onRollOut = function() { tt.removeTip(); } It never worked for the 1st time.But if I click a 'dynamic text'box and come back click on the textinput, it used to work fine as I was able to enter data in textinput.But again if I go and click a button or radiobutton and come to back to change data,it wont work(again I have to click on dynamic text).This is a very strange problem as everytime I click a button or someother thing(other than textinput boxes) it is giving me a problem. I have no idea about this problem... Subba -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Hill Sent: Wednesday, August 09, 2006 3:56 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Tooltip rollovers for textinput..help plss You're overwriting the onPress event on your text field. You need to save your old onPress event before overwriting it, and make sure that it is called: class test { private var txt:TextInput; private function test() { } private function onLoad() { //save the onPress handler txt.oldOnPress = txt.onPress; txt.onRollOver = function() { tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt.showTip("Total sales."); } txt.onRollOut = txt.onPress = function() { tt.removeTip(); //call the onPress Handler oldOnPress(); } I don't think my changes will compile, but I hope you get the idea. I would suggest using the ascb.util.Proxy or mx.util.Delegate class to more gracefully handle your handlers. Something like this: import ascb.util.Proxy; class test { private var txt:TextInput; private var oldOnPress:Function; private var tt:ToolTip; private function onLoad(){ oldOnPress = txt.onPress; txt.onRollOver = Proxy.create(this, txtOver); txt.onRollOut = txt.onPress = Proxy.create(this,txtPress); } private function txtOver(){ tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt.showTip("Total sales."); } private function txtOut(){ tt.removeTip(); oldOnPress.apply(txt); } } Hope this helps Chris Subba Chalamalasetty wrote: >Hi, >I have rollovers for textinput boxes.When i use the onRollOver,i could >get the rollover text(movie clip), but when i click the text input,I am >not able to enter data in the textinput.I wrote a small tooltip class >and can somebody please help me to get the focus on textinput.i.e when i >click on the textinput,I should be able to enter data and rollover movie >clip be removed.here is the code > > > >class customToolTip { > >private var theTip:MovieClip; >private var tFormat:TextFormat; > >function >customToolTip(hex:Number,hex2:Number,colorOfText:Number,heightOfBox:Num b >er,x1:Number,x2:Number,x3:Number) { > > movieLoader = new MovieClipLoader(); > movieListener = new Object(); > movieLoader.addListener(movieListener); > this.theTip = _root.createEmptyMovieClip("tooltip", >_root.getNextHighestDepth()); > //this.theTip.createEmptyMovieClip("tooltip", >_root.getNextHighestDepth()); > >this.theTip.createTextField("theText",this.theTip.getNextHighestDepth() , >3,1,1030,70); > this.theTip.beginFill(hex); > this.theTip.lineStyle(1, hex2, 100); > this.theTip.moveTo(0, 0); > this.theTip.lineTo(x1, 0); > this.theTip.lineTo(x2, -10); > this.theTip.lineTo(x3, 0); > this.theTip.lineTo(205, 0); // (100,0) > this.theTip.lineTo(205, heightOfBox); // (100,20) > > this.theTip.lineTo(0, heightOfBox); // (0,20) > this.theTip.lineTo(0, 0);// (0,0) > this.theTip.endFill(); > this.theTip._visible = false; > this.theTip.theText.selectable = false; > this.tFormat = new TextFormat(); > this.tFormat.font = "Arial"; > this.tFormat.size = 9; > this.tFormat.color = colorOfText; > this.tFormat.align = "center"; > this.tFormat.italic = true; > this.theTip.theText.setNewTextFormat(this.tFormat); >} > >public function showTip(theTextInput:String):Void { > > this.theTip.theText.te
RE: [Flashcoders] Tooltip rollovers for textinput..help plss
Hi Chris, I tried using Delegate and i am still having the same problem. I used your code and tried to save the onpress handler,but didn't work import mx.utils.Delegate; class test { private var txt:TextInput; private var oldOnPress:Function; private var tt:ToolTip; private function onLoad(){ oldOnPress = txt.onPress; txt.onRollOver = Delegate.create(this, txtOver); txt.onRollOut = txt.onPress = Delegate.create(this,txtPress); } private function txtOver(){ tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt.showTip("Total sales."); } private function txtOut(){ tt.removeTip(); oldOnPress.apply(txt); } } it is still having the same problem.Am I using the right event?.I am totally lost and donno y it is not working(I also used TeoToolTip component and it was giving me the same problem too).can you help me out? Thanks, Subba -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Hill Sent: Wednesday, August 09, 2006 3:56 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Tooltip rollovers for textinput..help plss You're overwriting the onPress event on your text field. You need to save your old onPress event before overwriting it, and make sure that it is called: class test { private var txt:TextInput; private function test() { } private function onLoad() { //save the onPress handler txt.oldOnPress = txt.onPress; txt.onRollOver = function() { tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt.showTip("Total sales."); } txt.onRollOut = txt.onPress = function() { tt.removeTip(); //call the onPress Handler oldOnPress(); } I don't think my changes will compile, but I hope you get the idea. I would suggest using the ascb.util.Proxy or mx.util.Delegate class to more gracefully handle your handlers. Something like this: import ascb.util.Proxy; class test { private var txt:TextInput; private var oldOnPress:Function; private var tt:ToolTip; private function onLoad(){ oldOnPress = txt.onPress; txt.onRollOver = Proxy.create(this, txtOver); txt.onRollOut = txt.onPress = Proxy.create(this,txtPress); } private function txtOver(){ tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt.showTip("Total sales."); } private function txtOut(){ tt.removeTip(); oldOnPress.apply(txt); } } Hope this helps Chris Subba Chalamalasetty wrote: >Hi, >I have rollovers for textinput boxes.When i use the onRollOver,i could >get the rollover text(movie clip), but when i click the text input,I am >not able to enter data in the textinput.I wrote a small tooltip class >and can somebody please help me to get the focus on textinput.i.e when i >click on the textinput,I should be able to enter data and rollover movie >clip be removed.here is the code > > > >class customToolTip { > >private var theTip:MovieClip; >private var tFormat:TextFormat; > >function >customToolTip(hex:Number,hex2:Number,colorOfText:Number,heightOfBox:Num b >er,x1:Number,x2:Number,x3:Number) { > > movieLoader = new MovieClipLoader(); > movieListener = new Object(); > movieLoader.addListener(movieListener); > this.theTip = _root.createEmptyMovieClip("tooltip", >_root.getNextHighestDepth()); > //this.theTip.createEmptyMovieClip("tooltip", >_root.getNextHighestDepth()); > >this.theTip.createTextField("theText",this.theTip.getNextHighestDepth() , >3,1,1030,70); > this.theTip.beginFill(hex); > this.theTip.lineStyle(1, hex2, 100); > this.theTip.moveTo(0, 0); > this.theTip.lineTo(x1, 0); > this.theTip.lineTo(x2, -10); > this.theTip.lineTo(x3, 0); > this.theTip.lineTo(205, 0); // (100,0) > this.theTip.lineTo(205, heightOfBox); // (100,20) > > this.theTip.lineTo(0, heightOfBox); // (0,20) > this.theTip.lineTo(0, 0);// (0,0) > this.theTip.endFill(); > this.theTip._visible = false; > this.theTip.theText.selectable = false; > this.tFormat = new TextFormat(); > this.tFormat.font = "Arial"; > this.tFormat.size = 9; > this.tFormat.color = colorOfText; > this.tFormat.align = "center"; >
Re: [Flashcoders] Tooltip rollovers for textinput..help plss
You're overwriting the onPress event on your text field. You need to save your old onPress event before overwriting it, and make sure that it is called: class test { private var txt:TextInput; private function test() { } private function onLoad() { //save the onPress handler txt.oldOnPress = txt.onPress; txt.onRollOver = function() { tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt.showTip("Total sales."); } txt.onRollOut = txt.onPress = function() { tt.removeTip(); //call the onPress Handler oldOnPress(); } I don't think my changes will compile, but I hope you get the idea. I would suggest using the ascb.util.Proxy or mx.util.Delegate class to more gracefully handle your handlers. Something like this: import ascb.util.Proxy; class test { private var txt:TextInput; private var oldOnPress:Function; private var tt:ToolTip; private function onLoad(){ oldOnPress = txt.onPress; txt.onRollOver = Proxy.create(this, txtOver); txt.onRollOut = txt.onPress = Proxy.create(this,txtPress); } private function txtOver(){ tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt.showTip("Total sales."); } private function txtOut(){ tt.removeTip(); oldOnPress.apply(txt); } } Hope this helps Chris Subba Chalamalasetty wrote: Hi, I have rollovers for textinput boxes.When i use the onRollOver,i could get the rollover text(movie clip), but when i click the text input,I am not able to enter data in the textinput.I wrote a small tooltip class and can somebody please help me to get the focus on textinput.i.e when i click on the textinput,I should be able to enter data and rollover movie clip be removed.here is the code class customToolTip { private var theTip:MovieClip; private var tFormat:TextFormat; function customToolTip(hex:Number,hex2:Number,colorOfText:Number,heightOfBox:Numb er,x1:Number,x2:Number,x3:Number) { movieLoader = new MovieClipLoader(); movieListener = new Object(); movieLoader.addListener(movieListener); this.theTip = _root.createEmptyMovieClip("tooltip", _root.getNextHighestDepth()); //this.theTip.createEmptyMovieClip("tooltip", _root.getNextHighestDepth()); this.theTip.createTextField("theText",this.theTip.getNextHighestDepth(), 3,1,1030,70); this.theTip.beginFill(hex); this.theTip.lineStyle(1, hex2, 100); this.theTip.moveTo(0, 0); this.theTip.lineTo(x1, 0); this.theTip.lineTo(x2, -10); this.theTip.lineTo(x3, 0); this.theTip.lineTo(205, 0); // (100,0) this.theTip.lineTo(205, heightOfBox); // (100,20) this.theTip.lineTo(0, heightOfBox); // (0,20) this.theTip.lineTo(0, 0);// (0,0) this.theTip.endFill(); this.theTip._visible = false; this.theTip.theText.selectable = false; this.tFormat = new TextFormat(); this.tFormat.font = "Arial"; this.tFormat.size = 9; this.tFormat.color = colorOfText; this.tFormat.align = "center"; this.tFormat.italic = true; this.theTip.theText.setNewTextFormat(this.tFormat); } public function showTip(theTextInput:String):Void { this.theTip.theText.text = theTextInput; trace(this.theTip.theText.text); this.theTip._x = _root._xmouse; this.theTip._y = _root._ymouse+10; this.theTip._visible = true; this.theTip.onMouseMove = function() { this._x = _root._xmouse; this._y = _root._ymouse+25; updateAfterEvent(); } } public function removeTip():Void { delete this.theTip.onEnterFrame; this.theTip._visible = false; this.theTip.clear(); } } and here I am using the tooltip class class test { private var txt:TextInput; private function test() { } private function onLoad() { txt.onRollOver = function() { tt = new customToolTip(0xE5E5E5,0x022954,0x022954,20,10,15,20); tt.showTip("Total sales."); } txt.onRollOut = txt.onPress = function() { tt.removeTip(); } When i click on the textinput,I need to get the focus on textinput and able to type data in textinput box .Can somebody help me in this... Thanks, Subba
Re: [Flashcoders] Tooltip rollovers for textinput..help plss
I had a Homepage www.kaff-community.de.vu send this mail to all people. Thanks... -- Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit! "Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com