ï»??xml version="1.0" encoding="utf-8" standalone="yes"?>小草在线视频在线免费视频,九九热线视频只有这里最精品,国产精品无av码在线观看http://www.aygfsteel.com/hyljava/category/53241.htmlzh-cnSat, 23 Nov 2013 23:13:20 GMTSat, 23 Nov 2013 23:13:20 GMT60å››æ“v兴唐评¡¨‹è¾…导òq›_°http://www.aygfsteel.com/hyljava/archive/2013/11/23/406728.html何云éš?/dc:creator>何云éš?/author>Sat, 23 Nov 2013 12:52:00 GMThttp://www.aygfsteel.com/hyljava/archive/2013/11/23/406728.htmlhttp://www.aygfsteel.com/hyljava/comments/406728.htmlhttp://www.aygfsteel.com/hyljava/archive/2013/11/23/406728.html#Feedback0http://www.aygfsteel.com/hyljava/comments/commentRss/406728.htmlhttp://www.aygfsteel.com/hyljava/services/trackbacks/406728.htmlå››æ“v兴唐评¡¨‹è¾…导òq›_°
http://fd.itedu-g.cn/login.php

]]>
Remote Object Servicehttp://www.aygfsteel.com/hyljava/archive/2013/01/20/394479.html何云�/dc:creator>何云�/author>Sun, 20 Jan 2013 14:46:00 GMThttp://www.aygfsteel.com/hyljava/archive/2013/01/20/394479.htmlhttp://www.aygfsteel.com/hyljava/comments/394479.htmlhttp://www.aygfsteel.com/hyljava/archive/2013/01/20/394479.html#Feedback0http://www.aygfsteel.com/hyljava/comments/commentRss/394479.htmlhttp://www.aygfsteel.com/hyljava/services/trackbacks/394479.htmlRemote Object Service
对于ä¸ÀLµçš„Flex数据服务器,目前都支持AMF3/RemoteObjectåQŒä»Šå¤©æˆ‘们就来谈一谈BlazeDS的远½E‹æœåŠ¡ã€?/p>

1. ¾~–写˜qœç¨‹æœåŠ¡¾c?/p>

¾~–写BlazeDSçš„Java˜qœç¨‹æœåŠ¡¾cÀLœ‰ä¸‰ä¸ªè¦æ±‚åQ?/p>

1) 所有被调用的方法必™åÀL˜¯publicåQ?/p>

2) 所有的¾~–译¾cÕd¿…™å»èƒ½å¤Ÿé€šè¿‡BlazeDSçš„classpath讉K—®å¾—到åQ?/p>

3) ¾cÕd¿…™åÀL˜¯stateful/statelessçš„ã€?/p>

大家可以参考工½E‹æ–‡ä»¶ä¸­çš„SimpleService.javaã€?span id="more-128">

2. 配置remoting-config.xml

Java服务¾cÕd†™å¥½åŽåQŒè¿˜éœ€è¦é…¾|®ï¼ŒBlazeDSçš„Remote Service也是在服务器端对应了一个配¾|®æ–‡ä»Óž¼š(x¨¬)remoting-config.xmlåQŒé…¾|®å¥½Remote Service 后,Flex在运行时才能扑ֈ°ç›¸åº”的服务类òq¶è°ƒç”¨å…¶æ–ÒŽ(gu¨©)³•。下面就是本工程的Remote Service配置文äšgã€?/p>

配置文äšg

½W?~3行指定服务的ID和对应的¾c»ï¼Œ½W?~7行设¾|®é€‚配å™?adapters)çš„ID和对应的¾c…R€‚第9~11行指定默认的通道(channels)å?qi¨¢ng)其参照åQŒè¯¥é€šé“是在 services-config.xml中定义的。适配器和通道可以讄¡½®å¤šä¸ªåQŒé‡‡ç”¨ç¬¬ä¸€ä¸ªä¼˜å…ˆçš„原则。前面这几项讄¡½®é€‚用于proxy-config.xml、remoting-config.xml和我们后面要讲的 messaging-config.xmlã€?/p>

