JAVA & FLEX
一個分享java和flex開發經驗的空間
::
首頁
:: ::
聯系
:: ::
管理
::
26 隨筆 :: 2 文章 :: 44 評論 :: 0 Trackbacks
<
2008年8月
>
日
一
二
三
四
五
六
27
28
29
30
31
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
1
2
3
4
5
6
公告
學習的路上,寂寞孤獨,如果沒有人來分享,那不如獨自品味
隨筆分類
(28)
Flex(16)
(rss)
JAVA基礎(9)
(rss)
JPA(2)
(rss)
Spring
(rss)
Struts(1)
(rss)
隨筆檔案
(28)
2010年11月 (1)
2009年6月 (1)
2008年12月 (1)
2008年11月 (9)
2008年10月 (2)
2008年9月 (7)
2008年8月 (7)
Flex鏈接組
Andy‘s博客
(rss)
D.CAT
(rss)
Dreamer’s Blog
(rss)
(rss)
SakuraMomoko’博客
YX.Shawn’s Blog
(rss)
我的javaEye博客
(rss)
每天積累
(rss)
熬兄的博客
螢火蟲工作室flex分論壇
(rss)
最新評論
1.?FLEX問題總匯
想請教一下,FLEX讀取數據庫里的信息,生成動態樹,你知道要怎樣實現嗎?
--ocean
2.?re: 【積累】Flex真正的第一步,如何安裝環境(For Eclipse 插件)
能跟你交個朋友么?我的 qq:
497624259
想與你探討flex,可以么?
--地主婆
3.?re: 【積累】Flex真正的第一步,如何安裝環境(For Eclipse 插件)
20101113 說的 做的 非常好 努力!感謝你
比其他的強
--謝謝
4.?re: 【原創】如何發布你的SWC包
評論內容較長,點擊標題查看
--曾小霞
5.?re: 【原創】如何發布你的SWC包
你的這個builder.properties是自己建的??????
--曾小霞
【積累】Flex中加載外部XML
在Flex Builder中,如果要加載一個外部的XML是比較簡單的,將絕對路徑或則是相對路徑寫入就可以了。但是如果是一個web的工程,這個問題就顯得比較復雜了,因為這個時候,你得不到文件的絕對和相對路徑,在Flex3中,解決這個問題,有如下兩個方法。
【一】mx:Model的方式
程序主文件:
1
<?
xml version="1.0"
?>
2
<!--
Simple example to demonstrate the LinkBar control.
-->
3
<
mx:Application
xmlns:mx
="http://www.adobe.com/2006/mxml"
>
4
<
mx:Script
>
5
<![CDATA[
6
]]>
7
</
mx:Script
>
8
<
mx:Model
id
="catalogService"
source
="news.xml"
/>
9
<
mx:ArrayCollection
id
="myXC"
source
="{catalogService.news}"
/>
10
<
mx:Panel
title
="TestLinkBarForXML"
11
height
="323"
width
="466"
horizontalAlign
="center"
12
paddingTop
="10"
paddingBottom
="10"
paddingLeft
="10"
paddingRight
="10"
>
13
14
<
mx:Text
width
="100%"
15
text
="一個LinkBar的測試"
/>
16
17
<
mx:LinkBar
color
="#0000FF"
fontWeight
="bold"
dataProvider
="{myViewStack}"
/>
18
19
<!--
Define the ViewStack and the three child containers.
-->
20
<
mx:ViewStack
id
="myViewStack"
borderStyle
="solid"
width
="100%"
height
="80%"
>
21
22
<
mx:Canvas
id
="show1"
backgroundColor
="#FFFFCC"
label
="顯示一"
width
="100%"
height
="100%"
>
23
24
</
mx:Canvas
>
25
26
<
mx:Canvas
id
="show2"
backgroundColor
="#CCFFFF"
label
="顯示二"
width
="100%"
height
="100%"
>
27
<
mx:DataGrid
dataProvider
="{myXC}"
/>
28
</
mx:Canvas
>
29
30
<
mx:Canvas
id
="show3"
backgroundColor
="#FFCCFF"
label
="顯示三"
width
="100%"
height
="100%"
>
31
</
mx:Canvas
>
32
</
mx:ViewStack
>
33
34
</
mx:Panel
>
35
<
mx:XML
id
="myXML"
source
="news.xml"
/>
36
37
<
mx:Text
id
="myText"
width
="292"
/>
38
</
mx:Application
>
39
40
news.xml文件
1
<?
xml version="1.0" encoding="utf-8"
?>
2
<
main
>
3
<
news
>
4
<
newsTitle
>
1-1
</
newsTitle
>
5
<
newsItem
>
1-2
</
newsItem
>
6
</
news
>
7
<
news
>
8
<
newsTitle
>
2-1
</
newsTitle
>
9
<
newsItem
>
2-2
</
newsItem
>
10
</
news
>
11
</
main
>
運行后畫面:
【二】mx:HTTPService的方式
主程序:
1
<?
xml version="1.0"
?>
2
<
mx:Application
xmlns:mx
="http://www.adobe.com/2006/mxml"
initialize
="catalogService.send()"
>
3
<
mx:HTTPService
id
="catalogService"
url
="catalog.xml"
resultFormat
="e4x"
/>
4
<
mx:XMLListCollection
id
="myXC"
source
="{catalogService.lastResult.product}"
/>
5
<
mx:Repeater
id
="r"
dataProvider
="{myXC}"
startingIndex
="1"
>
6
<
mx:RadioButton
id
="Radio"
label
="{r.currentItem.name}"
/>
7
</
mx:Repeater
>
8
</
mx:Application
>
9
xml文件:
1
<?
xml version="1.0"
?>
2
<
products
>
3
<
product
>
4
<
name
>
Name
</
name
>
5
<
price
>
Price
</
price
>
6
<
freeship
>
Free Shipping?
</
freeship
>
7
</
product
>
8
<
product
>
9
<
name
>
Whirlygig
</
name
>
10
<
price
>
5
</
price
>
11
<
freeship
>
false
</
freeship
>
12
</
product
>
13
<
product
>
14
<
name
>
Tilty Thingy
</
name
>
15
<
price
>
15
</
price
>
16
<
freeship
>
true
</
freeship
>
17
</
product
>
18
<
product
>
19
<
name
>
Really Big Blocks
</
name
>
20
<
price
>
25
</
price
>
21
<
freeship
>
true
</
freeship
>
22
</
product
>
23
</
products
>
參考:http://www.flashxm.com/?p=169
posted on 2008-08-29 16:40
程序人生-天津
閱讀(1269)
評論(0)
編輯
收藏
所屬分類:
Flex
新用戶注冊
刷新評論列表
只有注冊用戶
登錄
后才能發表評論。
網站導航:
博客園
IT新聞
Chat2DB
C++博客
博問
管理
相關文章:
【原創】如何設定linkbutton中的icon
【原創】基于flex的三層架構特效之框架結構說明
【原創】基于flex的三層架構特效之效果介紹
【積累】Flex真正的第一步,如何安裝環境(For Eclipse 插件)
【總結】幾個牛人的blog,學習的榜樣
【原創】如何發布你的SWC包
【心得】Flex中的文件上傳與下載
【轉載】FLEX問題總匯
【積累】Flex中一個關于時間格式化的函數
【積累】Flex中日期的格式化
Powered by:
BlogJava
Copyright © 程序人生-天津
主站蜘蛛池模板:
美女露隐私全部免费直播
|
久久精品免费视频观看
|
亚洲午夜久久久久久久久久
|
99视频在线观看免费
|
亚洲导航深夜福利
|
亚洲精品国产福利一二区
|
亚洲毛片免费视频
|
青青草97国产精品免费观看
|
亚洲精品视频在线观看视频
|
在线a毛片免费视频观看
|
最好免费观看高清在线
|
亚洲熟妇av午夜无码不卡
|
亚洲精品无码午夜福利中文字幕
|
67194熟妇在线永久免费观看
|
曰韩无码AV片免费播放不卡
|
亚洲国色天香视频
|
中文字幕亚洲一区二区三区
|
91免费资源网站入口
|
永久免费不卡在线观看黄网站
|
亚洲熟妇自偷自拍另欧美
|
亚洲av无码专区在线播放
|
永久黄网站色视频免费观看
|
免费av一区二区三区
|
免费在线观看自拍性爱视频
|
91亚洲国产成人久久精品网址
|
国产精品亚洲产品一区二区三区
|
毛片免费观看网址
|
美丽姑娘免费观看在线观看中文版
|
免费一级特黄特色大片
|
亚洲精品色播一区二区
|
亚洲成人网在线播放
|
亚洲人成影院在线无码按摩店
|
国产男女猛烈无遮挡免费视频网站
|
最近2018中文字幕免费视频
|
久久久久免费精品国产
|
精品久久久久久久久亚洲偷窥女厕
|
亚洲熟妇av一区
|
亚洲四虎永久在线播放
|
亚洲欧洲国产精品香蕉网
|
亚洲国产精品碰碰
|
免费国产在线观看
|