mkoteshwar
...@gmail.com> wrote:
> *Try this*
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
> layout="absolute"
> creationComplete="createLinkHandler();">
> <mx:Script><![CDATA[
> import mx.controls.Alert;
> private function linkHandler(event:MouseEvent):void {
> try{
> var url:URLRequest = new URLRequest("
> http://finance.google.com/finance?q=" +
> event.target.label);
> navigateToURL(url);
> }catch(err:Error){
> Alert.show("Please select a stock ticker");
> }
> }
> private function createLinkHandler():void {
> p1.addEventListener(MouseEvent.CLICK,linkHandler);
> }
> ]]></mx:Script>
> <mx:Panel id="p1" title="Click on a stock ticker symbol">
> <mx:LinkButton label="ADBE"/>
> <mx:LinkButton label="GE"/>
> <mx:LinkButton label="IBM"/>
> <mx:LinkButton label="INTC"/>
> </mx:Panel>
> </mx:Application>
> Myneni Koteshwar Rao Chowdary
> On Tue, Oct 27, 2009 at 3:55 PM, Gerald Anto <flex.gerald.a...@gmail.com>wrote:
>> see this code
>> <?xml version="1.0"?>
>> <!-- events/SingleRegisterHandler.mxml -->
>> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
>> creationComplete="createLinkHandler();">
>> <mx:Script><![CDATA[
>> private function linkHandler(event:MouseEvent):void {
>> var url:URLRequest = new URLRequest("http://
>> finance.google.com/finance?q=" +
>> event.target.label);
>> navigateToURL(url);
>> }
>> private function createLinkHandler():void {
>> p1.addEventListener(MouseEvent.CLICK,linkHandler);
>> }
>> ]]></mx:Script>
>> <mx:Panel id="p1" title="Click on a stock ticker symbol">
>> <mx:LinkButton label="ADBE"/>
>> <mx:LinkButton label="GE"/>
>> <mx:LinkButton label="IBM"/>
>> <mx:LinkButton label="INTC"/>
>> </mx:Panel>
>> </mx:Application>
>> The above are code in the following page
>> http://livedocs.adobe.com/flex/3/html/help.html?content=events_08.htm...
>> it was working fine but when i click the title of the border,
>> will through the error like
>> ReferenceError: Error #1069: Property label not found on
>> mx.core.UITextField and there is no default value.
>> at
>> check/linkHandler()[H:\workspace\flexspace\testing\src\check.mxml:
>> 6]
>> what is this error?
>> when i click directly click on it in the corresponding help page
>> it will not through the error
>> why?
>> Thanks&Regards,
>> Gerald A