½W?3~18行设¾|®çš„æœåŠ¡¾lˆç«¯(destination)åQŒè¯¥å±žæ€§å¿…™åÕd’ŒRemoteObject¾l„äšg的服务终端属性一致。按照服务的¿Uç±»åQŒæœåŠ¡ç»ˆç«¯åˆå¯ä»¥åˆ†äØ“(f¨´)代理服务¾lˆç«¯ã€è¿œ½E‹æœåŠ¡ç»ˆç«¯å’Œæ¶ˆæ¯æœåŠ¡¾lˆç«¯ã€‚上一‹Æ¡è®²˜q°çš„代理服务¾lˆç«¯åQŒéœ€è¦æŒ‡å®šè¯¥¾lˆç«¯çš„urlåQŒè€Œè¿™‹Æ¡æˆ‘们讲˜q°çš„˜qœç¨‹æœåŠ¡¾lˆç«¯åQŒéœ€è¦æŒ‡å®šè¯¥ç›®æ ‡çš„sourceå’Œscope。source对应 RemoteObject要调用的˜qœç¨‹æœåŠ¡çš„å…¨é™å®š¾cÕdåQ?em>不像FluorineFXåQŒå®ƒä¸èƒ½åœ¨RemoteObject¾l„äšg中指å®?/em>。scope表示当前˜qœç¨‹æœåŠ¡çš„ä½œç”¨èŒƒå›ß_(d¨¢)¼ŒåŒ™¿œ½E‹æœåŠ¡ç±»æ˜¯stateful˜q˜æ˜¯statelessåQŒæœ‰application、sessionå’Œrequest三个选项ã€?/p>

注意åQšæˆ‘ä»¬æå€¡åœ¨é…ç½®æ–‡äšg中设¾|®ï¼Œ˜q™æ ·æ›´å®‰å…¨ä¹Ÿæ–¹ä¾¿åŽæœŸ¾l´æŠ¤ã€?/em>

3. 使用RemoteObjec¾l„äšg

对于RemoteObjec¾l„äšgåQŒè¯·å‚看
下面çš?strong>Flex RemoteObject¾cÕd‚è€?/strong>相关内容。一句话åQŒFlexçš„RemoteObject与后台语­a€æ˜¯æ— å…³çš„。在工程文äšg中的BasicRemoteObject.mxmlåQŒè°ƒç”¨äº†SimpleService¾cȝš„三个æ–ÒŽ(gu¨©)³•åQŒå½“通过BlazeDS从J2EE服务器返回RemoteObjecæ—Óž¼ŒJava数据被序列化成ActionScript数据。其中Java字符串对应ActionScript字符ä¸ÔŒ¼ŒJava的数¾l„列表对应ActionScript ArrayCollectionã€?/p>
Flex RemoteObject¾cÕd‚è€?/strong>


<mx:RemoteObject>标记允许使用AMF3讉K—®˜qœç¨‹æœåŠ¡¾cÈš„æ–ÒŽ(gu¨©)³•åQŒè¦çŸ¥é“在Flex中怎样使用Flash Remoting讉K—®æ•°æ®åQŒåº”该先了解一下RemoteObject¾c…R€?/p>

要知道在Flex中怎样使用Flash Remoting讉K—®æ•°æ®åQŒåº”该先了解一下RemoteObject¾c…R€?/p>

åŒ?mx.rpc.remoting ¾c?public dynamic class RemoteObject 
¾l§æ‰¿ RemoteObject → AbstractService → Proxy → Object 
子类 RemoteObject

一�lt;mx:RemoteObject>标记

å®ƒå…è®æ€‹É用AMF3讉K—®˜qœç¨‹æœåŠ¡¾cÈš„æ–ÒŽ(gu¨©)³•ã€?/p>

1. <mx:RemoteObject>允许的标记属性有åQ?/p>

1
2
3
4
5
6
7
8
9
10
11
12
13
<mx:RemoteObject
  Properties
  concurrency="multiple|single|last"
  destination="No default."
  id="No default."
  endpoint="No default."
  showBusyCursor="false|true"
  source="No default." (currently, Macromedia ColdFusion only)
  makeObjectsBindable="false|true"
  äº‹äšg
  fault="No default."
  result="No default."  
 />

2. <mx:RemoteObject>标记可以包含多个 <mx:method> 标记åQ?lt;mx:method>允许的标记属性有åQ?/p>

