我有一个旧的flex builder 3项目,我导入到Flash Builder 4中,我希望这个项目在我的Web浏览器中运行它的Web应用程序.但是,应用程序会持续在Flash Player中运行.由于https://bugs.adobe.com/jira/browse/FP-209中记录了Flash播放器错误,因此无法解决问题.
如何让项目的应用程序在浏览器而不是播放器中运行?
场景:
Flex应用程序利用@ font-face声明嵌入字体.(嵌入字体需要能够旋转文本.)
该应用程序最初是作为英语应用程序开发的,但在本地化期间,有必要找到能够显示亚洲字符的unicode字体.应用程序的原始实现使用四种字体来满足字符强调的各种排列.Bold,Bold Italic,Italic和Normal都是通过Arial系列中相应的Arial字体提供的.
问题:
当尝试将字体编译成可用于粗体,斜体和粗体斜体的字体时(是的,它不是理想的,这只是一个测试,看它是否可以完成):
@font-face { src:url("/fonts/ArialUnicode.ttf");
fontFamily: myFamily;
fontWeight: normal;
fontStyle: normal;
advancedAntiAliasing: true; }
@font-face { src:url("/fonts/ArialUnicode.ttf");
fontFamily: myFamily;
fontWeight: bold;
fontStyle: normal;
advancedAntiAliasing: true; }
etc.
Run Code Online (Sandbox Code Playgroud)
问题是,在编译应用程序时,Flex会变得暴躁,并提供以下错误消息:
[ERROR] /dirpath/Style.css:[49,-1] exception during transcoding: Font for alias 'myFont' with italic style was not found at: file:/dirpath/fonts/ArialUnicode.ttf
因此,与一些调查已经确定,由于统一既不支持也不斜体大胆,当Flex编译器试图嵌入字体,它会不高兴,因为它无法找到那个将满足CSS要求指定位置的字体.
现在,当font-face声明恢复到最简单的形式时:
@font-face { src:url("/fonts/ArialUnicode.ttf");
fontFamily: myFamily;
fontWeight: normal;
fontStyle: normal;
advancedAntiAliasing: true; }
Run Code Online (Sandbox Code Playgroud)
一切编译好,应用程序显示所有正常的重量,正常风格的亚洲字符罚款.但是,当在样式表中显示要以粗体或斜体显示的内容时,会出现一个框,表示没有嵌入字体,也没有任何可以在这些样式中呈现该字符的系统字体.
现在这里变得奇怪了.
如果在系统上安装完全相同的Unicode字体,它将开始以粗体和斜体显示亚洲字符.这没有任何意义,因为当Flex试图嵌入该字体以满足上述css样式时,Bold和Italic字符不在字体中.然而很明显,这个字体被用来显示粗体和斜体字符,就像它们在作为系统字体安装之前只是盒子一样.这是某种Flex伏都教吗?如果是这样,我可以通过某种方式以编程方式调用所述voodoo,因为我不能依赖用户必须出去并在他们的系统上安装unicode字体.
编辑:以下是一些可能澄清问题的进一步信息.
我的问题是不是真的,我们怎么办多种字体的面孔和罗马字符的权重,这是"怎样的Flex应用粗体和斜体的系统字体.更所以,当它说,试图嵌入时字体不支持那些那个字体."
使问题可重现的步骤如下:
我正在尝试创建一个监听变量(int或Number)的脚本,然后执行某些函数,无论变量是高还是低.因此,例如,如果数字越来越高,它将运行一个函数.如果它变低,它会运行另一个.
这可能在AS3中吗?有任何想法吗?
我试图从一些CURL代码转换为FLEX/ActionScript.由于我对CURL 100%无知,而且对于Flex有50%的无知,而对HTTP一般有90%的无知......我遇到了一些重大困难.
以下CURL代码来自http://code.google.com/p/ga-api-http-samples/source/browse/trunk/src/v2/accountFeed.sh
我完全有理由相信它运作正常.
USER_EMAIL="myaccount@gmail.com" #Insert your Google Account email here
USER_PASS="secretpass" #Insert your password here
googleAuth="$(curl https://www.google.com/accounts/ClientLogin -s \
-d Email=$USER_EMAIL \
-d Passwd=$USER_PASS \
-d accountType=GOOGLE \
-d source=curl-accountFeed-v2 \
-d service=analytics \
| awk /Auth=.*/)"
feedUri="https://www.google.com/analytics/feeds/accounts/default\
?prettyprint=true"
curl $feedUri --silent \
--header "Authorization: GoogleLogin $googleAuth" \
--header "GData-Version: 2"
Run Code Online (Sandbox Code Playgroud)
以下是我将上述CURL转换为AS3的失败尝试
var request:URLRequest=new URLRequest("https://www.google.com/analytics/feeds/accounts/default");
request.method=URLRequestMethod.POST;
var GoogleAuth:String="$(curl https://www.google.com/accounts/ClientLogin -s " +
"-d Email=myaccount@gmail.com " +
"-d Passwd=secretpass " +
"-d accountType=GOOGLE " +
"-d source=curl-accountFeed-v2" +
"-d …Run Code Online (Sandbox Code Playgroud) 如何减少linkButtons和每个linkButton内部的空间?
我已经将padding设置为0但它已经是0.我只能更改LinkButtons的高度,但我不能用宽度来做,因为文本是动态的.
<mx:Repeater id="bookmarksRepeater" dataProvider="{dataManager.bookmarksList}">
<mx:HBox>
<mx:VBox>
<mx:HBox>
<mx:Text >
<mx:text> {String(bookmarksRepeater.currentItem.name)}</mx:text>
</mx:Text>
<mx:LinkButton height="16" rollOverColor="#FFA500" label="Visit" />
<mx:LinkButton height="16" rollOverColor="#FFA500" label="Add" />
<mx:LinkButton height="16" rollOverColor="#FFA500" label="Save" />
</mx:HBox>
<mx:HBox>
<mx:Repeater id="tagsRepeater" dataProvider="{bookmarksRepeater.currentItem.tags}">
<mx:LinkButton height="14" color="0x0033CC" rollOverColor="#FFA500" fontSize="8" label="{String(tagsRepeater.currentItem.name)}"/>
</mx:Repeater>
</mx:HBox>
</mx:VBox>
<mx:Text height="16" color="0x0033CC" fontWeight="bold" >
<mx:text> {String(bookmarksRepeater.currentItem.popularity)} </mx:text>
</mx:Text>
</mx:HBox>
</mx:Repeater>
Run Code Online (Sandbox Code Playgroud) 我似乎无法重新创建我的Main.html,这是在flashbuilder4中构建所必需的,我想我可以在时间成本的情况下手动完成但是真是太棒了!我敢肯定,这可能是可能的.
清理重建此文件夹的大部分,然后运行项目获取它无法找到的错误Main.html grrrrrrrr
我之前使用过这个graphics包,但不确定是否可以这样做.我正在尝试用flex编程创建狗耳效果.可以吗?如果不可能,我还有哪些其他选项或库.
我正在尝试使用DateField控件.我可以使用selectedDate字段设置当前值.
Adobe说:"在控件中选择当前选择的日期取消选择它,将selectedDate属性设置为null",因此当用户选择其他日期时,selectedDate = null.如何获取当前选定的值?我只在调试器中看到DateField的text属性包含带有选定日期的字符串?我需要解析它吗?
提前10倍yevgeny
为什么Flex/ActionScript目前不支持线程?
如何使用actionscript比较2个日期的值我在我的程序中执行了这个代码..
var time1:Date = new Date(Number(fromDate.substr(0,4)),Number(fromDate.substring(5,7))-1, Number(fromDate.substring(8,10)));
var time2:Date = new Date(Number(toDate.substr(0,4)),Number(toDate.substring(5,7))-1, Number(toDate.substring(8,10)));
if(time1.getTime() > time2.getTime())
{
Alert.show(time1 + ” is after ” + time2);
}
Run Code Online (Sandbox Code Playgroud)
我得到错误:错误:令牌流的意外结束