Dragging and Dropping in Actionscript 3.0

Ok this is a little tip for Dragging your clips on Actionscript 3.0, remember how we used a lot of tricks in Flash to drag a clip from other points that weren’t the anchor point , well in Actionscript 3.0 (herenow AS3) is quite simple to do that by using the new Point class.
Class Point.
Package flash.geom
Class public class Point
InheritancePoint Object
Language version: ActionScript 3.0
Player version: Flash Player 9
The Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.

So here’s a very short example made in AS3 in wish no matter where your grab the Sprite, it will be dragged from that specific Point.
Heres the example :

This movie requires Flash Player 10

Open in New Window

Here’s the code:

?View Code ACTIONSCRIPT3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
bear.addEventListener(MouseEvent.MOUSE_DOWN, startbearDrag);
stage.addEventListener(MouseEvent.MOUSE_UP, stopbearDrag);
bear.addEventListener(Event.ENTER_FRAME, dragbear);
 
var clickOffset:Point = null;
 
function startbearDrag(event:MouseEvent) {
	clickOffset = new Point(event.localX, event.localY);
}
 
function stopbearDrag(event:MouseEvent) {
	clickOffset = null;
}
 
function dragbear(event:Event) {
	if (clickOffset != null) {
		bear.x = mouseX - clickOffset.x;
		bear.y = mouseY - clickOffset.y;
	}
}

SHARE beta On Adobe Labs

SHARE beta Adobe

SHARE Detail

Hi everyone I just discovered this great app on the Adobe Labs although it’s up since 1 of October I didn’t pay much attention to it. Share it’s a wonderful app that lets You upload share and preview documents online, what do You need to use it simple, an Adobe id and documents to share, it works this way You log in to share and upload your files then you select with who you want to share it by adding e-mail adresses (nothing it’s attached to the receiver only a link to your shared files) then you can select whereas the file its for public viewing ( to everyone that knows the adress of the file ) or if it’s private (only viewable to the persons you added on the list). You can access it from any computer and embed the content in webpages.
And it’s all on Flash Player you don’t need anything but the Flash Player 9 to view it and use it.
So check it out, it’s a beta but it’s seems very promising.

SHARE Panel

Here’s what Adobe says about it:
Welcome to a preview of Adobe’s latest online offering codenamed “Share”, a free web-based service that allows you to easily share, publish and organize your documents.

With Share you can:

* Send documents without email attachments.
* Access your documents from anywhere.
* View all the documents you have shared or received in one place.
* Post a link to your document on a wiki or blog.
* Embed a Flash preview of your document on any website.
* Limit access to a document to a list of recipients.

And here’s the link: Adobe SHARE beta.

Adobe Labs Updates AIR( beta 2 ), Flex 3 ( beta 2 ) and prereleases AMP (Adobe Media Player )

Well good month start in Adobe labs, they have released an update for Adobe Air ( beta 2 ) Flex 3 ( beta 2 ) and a Prerelease of Adobe AMP (Adobe Media Player ).

Adobe AIR public beta 2

Adobe Air Beta3

Update: A new version of the Adobe AIR download was posted on 10/1/2007.

Adobe AIR is a cross-operating system runtime that allows web application developers to use their existing web development skills (HTML, Javascript, Adobe Flash, Adobe Flex, Ajax ) to build and deploy rich Internet applications to the desktop.

Download the AIR beta 2 update here

Flex 3 public beta 2

Flex 3 beta 2

This near feature complete release adds powerful new data wizard support for .NET, web service introspection and connection code generation, and much more. We’ve also added support for importing and exporting Flex projects so that you can now share projects easily. Complete support is also now available for CSS.

Download The Flex 3 beta 2 here

The Adobe Media Player Prerelease

AMP prerelease

The Adobe Media Player enables end users to enjoy their shows whenever and wherever they want, while enabling new ways for content businesses to create, deliver, and monetize high-quality content and advertising through a customizable cross-platform player that supports both downloaded and streamed media.

Download AMP Prerelease here

Flash Lite 3 Update for Flash CS3 Professional

A great update for Flash Lite Developers
Flash Lite 3

Author, test, and publish mobile content for the latest release of Flash Lite software, which can support video (FLV) and rendering of SWF files for Flash Player 8 when integrated within a mobile phone or embedded web browser. Authoring support for Flash Lite requires both an update to Device Central CS3 as well as an update to Flash CS3 Professional software.

Download the update for Flash CS3 here
Download the update for Device Central CS3 here