1
2
3
4
5
6
7
8
9
<mx:method
  Properties
  concurrency="multiple|single|last"
  name="No default, required."
  makeObjectsBindable="false|true"       
 äº‹äšg
  fault="No default."
  result="No default."
 />

3. <mx:RemoteObject>标记可以也只能包含一ä¸?lt;mx:arguments> 子标讎ͼŒè¯¥å­æ ‡è®°æ˜¯ä¸€ä¸ªåºåˆ—æ•°¾l„对象ã€?/p>

二、公有属�/p>

1. concurrency : String

表示对同一服务怎样˜q›è¡Œå¤šæ¬¡è°ƒç”¨ã€‚ç±»ä¼égºŽXMLConnector/WebServiceConnector/RemotingConnectorçš„multipleSimultaneousAllowed属性。它的默认å€égØ“(f¨´)multipleåQŒå…è®æ€¸‹åˆ—å€?

  • MultipleåQšåŒä¸€æ—‰™—´å¯ä»¥æ‰§è¡Œå¤šä¸ªè¯äh±‚。已有的è¯äh±‚不会(x¨¬)被取消;
  • SingleåQšåŒä¸€æ—‰™—´è°ƒç”¨åªèƒ½æ‰§è¡Œä¸€ä¸ªè¯·æ±‚,多个è¯äh±‚ä¼?x¨¬)报错ï¼?/li>
  • LaståQšæœ€åŽä¸€‹Æ¡è¯·æ±‚会(x¨¬)覆盖已有的请求ã€?/li>

2. endpoint: String

