flex3 ObjectHandlers2.0 use

2010-06-30  来源:本站原创  分类:Flash  人气:218 

I introduced the article in front of objectHandlers1.0 usage, read today, under 2.0, I found quite a big change, look at the use of 2.0 bar.

// The default initialization  objectHandlers
objectHandles=new ObjectHandles(this);
// And then register the need to control components
objectHandles.registerComponent(img, img);

The above is the default registration form, complete these two sentences, you can see the effect of

flex3 ObjectHandlers2.0 use

handles.push(new HandleDescription(HandleRoles.ROTATE, new Point(100, 50), new Point(20, 0)));
objectHandles = new ObjectHandles( this , null, new ClassFactory(CircleHandle));
objectHandles.registerComponent(img1, img1, handles);

These are created by the factory objectHandlers, the drag effect of ♢ point, into the green o, registered components can be rotated through the handler, the default is to rotate, any scale, if, as above, only HandleRoles.ROTATE, the result is that the only In (100,50), (20,0), the two point rotation.
flex3 ObjectHandlers2.0 use

flex3 ObjectHandlers2.0 use

flex3 ObjectHandlers2.0 use

var decoratorManager:DecoratorManager = new DecoratorManager( objectHandles, drawingLayer );
                                decoratorManager.addDecorator( new AlignmentDecorator() );

Above code is to create a horizontal line and the adsorption effect automatically discounted, as shown above. AlignmentDecorator to its decorative device, there are several other decorative device, WebDecorator, OutlineDecorator, you can try. . .

Image rotation using <image> components, the following text box using <textArea>, I found that when rotated, the text box characters will disappear, to see the effect of two pictures above, I know, I have not find out how the story. . . .

Also objectHandlers2.0 support flex4. . . Will upload later flex4 use objectHandlers2.0 example. .

Attached the code. .

