﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-学无止境-随笔分类-Flex</title><link>http://www.blogjava.net/wawlian/category/46069.html</link><description /><language>zh-cn</language><lastBuildDate>Sun, 24 Apr 2011 09:42:05 GMT</lastBuildDate><pubDate>Sun, 24 Apr 2011 09:42:05 GMT</pubDate><ttl>60</ttl><item><title>Flex4 滚动条沉底[转]</title><link>http://www.blogjava.net/wawlian/archive/2011/04/24/348924.html</link><dc:creator>wawlian</dc:creator><author>wawlian</author><pubDate>Sun, 24 Apr 2011 09:16:00 GMT</pubDate><guid>http://www.blogjava.net/wawlian/archive/2011/04/24/348924.html</guid><wfw:comment>http://www.blogjava.net/wawlian/comments/348924.html</wfw:comment><comments>http://www.blogjava.net/wawlian/archive/2011/04/24/348924.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/wawlian/comments/commentRss/348924.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/wawlian/services/trackbacks/348924.html</trackback:ping><description><![CDATA[<p id="post_content_8997506385">在flex4中，滚动条是属于group的，flex4中没有了直接的垂直和水平滚动条，取而代之的是用一个group里面包含了一个scroller，这个scroller有2个属性，垂直和水平滚动条。<br />
<br />
如果TextArea要隐藏或者显示滚动条，用style<br />
horizontalScrollPolicy和verticalScrollPolicy，而不是3的mx里面的属性。<br />
<br />
而将滚动条移至底端，不能直接设置verticalScrollPosition，而用以下方法<br />
&lt;s:TextArea x="30" y="10" width="175" id="txt"/&gt;<br />
&lt;fx:Script&gt;<br />
&nbsp;&nbsp;&nbsp; txt.text = "xxxx...";<br />
&nbsp;&nbsp;&nbsp; txt.validateNow();<br />
&nbsp;&nbsp;&nbsp; txt.scroller.verticalScrollBar.value = txt.scroller.verticalScrollBar.maximum;<br />
&lt;/fx:Script&gt;<br />
<br />
<br />
validateNow方法验证并更新此对象的属性和布局，如果需要的话重绘对象。<br />
这个方法比较重要，因为在flex里面不会像flash设置了text立即就会显示文本的高度和宽度。非要重绘，或者，监听enterFrame或者其它事件，等控件外观更新完成后，才能真正获取到宽度，高度，verticalScrollBar.maximum，等文字相关属性。</p>
</cc><br />
<img src ="http://www.blogjava.net/wawlian/aggbug/348924.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/wawlian/" target="_blank">wawlian</a> 2011-04-24 17:16 <a href="http://www.blogjava.net/wawlian/archive/2011/04/24/348924.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Flex写cookie(转帖)</title><link>http://www.blogjava.net/wawlian/archive/2011/04/20/348637.html</link><dc:creator>wawlian</dc:creator><author>wawlian</author><pubDate>Wed, 20 Apr 2011 08:04:00 GMT</pubDate><guid>http://www.blogjava.net/wawlian/archive/2011/04/20/348637.html</guid><wfw:comment>http://www.blogjava.net/wawlian/comments/348637.html</wfw:comment><comments>http://www.blogjava.net/wawlian/archive/2011/04/20/348637.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/wawlian/comments/commentRss/348637.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/wawlian/services/trackbacks/348637.html</trackback:ping><description><![CDATA[<a href="http://lqw.iteye.com/blog/538238">http://lqw.iteye.com/blog/538238</a>
<img src ="http://www.blogjava.net/wawlian/aggbug/348637.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/wawlian/" target="_blank">wawlian</a> 2011-04-20 16:04 <a href="http://www.blogjava.net/wawlian/archive/2011/04/20/348637.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Flex获取客户端IP（转帖）</title><link>http://www.blogjava.net/wawlian/archive/2011/04/20/348635.html</link><dc:creator>wawlian</dc:creator><author>wawlian</author><pubDate>Wed, 20 Apr 2011 07:57:00 GMT</pubDate><guid>http://www.blogjava.net/wawlian/archive/2011/04/20/348635.html</guid><wfw:comment>http://www.blogjava.net/wawlian/comments/348635.html</wfw:comment><comments>http://www.blogjava.net/wawlian/archive/2011/04/20/348635.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/wawlian/comments/commentRss/348635.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/wawlian/services/trackbacks/348635.html</trackback:ping><description><![CDATA[<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; color: #323e32; font-family: simsun; font-size: 14px; ">我自己在学习Flex的时候碰到了这个问题，上网找了一些觉得都很麻烦。因为我是使用RemoteObject和Java</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; color: #323e32; font-family: simsun; font-size: 14px; ">结合，后台还集成了spring。在jsp中要获取客户端IP地址最简单的办法就是拿到request对象，但是我是获取的spring中的bean，通过spring好像不行，但是我在查看springfactroy代码的时候有个非常发现：</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; color: #323e32; font-family: simsun; font-size: 14px; ">就是flex.messaging.FlexContext这个类有个静态方法：flex.messaging.FlexContext.getHttpRequest()</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; color: #323e32; font-family: simsun; font-size: 14px; ">取到HttpRequest后面在拿getRemoteAddr就不用多说了：</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; color: #323e32; font-family: simsun; font-size: 14px; ">&nbsp;<wbr>&nbsp;<wbr>&nbsp;flex.messaging.FlexContext.getHttpRequest().getRemoteAddr()就这么简单.呵呵。</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 21px; color: #323e32; font-family: simsun; font-size: 14px; ">我的环境是Java+spring+blazeds+flex+RemoteObject实现。</p>
<img src ="http://www.blogjava.net/wawlian/aggbug/348635.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/wawlian/" target="_blank">wawlian</a> 2011-04-20 15:57 <a href="http://www.blogjava.net/wawlian/archive/2011/04/20/348635.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>