允许开发ähå‘˜å¿«é€ŸäØ“(f¨´)RemoteObject destination(目标)指定endpoint(端点)。而该destination既没有在¾~–译æ—Óž¼Œä¹Ÿæ²¡æœ‰åœ¨ç”¨ä»£ç æ–°å»ºChannelSet(通道é›?时参照services-config.xml。如果设定了该属性,它会(x¨¬)覆盖已有的ChannelSetã€?/p>

如果endpoint çš„url ä»?#8220;https”开养I¼Œž®†ä‹Éç”?SecureAMFChannel, 否则使用普通的AMFChannel。{server.name}å’Œ{server.port}标记,可以用在endpointçš„url中,表明Channel应该使用用来加蝲SWFæ–‡äšg的服务名¿U°å’Œç«¯å£ã€?/p>

3. showBusyCursor:Boolean

表示服务正在执行时是否显½CÞZ¸€ä¸ªè¡¨½Cºå¿™¼„Œçš„鼠标指针ã€?/p>

三、公有方�/p>

1. RemoteObject () 构造方�/p>

创徏一个新的RemoteObject对象�/p>

参数

destination:String (默认ä¸?null) —RemoteObject çš„destination属性必™åÕdŒ¹é…?services-config.xml 中的destinationçš„ID属性倹{€?/p>

2. initialized ()

public function initialized(document:Object, id:String):void

只要讑֮šRemoteObject标记ž®×ƒ¼š(x¨¬)通过MXML¾~–译器自动调用该æ–ÒŽ(gu¨©)³•。如果ä‹É用ActionScrip新徏RemoteObject实例åQŒåˆ™å¯ä»¥è‡ªè¡Œè°ƒç”¨è¯¥æ–¹æ³•,˜q™å¯¹éªŒè¯å…¶å‚数很有用ã€?/p>

参数

  • document:Object —RemoteObject 所在的MXML文档
  • id:String —RemoteObjec在上˜q°æ–‡æ¡£ä¸­çš„ID


]]>
在Flex中ä‹É用ActionScript的三¿Uæ–¹æ³?/title><link>http://www.aygfsteel.com/hyljava/archive/2013/01/20/394476.html</link><dc:creator>何云éš?/dc:creator><author>何云éš?/author><pubDate>Sun, 20 Jan 2013 14:33:00 GMT</pubDate><guid>http://www.aygfsteel.com/hyljava/archive/2013/01/20/394476.html</guid><wfw:comment>http://www.aygfsteel.com/hyljava/comments/394476.html</wfw:comment><comments>http://www.aygfsteel.com/hyljava/archive/2013/01/20/394476.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/hyljava/comments/commentRss/394476.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/hyljava/services/trackbacks/394476.html</trackback:ping><description><![CDATA[<div id="wmqeeuq" class="content"> <p>在Flex中ä‹É用ActionScriptåQŒå…¶å®žå’Œåœ¨ç½‘™åµä¸­ä½¿ç”¨Javascript½{‰è„šæœ¬æ–‡ä»¶ç±»ä¼û|¼Œä¸»è¦æœ‰ä¸‰¿Uæ–¹å¼ã€?span id="more-18"></span></p> <p>Flex的核心是MXMLå’ŒActionScript。MXMLæ˜¯ç”¨äºŽäØ“(f¨´)Flex应用½E‹åº˜q›è¡Œç”¨æˆ·ç•Œé¢¾l„äšg布局åQŒå®ƒå±žäºŽè¡¨ç¤ºå±‚,最¾lˆè¦¾~–辑成ActionScript òq¶ç”ŸæˆActionScript ¾cÀL–‡ä»¶åœ¨Flash Player上运行。如果你是个Java开发者就很好理解˜q™ä¸€ç‚¹ï¼ŒMXML ž®±å¥½æ¯”是JSP/Struts/JSFåQŒå®ƒä»¬æœ€¾lˆéƒ½ä¼?x¨¬)编辑成Java¾cÀL–‡ä»¶åƈ在具备Java虚拟机环境的‹¹è§ˆå™¨ä¸Š˜qè¡Œã€‚所以说åQŒFlex 最核心的还是ActionScript 。在Flex中,ActionScriptæ˜?¾cÕdº“的方式出现的åQŒè¯¥¾cÕdº“包含¾l„äšg (容器和控ä»?、管理器¾c…R€æ•°æ®æœåŠ¡ç±»å’Œæ‰€æœ‰å…¶ä»–åŠŸèƒ½çš„¾c…R€‚本文将谈一谈在Flex中ä‹É用ActionScript的方法ã€?/p> <p>其实和在¾|‘页中ä‹É用Javascript½{‰è„šæœ¬æ–‡ä»¶ç±»ä¼û|¼Œä¸»è¦æœ‰ä¸‰¿Uæ–¹å¼ã€?/p> <p>1. 内联方式<br />˜q™ç§æ–¹å¼ç›´æŽ¥ž®†ASæ–ÒŽ(gu¨©)³•ä½œäØ“(f¨´)事äšg的属性å€û|¼Œå½“ç„¶˜q™ç§æ–ÒŽ(gu¨©)³•一般只有一行,相对½Ž€å•。如果要¾l™æ–¹æ³•传递对敎ͼŒ˜q™ç§æ–ÒŽ(gu¨©)³•ž®×ƒ¸å¯å–了ã€?/p> <div> <div class="wmqeeuq" id="highlighter_900553" class="syntaxhighlighter notranslate xml ie"> <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="gutter"> <div id="wmqeeuq" class="line number1 index0 alt2">1</div> <div id="wmqeeuq" class="line number2 index1 alt1">2</div> <div id="wmqeeuq" class="line number3 index2 alt2">3</div> <div id="wmqeeuq" class="line number4 index3 alt1">4</div> <div id="wmqeeuq" class="line number5 index4 alt2">5</div> <div id="wmqeeuq" class="line number6 index5 alt1">6</div> <div id="wmqeeuq" class="line number7 index6 alt2">7</div> <div id="wmqeeuq" class="line number8 index7 alt1">8</div> <div id="wmqeeuq" class="line number9 index8 alt2">9</div> <div id="wmqeeuq" class="line number10 index9 alt1">10</div> <div id="wmqeeuq" class="line number11 index10 alt2">11</div> <div id="wmqeeuq" class="line number12 index11 alt1">12</div> <div id="wmqeeuq" class="line number13 index12 alt2">13</div></td> <td class="code"> <div id="wmqeeuq" class="container"> <div id="wmqeeuq" class="line number1 index0 alt2"><code class="xml comments"><!--main.mxml --></code></div> <div id="wmqeeuq" class="line number2 index1 alt1"><code class="xml plain"><?</code><code class="xml keyword">xml</code> <code class="xml color1">version</code><code class="xml plain">=</code><code class="xml string">"1.0"</code> <code class="xml color1">encoding</code><code class="xml plain">=</code><code class="xml string">"utf-8"</code><code class="xml plain">?>  </code></div> <div id="wmqeeuq" class="line number3 index2 alt2"><code class="xml plain"><</code><code class="xml keyword">mx:Application</code> <code class="xml color1">xmlns:mx</code><code class="xml plain">=</code><code class="xml string">"http://www.adobe.com/2006/mxml"</code> <code class="xml color1">layout</code><code class="xml plain">=</code><code class="xml string">"vertical"</code><code class="xml plain">>  </code></div> <div id="wmqeeuq" class="line number4 index3 alt1"><code class="xml spaces">    </code><code class="xml plain"><</code><code class="xml keyword">mx:Button</code> <code class="xml color1">label</code><code class="xml plain">=</code><code class="xml string">"Say Hello"</code> <code class="xml color1">click</code><code class="xml plain">=</code><code class="xml string">"sayHello('Flying')"</code><code class="xml plain">/>  </code></div> <div id="wmqeeuq" class="line number5 index4 alt2"><code class="xml spaces">        </code><code class="xml plain"><</code><code class="xml keyword">mx:Script</code><code class="xml plain">>  </code></div> <div id="wmqeeuq" class="line number6 index5 alt1"><code class="xml spaces">            </code><code class="xml color2"><![CDATA[  </code></div> <div id="wmqeeuq" class="line number7 index6 alt2"><code class="xml spaces">                </code><code class="xml color2">import mx.controls.Alert;  </code></div> <div id="wmqeeuq" class="line number8 index7 alt1"><code class="xml spaces">                </code><code class="xml color2">private function sayHello(param_name:String):void {  </code></div> <div id="wmqeeuq" class="line number9 index8 alt2"><code class="xml spaces">                    </code><code class="xml color2">Alert.show("Hello, "+param_name);  </code></div> <div id="wmqeeuq" class="line number10 index9 alt1"><code class="xml spaces">            </code><code class="xml color2">}    </code></div> <div id="wmqeeuq" class="line number11 index10 alt2"><code class="xml spaces">            </code><code class="xml color2">]]></code></div> <div id="wmqeeuq" class="line number12 index11 alt1"><code class="xml spaces">        </code><code class="xml plain"></</code><code class="xml keyword">mx:Script</code><code class="xml plain">>  </code></div> <div id="wmqeeuq" class="line number13 index12 alt2"><code class="xml plain"></</code><code class="xml keyword">mx:Application</code><code class="xml plain">></code></div></div></td></tr></tbody></table></div></div> <p>2. ¾U§è”方式<br />˜q™ç§æ–¹å¼ž®†ASæ–ÒŽ(gu¨©)³•攑օ¥<mx:Script></mx:Script>代码块中åQŒç„¶åŽå°†æ–ÒŽ(gu¨©)³•ä½œäØ“(f¨´)事äšg的属性å€û|¼Œòq¶å¯ä»¥åœ¨è°ƒç”¨æ–ÒŽ(gu¨©)³•时传递参敎ͼŒä»Žè€ŒåšåˆîCº†ASæ–ÒŽ(gu¨©)³•在一个文件中的重用ã€?/p> <div> <div class="wmqeeuq" id="highlighter_7587" class="syntaxhighlighter notranslate xml ie"> <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="gutter"> <div id="wmqeeuq" class="line number1 index0 alt2">1</div> <div id="wmqeeuq" class="line number2 index1 alt1">2</div> <div id="wmqeeuq" class="line number3 index2 alt2">3</div> <div id="wmqeeuq" class="line number4 index3 alt1">4</div> <div id="wmqeeuq" class="line number5 index4 alt2">5</div> <div id="wmqeeuq" class="line number6 index5 alt1">6</div></td> <td class="code"> <div id="wmqeeuq" class="container"> <div id="wmqeeuq" class="line number1 index0 alt2"><code class="xml comments"><!--main.mxml --></code></div> <div id="wmqeeuq" class="line number2 index1 alt1"><code class="xml plain"><?</code><code class="xml keyword">xml</code> <code class="xml color1">version</code><code class="xml plain">=</code><code class="xml string">"1.0"</code> <code class="xml color1">encoding</code><code class="xml plain">=</code><code class="xml string">"utf-8"</code><code class="xml plain">?>  </code></div> <div id="wmqeeuq" class="line number3 index2 alt2"><code class="xml plain"><</code><code class="xml keyword">mx:Application</code> <code class="xml color1">xmlns:mx</code><code class="xml plain">=</code><code class="xml string">"http://www.adobe.com/2006/mxml"</code> <code class="xml color1">layout</code><code class="xml plain">=</code><code class="xml string">"vertical"</code><code class="xml plain">>  </code></div> <div id="wmqeeuq" class="line number4 index3 alt1"><code class="xml plain"><</code><code class="xml keyword">mx:Script</code> <code class="xml color1">source</code><code class="xml plain">=</code><code class="xml string">"myFunction.as"</code><code class="xml plain">/>   </code></div> <div id="wmqeeuq" class="line number5 index4 alt2"><code class="xml spaces">    </code><code class="xml plain"><</code><code class="xml keyword">mx:Button</code> <code class="xml color1">label</code><code class="xml plain">=</code><code class="xml string">"Say Hello"</code> <code class="xml color1">click</code><code class="xml plain">=</code><code class="xml string">"sayHello('Flying');"</code><code class="xml plain">/>  </code></div> <div id="wmqeeuq" class="line number6 index5 alt1"><code class="xml plain"></</code><code class="xml keyword">mx:Application</code><code class="xml plain">></code></div></div></td></tr></tbody></table></div></div> <p>3. 外联方式</p> <div> <div class="wmqeeuq" id="highlighter_994187" class="syntaxhighlighter notranslate as3 ie"> <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="gutter"> <div id="wmqeeuq" class="line number1 index0 alt2">1</div> <div id="wmqeeuq" class="line number2 index1 alt1">2</div> <div id="wmqeeuq" class="line number3 index2 alt2">3</div> <div id="wmqeeuq" class="line number4 index3 alt1">4</div> <div id="wmqeeuq" class="line number5 index4 alt2">5</div></td> <td class="code"> <div id="wmqeeuq" class="container"> <div id="wmqeeuq" class="line number1 index0 alt2"><code class="as3 comments">//myFunction.asimport </code></div> <div id="wmqeeuq" class="line number2 index1 alt1"><code class="as3 plain">mx.controls.Alert; </code></div> <div id="wmqeeuq" class="line number3 index2 alt2"><code class="as3 keyword">private</code> <code class="as3 color3">function</code> <code class="as3 plain">sayHello(param_name:</code><code class="as3 keyword">String</code><code class="as3 plain">):</code><code class="as3 keyword">void</code> <code class="as3 plain">{ </code></div> <div id="wmqeeuq" class="line number4 index3 alt1"><code class="as3 spaces">    </code><code class="as3 plain">mx.controls.Alert.show(</code><code class="as3 string">"Hello, "</code><code class="as3 plain">+param_name); </code></div> <div id="wmqeeuq" class="line number5 index4 alt2"><code class="as3 plain">}</code></div></div></td></tr></tbody></table></div></div> <p>上述方式为ASæ–ÒŽ(gu¨©)³•单独新徏一个asæ–‡äšgåQŒç„¶åŽè®¾¾|®è¯¥æ–ÒŽ(gu¨©)³•䏸™¢«è°ƒç”¨æ–‡äšgçš„Script元素的source属性å€û|¼Œòq¶å¯ä»¥åœ¨è°ƒç”¨æ–ÒŽ(gu¨©)³•时传递参敎ͼŒæ­¤æ–‡ä»¶å¯ä»¥åœ¨å¤šä¸ªæ–‡äšg调用åQŒä»Žè€Œå®žçŽîCº†ASæ–ÒŽ(gu¨©)³•在多个文件中的重用ã€?/p> <div id="wmqeeuq" class="fixed"></div></div><img src ="http://www.aygfsteel.com/hyljava/aggbug/394476.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/hyljava/" target="_blank">何云éš?/a> 2013-01-20 22:33 <a href="http://www.aygfsteel.com/hyljava/archive/2013/01/20/394476.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Flexè·Œ™{http://www.aygfsteel.com/hyljava/archive/2013/01/18/394432.html何云éš?/dc:creator>何云éš?/author>Fri, 18 Jan 2013 14:41:00 GMThttp://www.aygfsteel.com/hyljava/archive/2013/01/18/394432.htmlhttp://www.aygfsteel.com/hyljava/comments/394432.htmlhttp://www.aygfsteel.com/hyljava/archive/2013/01/18/394432.html#Feedback0http://www.aygfsteel.com/hyljava/comments/commentRss/394432.htmlhttp://www.aygfsteel.com/hyljava/services/trackbacks/394432.htmlFlexè·Œ™{到JSP或者其他非Flex™åµé¢

 

