Flex:平滑来自Flickr的动态图像
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Flex:平滑来自Flickr的动态图像相关的知识,希望对你有一定的参考价值。
Lee Brimelow show's how to smooth an image that is loading from Flickr.
<?xml version="1.0" encoding="utf-8"?> <s:ItemRenderer xmlns:s="library://ns.adobe.com/flex/spark" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:d="http://ns.adobe.com/fxg/2008/dt" xmlns:mx="library://ns.adobe.com/flex/halo"> <fx:Script> <![CDATA[ import mx.events.FlexEvent; import flash.net.navigateToURL; protected function image1_clickHandler(event:MouseEvent):void { navigateToURL(new URLRequest("http://www.flickr.com/photos/"+this.data.owner+"/"+this.data.id)); } [Bindable] public var loaderContext:LoaderContext; private function imageInit():void { loaderContext = new LoaderContext(); loaderContext.checkPolicyFile = true; im.load("http://farm"+data.farm+".static.flickr.com/"+data.server+"/"+data.id+"_"+data.secret+"_s.jpg"); } ]]> </fx:Script> <s:states> <s:State name="normal"/> <s:State name="hovered"/> <s:State name="selected"/> </s:states> <mx:Image creationComplete="imageInit()" smoothBitmapContent="true" loaderContext="{loaderContext}" id="im" toolTip="{data.title}" click="image1_clickHandler(event)" buttonMode="true" width="50" height="50" d:userLabel="Layer 10 copy 4" x="0" y="0" maintainAspectRatio="false"/> <s:Rect d:userLabel="Item Highlight" width="50" height="50"> <s:stroke> <s:SolidColorStroke weight="2" color.normal="0x666666" color.selected="0xFFFFFF" color.hovered="0xFFFFFF"/> </s:stroke> </s:Rect> </s:ItemRenderer>
以上是关于Flex:平滑来自Flickr的动态图像的主要内容,如果未能解决你的问题,请参考以下文章
如何使用 python 从 flickr xml 图像数据中提取图像地理数据?