创建剪切复制粘贴在AS3 [英] Create cut copy paste in as3
问题描述
因为我告诉你我的工作涂鸦漆API用于印刷工具,在这里用户可以绘制编辑和更新矢量图形之前。按我的要求,我需要添加一个剪切复制和粘贴功能在我的工具,这样看起来更有活力,谁能帮我出超过走到这障碍。
as i told you before that i am working on graffiti paint api for the printing tool where user can draw edit and update the vector graphics. As per my requirement i need to add a cut copy and paste functionality in my tool so that look more dynamic can anyone help me out to over come this roadblock.
推荐答案
可能有很多方式。试试这个:
There could be many ways. Try this:
请一个数组来跟踪选定的项目。我假设你有一个选择方法。
Keep an array to keep track of the selected items. I assume you have a selection method.
请另一个阵列(比如剪辑板),让临时的项目去了。
Keep another array (say clip-board) where temporary items go.
-
复制:添加所选阵列的每个项目到剪辑板阵列
Copy : Add each item of selected array into clip-board Array.
剪切:添加所选阵列的每个项目到剪辑板阵列和放大器;从舞台上删除 removeChild之()
。
Cut : Add each item of selected array into clip-board Array & remove from stage removeChild()
.
剪切:加入的剪辑板阵列的每个项目上使用的addChild()
Cut : Add each item of clip-board Array onto the stage using addChild()
如果您发现井的剪贴板和放大器;选择的阵列可以是简单的One&安培;可能不需要复制方式。
If you notice well the clipboard & selected array could be simply one & may not need Copy method.
这篇关于创建剪切复制粘贴在AS3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!