`
wgcode
  • 浏览: 593663 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

AS3实例教程:拖拽实例源码收集.

阅读更多

1.Drag and Drop in ActionScript 3.0

Creating drag and drop functionality in Flash CS3 is quite different than in older versions if you’re using the new ActionScript 3.0. While still relatively straightforward, the code can be a little more intimidating to users who are less familiar with ActionScript programming. If you’re like me, you’re here to try to keep your knowledge up-to-date, so let’s learn how to create a simple ActionScript 3.0 drag and drop game step-by-step. Download the FLAand follow along with these steps.

9-2-2008 10-18-23 PM

Read more

2.as3-drag-and-drop-tilelist

Description

The dd_tile_list class extends the as3 TileList component to add drag and drop functionality. Dropping between components is supported. This class aims to be CellRenderer and Style agnostic.

9-2-2008 10-27-40 PM

Read more | Demo

3.swapDepth in AS3 for drag n drop

The swapDepth is not available on AS3, rather much more simplest way is available. :)

The below commented code can be achieved through the single line:event.target.parent.addChild(event.target);

Read more

4.Drag n’ Drop in AS3

I used to teach drag-n-drop funtionality using startDrag() and stopDrag() MovieClip methods. This is the easiest and fastest way but it tends to be choppy when the framerate is low. To solve this problem, you should employMOUSE_MOVE event as shown in this tutorial by Flash and Math.

Their tutorial is great and I’ll use their concept in this article. But I don’t want the draggable object to snap to its center when dragging. I’ll put in a lockcenter option and a swapDepths() alternative.

Notes:

  • We capture the broadcasted MOUSE_MOVE event from the stage and not from the draggable object. This ensures it will keep on dragging even if the mouse cursor moves outside the object. I guess Flash and Math already explained this.
  • 1 is subtracted from numChildren because children are placed in an Array thus child index is length-1.
  • updateAfterEvent() just makes things a lot smoother.

9-2-2008 10-31-31 PM

Read more

5.Drag-and-Drop in Flash CS3

The drag-and-drop interface is particularly valuable for educational purposes. Since much of the standard documentation on Flash CS 3 and Actionscript 3 is focused (at least initially) on animation and multimedia applications, we felt it would be useful to provide some tutorial pages on using the drag and drop interface written for those who have only a rudimentary understanding of Adobe Flash. If you have never written a line of code in Flash before, we recommend you start with one of the earlier Basic tutorials on this site such as Simple Line Segment: Creating Sprites and Shapes from Mouse Clicks.

9-2-2008 10-38-56 PM

Read more

6.AS3 example Drag and Drop

This example belongs to the AS3 Tutorials Novice and is part of our Actionscript 3 tutorial series.

You will learn how to implement simple drag and drop applications.

Read more

7.Flash drag and drop tutorial

Dragging and dropping objects is a popular brick in edutainment programs. This is part of Flash CS3 tutorials. It is probably not suitable for Flash designers without any programming experience.

Learning goals
Learn how to create simple drag and drop programs with Flash 9 (CS3) components
Learn a little bit of Action Script 3

600px-Flash-cs3-drag-and-drop-simple

Read more

8.Actionscript 3 Dragging Methods

This tutorial is all about dragging an object around the stage. You will learn different ways to implement dragging. I’ll also show you how to add some animation with the dragging. So start your Flash IDE and let’s get going!

9-2-2008 10-45-32 PM

Read more

9.ActionScript 3.0 : Buttons and Drag & Drop

In ActionScript 3.0, buttons and interactive movieclip stuff is scripted differently. To understand in depth about how ActionScript 3.0 works for interactivity see the diagram beside.

Diagram besides show, a pin with a tag attached to it. In Action Script 3.0, all events such as mouse clicks, mouse move, mouse over, keyboard inputs, even movieclip’s frame movement is controlled using event listeners. You can attached this event listeners to any movieClip, components, stage or sprites to add interactivity features to it. Just like how the pin works…just attach the pin to the object.

Each event listeners has a trigger function. Trigger function is a script which triggers because of the specific event for example, a mouse click. This means if you attached an event listener for mouse click on a button, the trigger function itself will be the script for the button. This is how you make button scripts in Action Script 3.0. Similar to our old on(Press) function.

event-trigger-thumb

Read more

分享到:
评论

相关推荐

    Flashas3实例教程:鼠标事件控制图形移动.pdf

    在本篇《Flash AS3实例教程:鼠标事件控制图形移动》中,我们将深入探讨如何使用ActionScript 3.0(AS3)通过鼠标事件来控制舞台上的图形移动,以及如何运用if-else语句实现播放与暂停功能。这对于初学者来说是一次...

    Three.js视频教程源码.rar

    本教程围绕"Three.js视频教程源码.rar"展开,深入探讨Three.js的核心概念、使用技巧及实战应用。 一、Three.js基础知识 1. WebGL基础:Three.js是WebGL的抽象层,理解WebGL的基本原理和语法是学习Three.js的前提。...

    java源码包实例源码JAVA开发源码50个合集.zip

    java源码包实例源码JAVA开发源码50个合集: Ajax框架 ZK.rar Java图书馆管理系统源程序.rar Java图片倒影效果实例源码.rar Java图片翻折,将图像压扁.rar Java坦克大战网络对战版源代码.rar Java声音播放程序源代码....

    易语言源码易语言拖拽式MP3源码.rar

    易语言源码易语言拖拽式MP3源码.rar 易语言源码易语言拖拽式MP3源码.rar 易语言源码易语言拖拽式MP3源码.rar 易语言源码易语言拖拽式MP3源码.rar 易语言源码易语言拖拽式MP3源码.rar 易语言源码易语言拖拽式MP3...

    C#实例_经典例子48.doc

    3. 实例 003:像开始菜单一样的漂亮菜单 此实例展示如何创建一个类似操作系统开始菜单的界面,提供美观且易用的用户体验。 4. 实例 004:任务栏托盘菜单 任务栏托盘菜单常用于隐藏应用程序的主要界面,只在系统托盘...

    加载图片,然后拖拽的flash AS3脚本和源码

    在本文中,我们将深入探讨如何在Flash ActionScript 3(AS3)中实现图片加载和拖拽功能。这个过程涉及到两个关键部分:图片的加载和交互事件的处理。首先,让我们看看`LoadPic.as`文件,它包含了加载图片的代码。 ...

    Android GridView拖拽实例源码.zip项目安卓应用源码下载

    Android GridView拖拽实例源码.zip项目安卓应用源码下载Android GridView拖拽实例源码.zip项目安卓应用源码下载 1.适合学生毕业设计研究参考 2.适合个人学习研究参考 3.适合公司开发项目技术参考

    小程序源码 辅助类库 GridView拖拽实例源码.rar

    标题"小程序源码 辅助类库 GridView拖拽实例源码.rar"表明这是一个关于小程序开发的资源,特别关注的是GridView组件的拖拽功能实现。GridView是Android平台上的一个视图控件,它允许以网格形式展示数据,通常用于...

    Android代码-GridView拖拽实例源码.zip

    在Android开发中,GridView是一种非常常见的布局控件,它允许我们以网格的形式展示..."GridView拖拽实例源码"提供了一个很好的起点,开发者可以在此基础上根据实际需求进行定制和优化,打造出更符合用户习惯的界面。

    HTML5 CSS3 :无插件拖拽上传图片实例源码

    在这个"HTML5 CSS3:无插件拖拽上传图片实例源码"中,我们重点关注的是利用HTML5的拖放(Drag and Drop)API以及File API来实现图片的无插件上传功能。这种技术使得用户可以通过直接在页面上拖动文件到指定区域,...

    易语言中学实例教程.RAR

    易语言中学实例教程是一套专门为中学生设计的学习资源,旨在帮助他们理解编程概念,掌握易语言的基本用法,并通过实例操作提升实践能力。 教程可能包含以下几个方面的知识点: 1. **易语言基础**:易语言的基础...

    html页面实现拖拽上传完整实例源码.zip

    在这个“html页面实现拖拽上传完整实例源码.zip”压缩包中,包含了一系列关键文件,用于构建一个功能完备的拖拽上传系统。 1. **index.php**:这是主入口文件,通常用于初始化页面结构并调用JavaScript库,如`...

    Android GridView拖拽实例源码.zip

    【Android GridView拖拽实例源码】是一个典型的Android开发教程,主要展示了如何在GridView中实现元素的拖放功能,这是移动应用开发中常见的交互设计。在Android应用中,GridView是一种常用的控件,它允许以网格布局...

    FLASHAS3.0官网教程实例(下).rar

    《FLASH AS3.0 官方教程实例详解(下)》 在深入探讨Adobe Flash ActionScript 3.0(AS3.0)的世界时,官方教程无疑是我们学习的重要资源。这个压缩包“FLASHAS3.0官网教程实例(下).rar”包含了多个经典实例,...

    易语言源码文件拖拽易语言源码.rar

    易语言源码文件拖拽易语言源码.rar 易语言源码文件拖拽易语言源码.rar 易语言源码文件拖拽易语言源码.rar 易语言源码文件拖拽易语言源码.rar 易语言源码文件拖拽易语言源码.rar 易语言源码文件拖拽易语言源码....

    Android GridView拖拽实例源码.rar

    这个"Android GridView拖拽实例源码"是一个实用的资源,它提供了实现GridView元素拖放功能的代码示例,这对于提升用户交互体验和优化界面操作具有重要意义。 首先,我们要理解GridView的基本工作原理。GridView继承...

    易语言源码易语言拖动柱状图源码.rar

    易语言源码易语言拖动柱状图源码.rar 易语言源码易语言拖动柱状图源码.rar 易语言源码易语言拖动柱状图源码.rar 易语言源码易语言拖动柱状图源码.rar 易语言源码易语言拖动柱状图源码.rar 易语言源码易语言拖动...

    [网盘]Altium Designer 16标准实例教程.2018_03_19

    根据提供的文件信息,本文将对《Altium Designer 16标准实例教程》中的核心知识点进行详细解析。Altium Designer是一款非常流行的电子设计自动化(EDA)软件,被广泛应用于电子电路板的设计与制造过程中。该软件提供...

Global site tag (gtag.js) - Google Analytics