我有Flex模块的问题.我想通过this.loaderInfo.url访问url变量,我在模块的createionComplete处理程序中调用一个函数,有时它可以工作,有时它不会.(无法访问... null).有什么建议?
在createComplete模块的处理程序中调用此函数.虽然它会抛出错误窗口,但是带有url的警报显示并包含模块的url.
private function checkModuleUrl():void
{
var url:String = this.loaderInfo.url;
Alert.show(url);
}
Run Code Online (Sandbox Code Playgroud) 另外,如果你想创建一个完整的 Flex 4皮肤,你从哪里开始?是否有一个列表,列出了为某个地方创建图形所需的所有"部分"(组件部分),或者一些完整的示例皮肤用作模板?在Flash Builder Design View中正确渲染外观吗?(包括嵌入字体)
是否有一种常见的方法来禁用flex 4中的spark tabbar组件的选项卡?使用mx tabnavigator组件,您只需禁用与选项卡对应的内容,然后也禁用选项卡.但使用spark tab bar组件执行此操作仅禁用内容而不禁用选项卡.
这是我的简单例子:
<mx:TabNavigator x="122" y="155" width="200" height="200">
<s:NavigatorContent label="Tab 1" width="100%" height="100%">
<s:Label text="Label1"/>
</s:NavigatorContent>
<s:NavigatorContent label="Tab 2" width="100%" height="100%" enabled="false">
<s:Label text="Label2"/>
</s:NavigatorContent>
<s:NavigatorContent label="Tab 3" width="100%" height="100%">
</s:NavigatorContent>
</mx:TabNavigator>
<s:TabBar x="368.7" y="100.35" dataProvider="{viewstack1}" />
<mx:ViewStack x="364" y="133" id="viewstack1" width="200" height="200">
<s:NavigatorContent label="Tab 1" width="100%" height="100%">
<s:Label text="Label1"/>
</s:NavigatorContent>
<s:NavigatorContent label="Tab 2" width="100%" height="100%" enabled="false">
<s:Label text="Label2"/>
</s:NavigatorContent>
<s:NavigatorContent label="Tab 3" width="100%" height="100%">
<s:Label text="Label3" x="1" y="0"/>
</s:NavigatorContent>
</mx:ViewStack>
Run Code Online (Sandbox Code Playgroud)
很多,弗洛里安
我需要的动作脚本
Loading configuration file /opt/flex/frameworks/flex-config.xml
t3.mxml(10): Error: unsupported sampling rate (24000Hz)
[Embed(source="music.mp3")]
t3.mxml(10): Error: Unable to transcode music.mp3.
[Embed(source="music.mp3")]
Run Code Online (Sandbox Code Playgroud)
代码是
<?xml version="1.0"?>
<!-- embed/EmbedSound.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import flash.media.*;
[Embed(source="sample.mp3")]
[Bindable]
public var sndCls:Class;
public var snd:Sound = new sndCls() as Sound;
public var sndChannel:SoundChannel;
public function playSound():void {
sndChannel=snd.play();
}
public function stopSound():void {
sndChannel.stop();
}
]]>
</mx:Script>
<mx:HBox>
<mx:Button label="play" click="playSound();"/>
<mx:Button label="stop" click="stopSound();"/>
</mx:HBox>
</mx:Application>
Run Code Online (Sandbox Code Playgroud) 在尝试从Flex连接到将要侦听端口的Java Server时,我应该在什么情况下使用Socket类或XMLSocket?
嗨,我正在尝试获取当前时间,包括动作脚本3中的纳秒,以便在flex 4.5中使用.谁可以帮助我?
我最近听说过Adobe Flex.我不确定这种编程语言是什么.如何在Web开发中使用它?例如,谷歌的镀金味道使用HTML5,CSS3和Adobe Flex.原谅我的无知,我昨天才听说过这种语言.
简单地使用字符串的最佳方法是什么
var myString:String = "Thi$ i$ a T#%%Ible Exam73@";
Run Code Online (Sandbox Code Playgroud)
和做 myString = "thiiatibleeam";
或者另一个例子
var myString:String = "Totally Awesome String";
Run Code Online (Sandbox Code Playgroud)
和做 myString = "totallyawesomestring";
在动作3中谢谢!
我正在使用Flash Builder构建一个桌面应用程序,我需要它来运行.exe程序.我下载并安装了最新的AIR SDK,将它放在我的Flash Builder sdks文件夹中并让我的项目使用它.现在我没有任何编译器错误,但是:
if(NativeProcess.isSupported)
{
var file:File = new File("C:\Torres.exe");
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartupInfo.executable = file;
var process:NativeProcess = new NativeProcess();
process.start(nativeProcessStartupInfo);
}
Run Code Online (Sandbox Code Playgroud)
我检查了它,它永远不会进入if块.为什么不支持nativeprocess?有任何想法吗?