Html代码
var url:String="http://"+URLUtil.getServerNameWithPort(Application.application.url)+"/DZDJ/index.jsp?id=" + 1;  
                 ExternalInterface.call('window.open',url,'_top');  

_top是可变的åQŒ_top表示在当前页面打开åQŒå…³é—­è¿œ™åµé¢ã€?/p>

 

 

 

导入¾c»ï¼š(x¨¬)

        import flash.net.URLRequest;
        import flash.net.navigateToURL;

关闭当前‹¹è§ˆå™¨ï¼š(x¨¬)

                        var url:URLRequest = new URLRequest("javascript:window.close()");
                        navigateToURL(url,"_top");

                        åQˆæ³¨æ„ï¼š(x¨¬)要在服务器上‹¹‹è¯•åQŒå¦åˆ™ä¼š(x¨¬)报安全沙½Ž±å†²½Hï¼‰åQ?/p>

在浏览器上蟩转页�/p>

                        navigateToURL(new URLRequest("http://www.baidu.com"),"_top");

打开一个新的浏览器åQ?/p>

                       var request:URLRequest = new URLRequest("http://www.baidu.com/);
                       navigateToURL(request);

 

Flexè·Œ™{到Flex

FLEXå’ŒJSPä¸ä¸€æ øP¼Œæ²¡æœ‰æ‰€è°“çš„˜q™ä¸ª™åµé¢è·Œ™{到另外的一个页面。一般都是用ViewStack˜q›è¡Œ™åµé¢åˆ‡æ¢åQŒå…¶ä»–模块就需要loadmoudle˜q›è¡Œå‡½æ•°è®„¡½®äº†ã€?/p>

<mx:ViewStack x="0" y="0" id="viewstack1" width="619" height="700">
   <mx:Canvas id="View1" width="100%" height="100%">
      <mx:Button label="View2 " click="viewstack1.selectedChild=View2"/>
       </mx:Canvas>


   <mx:Canvas id="View2" width="100%" height="100%" color="#3FCFE9">
   </mx:Canvas>
</mx:ViewStack>



]]>
Ö÷Õ¾Ö©Öë³ØÄ£°å£º Âí¶û¿µÏØ| ̨¶«ÊÐ| ÷ëÓÎÏØ| ÓÀÐËÏØ| ÏʳÇ| ÈĺÓÏØ| ÌÆºÓÏØ| Èô¶û¸ÇÏØ| ¿¦À®| ¹ÌÊ¼ÏØ| ÜþÑôÊÐ| ²Æ¾­| ¹àÑôÏØ| ÄÇÆÂÏØ| ³µÖÂ| ɨɽÊÐ| ̨°²ÏØ| Ä«½­| ÏĽòÏØ| ¶¼ÔÈÊÐ| ͨÖÝÇø| ÜÝÆ½ÏØ| ³Î³ÇÏØ| ½¨²ýÏØ| Áú¿ÚÊÐ| ä»Ë®ÏØ| É«´ïÏØ| ³Ê¹±ÏØ| ÒÁÄþÏØ| ´óÃûÏØ| ÂÐÄÏÏØ| ËÄÆ½ÊÐ| ÏæÎ÷| ɽÑôÏØ| ³Î³ÇÏØ| ¼ÃÄÏÊÐ| ±¦ÇåÏØ| ºÍÌïÊÐ| ¶«À¼ÏØ| Ñ·¿ËÏØ| ÇúÑôÏØ|