将下面代码改为flex4对应的能运行的代码
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:fc="http://www.adobe.com/2006/fc"
xmlns:tx="com.ted.text.*"
xmlns:flexlib="http://code.google.com/p/flexlib/"
layout="absolute"
backgroundGradientAlphas="[0.78, 0.64]"
backgroundGradientColors="[#2C7A5C, #E2E176]"
creationComplete="init();">
<mx:Script source="as/ActionAlert.as"/>
<mx:Script source="as/message.as"/>
</mx:Script>
<mx:Style source="css/default_styles.css"/>
<mx:HTTPService id="srv"
url="./Message/checkMessage.do"
showBusyCursor="false"
method="POST"
result="getJsonData(event);"/>
<mx:ApplicationControlBar height="25"
bottom="0"
left="0"
cornerRadius="0"
right="0">
<mx:Canvas width="100%"
height="21">
<mx:Label id="labLoginfo"
text=""
fontSize="10"
bottom="2"
right="114"
width="347"/>
<mx:Label id="labValidatorInfo"
fontSize="10"
bottom="2"
left="173"
right="366"/>
<!--<mx:Label x="2"
y="1"
text="State:"
fontSize="10"
id="labStatus"/>-->
<!--<tx:Blink x="2"
y="-2"
interval="500"
height="24"
label="Message"
fontSize="10"
textAlign="left"
icon="@Embed(source='images/alrt16_1.gif')"
timerStatus="false"
click="{loadModel('views/message/message_list.swf','消息管理');this.stopSoundOK();};
this.labStatus.label='Message';
this.labStatus.timerStatus=false;"
id="labStatus"/>-->
</mx:Canvas>
<mx:LinkButton label="WHM v1.0"
click="version_infoCicke()"
height="16"/>
</mx:ApplicationControlBar>
<mx:HDividedBox id="hDividedBox"
bottom="27"
top="42"
left="0"
right="0"
dropShadowEnabled="false">
<mx:HBox id="lBox"
width="170"
height="100%">
<mx:Panel width="100%"
height="100%"
layout="absolute"
title="功能菜单"
titleIcon="@Embed(source='images/cog_edit.png')">
<mx:Accordion id="menu"
left="0"
right="0"
change="{change('')}"
top="0"
bottom="0">
</mx:Accordion>
</mx:Panel>
</mx:HBox>
<mx:HBox width="100%"
height="100%">
<mx:Panel width="100%"
height="100%"
layout="absolute"
title="工作区"
titleIcon="@Embed(source='images/ws.png')"
id="pnlWorkSpace">
<flexlib:SuperTabNavigator left="0"
top="0"
bottom="0"
right="0"
id="tabNavigator"
doubleClick="closeTab(event)"
doubleClickEnabled="true"
closePolicy="{SuperTab.CLOSE_ALWAYS}"
stopScrollingEvent="{MouseEvent.MOUSE_OUT}"
startScrollingEvent="{MouseEvent.MOUSE_OVER}"
styleName="TabNavPl">
</flexlib:SuperTabNavigator>
</mx:Panel>
</mx:HBox>
</mx:HDividedBox>
<mx:ApplicationControlBar height="34"
left="0"
right="0"
top="0"
cornerRadius="0"
id="apbTop">
<mx:Canvas width="100%"
height="23"
fontWeight="normal">
<mx:LinkButton label="布局"
right="72"
top="0"
icon="@Embed(source='images/layout.png')"
fontWeight="normal"
color="#FFFFFF"
id="btnLayout"
click="changeLayout()"/>
<mx:LinkButton label="帮助"
right="133"
top="-1"
click= "openChm()"
icon="@Embed(source='images/about.gif')"
fontWeight="normal"
color="#FFFFFF"/>
<mx:LinkButton label="退出"
right="2"
top="0"
icon="@Embed(source='images/16_close.gif')"
id="btnExit"
click="exit()"
fontWeight="normal"
color="#FFFFFF"/>
<mx:Label x="52"
y="3"
text="Win Shine Warehouse"
fontWeight="bold"
color="#FDFACB"
fontFamily="Arial"
fontStyle="italic"
fontSize="15"/>
<mx:PopUpMenuButton dataProvider="{dpTools}"
fontStyle="normal"
fontWeight="normal"
fillAlphas="[0.0, 0.0, 0.0, 0.0]"
top="0"
right="208"
icon="@Embed(source='images/toolbox.png')"
label=" "
borderColor="#7DA88B"
itemClick="openTool_Click(event)"
id="edtToolsBox"/>
</mx:Canvas>
</mx:ApplicationControlBar>
<mx:Image source="images/logo1.png"
x="2"
y="-1"/>
</mx:Application>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:fc="http://www.adobe.com/2006/fc"
xmlns:tx="com.ted.text.*"
xmlns:flexlib="http://code.google.com/p/flexlib/"
layout="absolute"
backgroundGradientAlphas="[0.78, 0.64]"
backgroundGradientColors="[#2C7A5C, #E2E176]"
creationComplete="init();">
<mx:Script source="as/ActionAlert.as"/>
<mx:Script source="as/message.as"/>
</mx:Script>
<mx:Style source="css/default_styles.css"/>
<mx:HTTPService id="srv"
url="./Message/checkMessage.do"
showBusyCursor="false"
method="POST"
result="getJsonData(event);"/>
<mx:ApplicationControlBar height="25"
bottom="0"
left="0"
cornerRadius="0"
right="0">
<mx:Canvas width="100%"
height="21">
<mx:Label id="labLoginfo"
text=""
fontSize="10"
bottom="2"
right="114"
width="347"/>
<mx:Label id="labValidatorInfo"
fontSize="10"
bottom="2"
left="173"
right="366"/>
<!--<mx:Label x="2"
y="1"
text="State:"
fontSize="10"
id="labStatus"/>-->
<!--<tx:Blink x="2"
y="-2"
interval="500"
height="24"
label="Message"
fontSize="10"
textAlign="left"
icon="@Embed(source='images/alrt16_1.gif')"
timerStatus="false"
click="{loadModel('views/message/message_list.swf','消息管理');this.stopSoundOK();};
this.labStatus.label='Message';
this.labStatus.timerStatus=false;"
id="labStatus"/>-->
</mx:Canvas>
<mx:LinkButton label="WHM v1.0"
click="version_infoCicke()"
height="16"/>
</mx:ApplicationControlBar>
<mx:HDividedBox id="hDividedBox"
bottom="27"
top="42"
left="0"
right="0"
dropShadowEnabled="false">
<mx:HBox id="lBox"
width="170"
height="100%">
<mx:Panel width="100%"
height="100%"
layout="absolute"
title="功能菜单"
titleIcon="@Embed(source='images/cog_edit.png')">
<mx:Accordion id="menu"
left="0"
right="0"
change="{change('')}"
top="0"
bottom="0">
</mx:Accordion>
</mx:Panel>
</mx:HBox>
<mx:HBox width="100%"
height="100%">
<mx:Panel width="100%"
height="100%"
layout="absolute"
title="工作区"
titleIcon="@Embed(source='images/ws.png')"
id="pnlWorkSpace">
<flexlib:SuperTabNavigator left="0"
top="0"
bottom="0"
right="0"
id="tabNavigator"
doubleClick="closeTab(event)"
doubleClickEnabled="true"
closePolicy="{SuperTab.CLOSE_ALWAYS}"
stopScrollingEvent="{MouseEvent.MOUSE_OUT}"
startScrollingEvent="{MouseEvent.MOUSE_OVER}"
styleName="TabNavPl">
</flexlib:SuperTabNavigator>
</mx:Panel>
</mx:HBox>
</mx:HDividedBox>
<mx:ApplicationControlBar height="34"
left="0"
right="0"
top="0"
cornerRadius="0"
id="apbTop">
<mx:Canvas width="100%"
height="23"
fontWeight="normal">
<mx:LinkButton label="布局"
right="72"
top="0"
icon="@Embed(source='images/layout.png')"
fontWeight="normal"
color="#FFFFFF"
id="btnLayout"
click="changeLayout()"/>
<mx:LinkButton label="帮助"
right="133"
top="-1"
click= "openChm()"
icon="@Embed(source='images/about.gif')"
fontWeight="normal"
color="#FFFFFF"/>
<mx:LinkButton label="退出"
right="2"
top="0"
icon="@Embed(source='images/16_close.gif')"
id="btnExit"
click="exit()"
fontWeight="normal"
color="#FFFFFF"/>
<mx:Label x="52"
y="3"
text="Win Shine Warehouse"
fontWeight="bold"
color="#FDFACB"
fontFamily="Arial"
fontStyle="italic"
fontSize="15"/>
<mx:PopUpMenuButton dataProvider="{dpTools}"
fontStyle="normal"
fontWeight="normal"
fillAlphas="[0.0, 0.0, 0.0, 0.0]"
top="0"
right="208"
icon="@Embed(source='images/toolbox.png')"
label=" "
borderColor="#7DA88B"
itemClick="openTool_Click(event)"
id="edtToolsBox"/>
</mx:Canvas>
</mx:ApplicationControlBar>
<mx:Image source="images/logo1.png"
x="2"
y="-1"/>
</mx:Application>
...全文
相关推荐
关于Flex4不生成mxml对应的html文件的解决方法
在使用Flex 4进行开发时,有时会遇到MXML文件在编译时未生成对应的SWF文件和HTML包裹文件的情况,这可能导致应用无法在浏览器中正常运行。针对这个问题,我们可以采取一些解决步骤来修复。
FLEX4_Flex4教程 - FLEX4从入门到精通,挺不错的值得一看
**Flex Builder/Flash Builder**:Adobe Flex Builder(后更名为Flash Builder)是开发Flex应用的主要IDE,提供代码提示、调试工具和项目管理等功能
Flex4实战源代码
Flex4实战 全部源代码"意味着这份资源可能包含了完整的Flex4项目实例,覆盖了各种功能和应用场景。源代码可以作为学习和参考,帮助开发者理解如何在实际项目中应用上述Flex4特性,解决实际问题。
Flex4权威指南源代码
flex4tfs.zip"压缩包中的"Volumes"可能是包含多个章节或部分的源码,每个部分对应书中一个主题或案例,供读者实际操作和学习。
Flex播放器代码实例及在线运行效果
**在线运行效果** 博文链接提供的示例可能包含一个演示如何在Flex环境中运行此代码的实际项目。通常,这些项目会包含MXML文件(定义界面)和AS文件(包含ActionScript代码)。


