Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-22-2009, 09:06 AM
Junior Member
 
Join Date: Oct 2008
Posts: 9
Default SysTray events in AS3

Hello !
I think I have just forget something, because, I seen all of the posts relating, I didn't found my mistake :
The events arn't propaged

Code:
                        si = new SysTray();
			si.useDefaultHandler = false;
			si.add();
			si.tip = "Clic-droit pour voir le menu";
			si.balloonTip = "test message";
			si.balloonTitle = "test title";
			si.balloonIcon = "info";
			si.showBalloonTip() 

			
			si.icon = g.getAdditionalFile("icone.ico");
			si.add();
			si.setEventHandler("onRClicked", onRClicked);
			si.setEventHandler("onLClicked", onLClicked);
			si.setEventHandler("onMouseMove", onSIMouseMove);
			g.trace("main");
		}
		public function onSIMouseMove(e:*):void {
			g.trace("onSIMouseMove");
		}
		public function onLClicked(e:MouseEvent):void {
			g.trace("onLClicked");
		}
		public function onRClicked(e:MouseEvent):void {
			g.trace("onRClicked");
                }
The balloon work fine, and i can see my "main" trace in swfkit, but not those in event handlers :s
Do you why ?
Thank's a lot !! =)
Reply With Quote
  #2 (permalink)  
Old 07-22-2009, 07:06 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="creationComplete();">
<mx:Script>
<![CDATA[
	import SWFKit.*;
	import SWFKit.application.*;
		
	private var si = new SysTray();
	private var g = new Global();
	
	private function creationComplete(): void {
		si.useDefaultHandler = false;
		si.tip = "Clic-droit pour voir le menu";
		si.icon = g.getAdditionalFile("icone.ico");
		si.add();
		
		si.setEventHandler("onRClicked", onRClicked);
		si.setEventHandler("onLClicked", onLClicked);
		si.setEventHandler("onMouseMove", onSIMouseMove);
		
		g.trace("main");
	}
	
	private function onSIMouseMove():void {
		g.trace("onSIMouseMove");
	}
	private function onLClicked():void {
		g.trace("onLClicked");
		si.balloonTip = "test message";
		si.balloonTitle = "test title";
		si.balloonIcon = "info";
		si.showBalloonTip();
	}
	private function onRClicked():void {
		g.trace("onRClicked");
	}
]]>	
</mx:Script>	
</mx:Application>
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:52 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.