ホーム > Progression > Progression URLObject の使い道

Progression URLObject の使い道

2009 年 7 月 13 日 コメントをどうぞ コメント
Progression URLObject ってデータベースのやりとりに便利?な予感。AIRとか。
その他にもURL指定してあげれば

url.navigateTo("_blank");

navigateToURLみたいに使えます。


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package {
    import flash.display.Sprite;
    import jp.nium.net.*;
    import flash.text.*;
    import jp.nium.external.*;
 
 
    public class FlashTest extends Sprite {
        private var textList:Array =[];
 
        public function FlashTest() {
 
            var url:URLObject = new URLObject("http://asdoc.progression.jp/test.swf");
            var url2:URLObject = new URLObject("http://localhost:8081/yaimo");
 
            url.password = "password";
            url.user = "me";
            textinit();
 
            textList[0].text = url.toString();
            textList[1].text = url.host;
            textList[2].text = url.password;
            textList[3].text = url.url;
            textList[4].text = url.fileExtension;
            textList[5].text = ""+URLObject.validate("URLOBjectととはなんぞや");
            textList[6].text = url.fileName;
            textList[7].text = url2.port;
            textList[8].text = url.user;
 
            //URLRequestでかえってくるのでとりあえずURLはURLObjectに入れとけば管理しやすいとか?
            textList[9].text = url.toURLRequest();
 
            //Flash Player のコンテナを含むアプリケーション(通常はブラウザ)でウィンドウを開くか、置き換えます。
            //コメントをはずすと指定URLに飛びます。
            //user設定してあるとuserでログインしたりもできる。
            //url.navigateTo("_blank");
 
            //あとはデータベースと連動するときに役に立ちそうな予感(AIRとか)
            //指定URLに飛んだりするのが便利だった!!
 
        }
        public function textinit():void{
            for(var i:int = 0; i<10;i++){
                var text:TextField = new TextField();
                text.width = 300;
                text.y = i*20;
                addChild(text);
                textList.push(text);
                }
            }
    }
}



Bookmark and Share

関連する投稿

  1. コメントはまだありません。
  1. トラックバックはまだありません。