如何使用Flex ProgressBar
<?xml version="1.0"?>
<!-- Simple example to demonstrate the ProgressBar control. -->
<!--
如何使用Flex ProgressBar
MyShareBook.cn 翻译
-->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
private var j:uint=10;
// Event handler function to set the value of the
// ProgressBar control.
private function runit():void
{
if(j<=100)
{
bar.setProgress(j,100);
bar.label= "CurrentProgress" + " " + j + "%";
j+=10;
}
if(j>100)
&nbs
相关文档:
servlet 端:
String userId = request.getParameter("userId");
System.out.println(userId);
response.setCharacterEncoding("UTF-8");
response.getWriter().println("hello world -- 我爱你。。。");
Flex 前台端
<fx:Script>
<![CDATA[
import flash.trace.Trace;
private var loader:UR ......
String userId = request.getParameter("userId");
System.out.println(userId);
response.setCharacterEncoding("UTF-8");
//response.getWriter().println("hello world -- 我爱你。。。");
String xml = "<user>" +
"<username>涛哥</username>" +
"</user>";
respon ......
应为设计要求, 我需要计算String的宽度,
搜索了下网上的文章, 看到有用measureText(string)的,
可是用了下发现, 这个function得到的string大小, 不会根据字体的大小, 粗黑的变化,
始终返回同一个值, 也许是我的用法不对, 最后我没有这个方法,
改用了另外一个方法:
private function getTextWidth():int
{
&nbs ......
转自:http://hi.baidu.com/wosinmaiken/blog/item/ee59f7a8f72604bdca130c24.html
/**ceil 向前(数轴向右)取整(返回值为Number)**/
trace(Math.ceil(10.4)); //11
trace(Math ......
拖动水平滚动条来改变图片大小。
<?xml version="1.0"?>
<!--
Simple example to demonstrate the HSlider control.
水平拖动条。
MyShareBook.cn 翻译   ......