相关文章
  • flex3 ObjectHandlers2.0 use 2010-06-30

    I introduced the article in front of objectHandlers1.0 usage, read today, under 2.0, I found quite a big change, look at the use of 2.0 bar. // The default initialization objectHandlers objectHandles=new ObjectHandles(this); // And then register the

  • First test flex-MyEclipse7.5 and flex3.0.2 environmental integration 2010-08-20

    I often see the recent subway flex courses, interests matter to intend to find out! Get a good long time, finally came up with a HelloWorld.. Actually get started is not difficult, but the online information confused some, and their counterparts is n

  • flex3.0 new features (2) --- AIR application upgrades, Flex 3.0 using Ajax technology 2009-07-13

    23.3 upgrade AIR applications AIR desktop application can be derived for the air file. Double-click the file will be able to start the installation application. If the system has been installed an earlier version of AIR applications, air double-click

  • Flex3.0 new features 2 ---- Flex-Ajax Bridge 2009-07-13

    23.5 the use of Flex-Ajax Bridge Technology Control Flex application The previous section describes how Flex technology called Ajax. In contrast, the use of Ajax technology can also control the Flex application. JavaScript procedure Flex-Ajax Bridge

  • The application of CSS completely Xiangjie FLEX3 Guide! 2009-01-29

    FLEX3 Manual application of CSS completely Xiangjie ! Edited under the FLEX CSS Help, I basically have the gates of the edge collapse . In those days a lot of good things under AIRIA , Today at last the time, also made a relatively good thing for eve

  • MyEclipse 7.5, Flex Builder 3.0, IDE Integration 2009-09-14

    1. Download MyEclipse Official Original Address: Official original or: http://downloads.myeclipseide.com/downloads/products/eworkbench/7.0/myeclipse-7.5.0-win32.exe Or: Electric donkey Download http://www.verycd.com/topics/2753680/ License attached:

  • FLEX3 completely Xiangjie manual application of CSS! 2010-03-10

    FLEX3 Manual application of CSS completely Xiangjie ! Edited under the FLEX CSS Help, I basically have the gates of the edge collapse . In those days a lot of good things under AIRIA , Today at last the time, also made a relatively good thing for eve

  • FLEX3 application of CSS completely Xiangjie Manual (change) 2010-03-26

    FLEX3 completely Xiangjie manual application of CSS! [Originally posted] http://bbs.airia.cn/UIdesign/thread-2652-1-1.aspx Edit the CSS under the FLEX note, I basically have the gates of the edge of collapse. In the next few days in AIRIA many good t

  • Flex4.0 SDK, AS3 project, selective embedded fonts 2010-04-27

    1. Embedded fonts [Embed(source="c:/windows/fonts/FREESCPT.TTF", fontName="Freestyle", unicodeRange="U+0020-U+002F,U+0030-U+0039,U+003A-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E")] public static var frees

  • flex3 + blazeds + spring + hibernate integration Summary 2010-05-06

    Recently popular flex, so it has borrowed the book two days saw two days, found that as a non-page designers, flex, or good, flex builder useful, drag on Interface has a very COOL, and flex the basic things in general difficult to learn a programming

  • Flex in the Vector in Flex3 in there will be a 2010-08-17

    Today, suddenly found a thing, is accidentally discovered in time to see Flex 4 Cookbook Vector seen this thing and then check to see three have not, because the previous 3.x version of the time with no contact with this thing really http://www.adobe

  • Flex4 changes relative to Flex3 2010-09-10

    flex4 beta released, since it is a major reform since flex3. flex4 beta provides a new component and skin structure. As a flex3 developer, when you use flex4 beta build your flex3 application you should not encounter too much challenge, because flex4

  • FLEX3 and get the flashvars FLEX4 2010-11-20

    Swf file to load side of the page: <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="940" height="600&q

  • FLEX3 and FLEX4 get flashvars 2010-11-29

    Swf file to load side of the page: Html code <Object classid = "clsid: D27CDB6E-AE6D-11cf-96B8-444553540000" codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab # version = 9,0,28, 0 "width =" 940 &q

  • Flex3 + Red5 2 voice and video chat program 2010-12-06

    Flex3 part <? Xml version = "1.0" encoding = "utf-8"?> <MX: WindowedApplication xmlns: MX = " http://www.adobe.com/2006/mxml "layout =" Absolute "> <mx:Script> <! [CDATA [ import mx.events.Close

  • About flex4.0 recovery (forced recovery) 2011-04-26

    adobe really unsatisfactory recovery mechanisms of memory. especially when a large amount of data memory recovery issues more prominent. Man who previously had explored ways to flex with the exception of the mandatory garbage collection. However, aft

  • Flex3 DataGrid拖拽到ClumnChart动态显示图表实现代码 2013-11-20

    Flex3 DataGrid拖拽到ClumnChart动态显示图表(支持多行同时拖拽,重复数据不重得添加,添加了图表右键菜单)等等,感兴趣的朋友可以了解下啊,或许对你有所帮助 支持多行同时拖拽,重复数据不重得添加,添加了图表右键菜单. <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" l

  • flex3 load flashpaper使用LocalConnection和flash通讯 2009-06-27

    国外有高手已经实现了IE浏览器内加载flashpaper,好像是这篇吧: http://www.darronschall.com/weblog/2006/11/how-to-load-flashpaper-documents-in-flex-2.cfm 这里将在他的基础上改成利用LocalConnection来通讯,以便更好的处理来回的操作. flex load flashpaper也离不开flash,这个例子其实就是用flash做一个空壳,比如命名FPload.swf这个壳就是用来加载flas

  • 新功能.新工具:Granite Data Service 1.1.0发布 2012-03-09

    Granite Data Services (GDS) 1.1.0 GA版本周发布.如果你不熟悉GDS,那么以下是来自Granite Data Services项目的介绍: Granite Data Services (GDS)是一个免费的.开源(基于LGPL协议)的数据服务,它可以用于替代针对J2EE应用服务器的Adobe? LiveCycle? (Flex? 2+)数据服务.本项目的主要目标是为Flex 2+/EJB3/Seam/Spring/Guice/Pojo的应用开发提供一个具备完整A

  • FLEX3中应用CSS完全详解手册! 2012-03-17

    编辑完这个FLEX下的CSS说明后,我基本已经兵临崩溃边缘了.在些天在AIRIA下了不少好东西,今天终于有空,也发一个比较不错的东西给大家,相信都比较需要这个FLEX下的CSS使用方法的详细说明(好像我这份还不够详细,望大家补充). AIRIA真的是一个不错的网站,很高兴在这里认识大家. 在FLEX中使用样式方法 一.使用本地样式定义 使用<mx:Style>标签在MXML文件中创建本地的样式定义.这个标签包含了符合CSS2.0语法的样式表定 义.这些定义会应用到当前文档以及当前文档的子文档.