Archive

Archive for 6月, 2008

I’ve made the as3 library to detect charset.1

6月 10th, 2008

26/10/2007 00:15

I’ve made the as3 library to detect charset.( Sorry, This version is for Japanese only!)

This library is here:

http://www.hi-farm.net/aslib/detect.lzh

This library is to detect charset.

We can encode charset to “utf-8″ by using readMultiByte method in flash.net.URLStream if we set charset that loaded by application, but we can’t detect charset.

I made ths library to solve this kind of trying problem.

— How to use —

detecting the files on web: DetectOnWeb class

detecting the files on your system(i.e. AIR) : DetectOnAir class

Another way of saying, 

By using URLStream class : DetectOnWeb class

By using FileStream class : DetectOnAir class

flow of using this library is below:

1 import this class.

2 create an instance.

3 create listener object.

4 use detectCharset( url:String ) method.

5 get data 

This is the sample:

DetectOnAir class

<?xml version=”1.0″ encoding=”utf-8″?>

<mx:WindowedApplication xmlns:mx=”http://www.adobe.com/2006/mxml\”;; layout=”absolute” creationComplete=”initApp()”>

<mx:Script>

<![CDATA[

import net.hifarm.encode.DetectOnAir;

private var detect:DetectOnAir;

private function initApp():void{

detect = new DetectOnAir();

detect.addEventListener("completeData", comp);

//

detect.detectCharset("file:///Users/mmlemon/Documents/Flex%20Builder%20Moxie/indexInPDF/shift-jis.txt";;);

}

private function comp(e:Event):void{

trace(detect.result);

}

]]>

</mx:Script>

</mx:WindowedApplication>

DetectOnWeb

<?xml version=”1.0″ encoding=”utf-8″?>

<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml\”;; layout=”absolute” creationComplete=”initApp()”>

<mx:Script>

<![CDATA[

import net.hifarm.encode.DetectOnWeb;

private var detect:DetectOnWeb;

private function initApp():void{

detect = new DetectOnWeb();

detect.addEventListener("completeData", comp);

detect.detectCharset("http://blog.hi-farm.net/";;);

}

private function comp(e:Event):void{

trace(detect.result);

}

]]>

</mx:Script>

</mx:Application>

We can get charset “detect.result”.

For example, “iso-2022-jp” , “euc-jp” , “utf-8″ , “shift-jis” , “iso-8859-2″, and so on.

Of course, if application throws error, you can get error message from detect.result.

Caution:

Now you can detect charset ONLY Japanese by using my library.

I’m glad to report any bugs and request.

 

actionscript 3.0, flash , ,

AIR application for Google Analytics

6月 10th, 2008

I found such a air application in MXNA.
(http://weblogs.macromedia.com/mxna/)

Analytics Reporting Suite
(http://www.aboutnico.be/index.php/google-analytics-air-beta-sign-up/)

Needless to say, you should be able to use google analytics.

It is good for me to use default application provided by google, but I think that it is very useful in air version.

25/9/2007 23:53

Adobe AIR

I tried to create AIR application.

6月 10th, 2008

Subjoiner:
The air application introducing below has fatal problem that cannot drop images from Desktop on Windows.
I will announce to you when I will fix this problem.

————————————-

Recently, I totally absorbed in Adobe AIR, Flex, Actionscript 3.0. I should create another flex application, I create another AIR application because of problem.

The features of this AIR application is to be able to sort by several information, for example, file name, file size, value of Red, and so on.

This AIR application was created because I heard the desire of Kazunori Kazuya( http://www.necono.com ).

The way of mesuring color Red, Green, Blue is very simple.

This application caluculates the average of each colors.

I will give my great thanks to the person who email me about this application. 

Adobe AIR Runtime is below:
http://labs.adobe.com/downloads/air.html

My air application is below:
http://www.hi-farm.net/air/imageviewer/?lang=en

12/9/2007 23:01

Adobe AIR

Starting weblog in Enlgish.

6月 10th, 2008

Today I start to write my weblog in English.

I am not good at English, but I do it.

Please email me if you aren’t be able to understand my articles.

17/9/2007 01:55

未分類