ActionScript 3.0 :: Drawing Application - External Class For Img Drag
Jun 14, 2011
I have this: [URL]. And would like to be able to stop drawing when dragging the added picture. The thing is, the drawing App is inside the fla. The Drag and Drop is an external class. What I think myself is I probably have to change the entire drawing code to an external class also, but then I'd still not know how to have those 2 classes communicate with each other.
Fla file:
PHP Code:
Draw API Marius Posthumus
import com.adobe.images.JPGEncoder;
Importsimport flash.display.Shape;
import flash.events.MouseEvent;
import flash.display.BitmapData;
[Code] .....
View 10 Replies
Similar Posts:
Oct 29, 2009
I have a comic book style game where you have to complete the story by dragging the right frame to the right place, but when I drag the frames pieces of the frames left behind and sucked on the screen. The frames are loaded swf files.
View 2 Replies
Nov 29, 2010
I am very new to AS3 and I am running into some issues creating a simple class that will allow you to drag and drop and object but then also scale when it is over a hit area. Here is my current code:
[Code]....
View 5 Replies
Apr 10, 2010
i've created a simple drawing application with colors, a clear button, and a save function, but my problem is i want what people draw to become the head of a character in my animation.I would LOVE a transparent backround too to whatever they draw,
View 3 Replies
Mar 10, 2009
how can i do export the image that drawing in the application (swf file) ontime . i 'm design the flash application that you are drawing , switching the brush style and font and .. but i don't know how can i save the image that draw in .
View 1 Replies
Jul 28, 2009
I wonder which component to extend in Flex 3 in order to make a drawing stage.
View 1 Replies
Feb 6, 2012
There are several flashbased painting/sketching online apps that allow multiple users to paint simultaneously. Some examples: [URL]For a project, we want to implement something similar. The question is, whether we need to start from scratch or whether there are any libraries available that could facilitate development (especially the networking part).
View 1 Replies
Feb 22, 2009
I'm trying to make a drawing program in Flash 9 (AS3 ) which will allow the user to make their own caravan decking design. I'm having trouble getting it finished as I have only been working in Flash for about a week. Please see attached files.I think I'm on the right track, but heres 4 things I need to complete the work:
Add Object Focus: When the user moves the mouse over one of the decks I would like the decks border colour to change (0xFF0000) and to activate focus.
Add Object/Clone Copy: When the user starts to drag the deck and the deck has focus I would like the program to instantly clone that object to simulate the decks having an unlimited number.
Add Rotation: When the deck has focus I would like the registration point to be reset to the middle of the sprite. Currently I only have it working on one.
Add Collision Detection: I will have a basic drawing of a caravan in the middle of the screen and I wish for the deck to never go over the border of the caravan. When the user let's go of the mouse I would then like the collision detection to include both the attached deck and the caravan.
View 0 Replies
May 16, 2010
I found this code on a forum which allows for an undo and erase button for a drawing application (and is perfect for what I need) but it's in AS2 and I can barely make sense of it:
Code:
_root.attachMovie("canvas", "canvas", 0);
d = 0;
[code].....
View 5 Replies
Jun 24, 2009
How to make multi user drawing application in as 3.0
View 8 Replies
Feb 19, 2010
I have a drawing application likewhere the user can select a brush size to draw.I need a way to determine that all the surface has been drawn.
View 2 Replies
Apr 8, 2011
So i have a project i am working on that is a drawing application. I am trying to put a brush size slider into the application but i have no idea where to even begin.I am very new to flash/actionscript so i dont know where to start.
View 9 Replies
May 30, 2009
i make good Online Mulit Drawing example for you herethere is a Socket Server that i made, and swf to.
View 2 Replies
Jul 15, 2011
I want to read xml data to a mxml application from a xml file on my filesystem. The example I found was for AIR,link2, link3. But I want to target the Flash Player runtime. If I use the the tag, I can do it; however the xml compiles into my swf. How can I retain the xml file in my release build?
View 2 Replies
Jul 9, 2010
How do I create a simple live drawing board/whiteboard functionality using flash as3, and flash media server 3.5.
View 1 Replies
May 27, 2011
I am using a custom Flex skin to create an active blur/frosted glass effect on the background of floating Panels, TitleWindows, and other containers (similar to http:url....). There is a background image in the Application skin, and potentially any number of other components above and below the active blur component. Here's some relevant code within the skin:
public static const BLUR_FILTER :BlurFilter = new BlurFilter(16, 16, BitmapFilterQuality.HIGH);
private var _bitmapFill :BitmapFill = new BitmapFill;
private var _matrix :Matrix = new Matrix;[code]....
Unfortunately, the performance of this when the component is being resized, and especially when moved, is poor. There is noticeable drag delay and overall slowdown, and this is with only one popped-up TitleWindow in the test application. There is especially poor performance when components inside the TitleWindow are changed (button hover states, etc.)I've attempted to optimized a little bit by avoiding reinstantiation of the blur filter, bitmap fill, and matrix, but this has had little or no effect. I removed the blur at one point, just drawing the Application to a bitmap, and the performance is still poor, so it's clear that it's mostly the BitmapData.draw() call.
I've read about using scrollRect and cacheAsBitmap, but I'm not sure where to apply these properties (or other optimizations I'm not aware of) within the Application or its components.
View 2 Replies
Mar 7, 2011
I'm currently trying to create an application whit some drag and drop functionality but I'm having a hard time trying to figure how this can be done.What I have is basically a rectangular MovieClip which will be the main container where multiple smaller rectangular MovieClips are going to be dropped the thing is the that the same movieClip can be dropped multiple times and of course it needs to be at a different position and here is where I'm confused, I know how to create the drag and drop actions, what I don't know is how to check and see if the main container has movieClips to determine the next available space and place the next movieClip accordingly basically drop it at the bottom. The way I'm currently doing it only works if the same movieClip is drop only once if I drop the same movieClip twice it basically overlaps on top of the first one.
View 2 Replies
Sep 8, 2003
i'm now trying to create a drag and drop application. Once i dragged the object to the target area, what should i do to make it movable false after i dropped it.
View 14 Replies
Apr 8, 2010
I have a initApp.as which instantiates a class which needs to access the "currentState" property and the States array as well. However we cannot get this to work as we cannot see how we can access this information.
Within initApp.as currentState is accessed via "this.currentState". This does not work in the class which is instatiated within initApp.as. The following error is thrown:
"Access of undefined property currentState."
View 1 Replies
Dec 13, 2010
I have created one drag and drop application in flex and i am trying to load my application[swf] in flash.But i am getting error while start the drag.[code]
View 4 Replies
Mar 25, 2010
I have a Main.fla which loads Main.as as its document class. In Main.as I have a public function named "Main" which runs a trace. I also have another .as file called Preloader.as, which also has a public function in it, this one named "Preloader" with simple trace in it. I just cannot figure out how to use Preloader() from the Preloader class in Main() from the Main class. Main.as loads up fine when the SWF loads and traces.
View 10 Replies
Dec 7, 2009
I am creating an application that will allow users to model system information by allowing them to Drag and Drop objects from a Flex Tree into some sort of canvas/grid ie: like a whiteboard application eg: Visio/MS Powerpoint etc. The application requires the following functionality:
Drag and drop items from a Tree to some sort of canvas/grid Move items within the canvas/grid Delete items from the canvas/grid Resize items in the canvas/grid
Save the position of the items to a database Has good performance in terms of rendering components with images I am not sure which Flex component is best suited to the canvas/grid. I was thinking of using either:
Datagrid or (can't drag/drop to cells easily though) Grid or (can drop to cells via gridrow/griditems mxml tags) TileList or (problem with this is that it rearranges all items when you move 1 item) some other list? I think the grid would suite my purposes the best as it would enforce objects to be placed within a gridrow/griditem.
View 1 Replies
Oct 7, 2006
I need to develop a Build-Your-Own cabinet configuration application for a cabinet company. I need it to be a drag n drop application. there is a grid system involved, where you can fit 3 large cabs in a grid, or 6 small ones, and so fourth...so there is logic involved. Anyone ever build something similar? a drag n drop application with logic?
View 8 Replies
Dec 2, 2010
in the following SWF example: [URL] you can see small iphone application created with flash cs5, this application has blue rectangle, you can drag and drop this rectangle with your mouse cursor.. ok no problem in the code, but i want ask a question: when i run this application in iphone device, my finger will drag and drop the rectangle instead of mouse cursor ? or I need change the code? here is the code i used:
[Code]...
View 1 Replies
Oct 13, 2009
This is my first meeting with the Shapes; which don't seem cooperating, at all. Following is the Class code:
Code:
package
{
[code]......
View 2 Replies
May 12, 2011
I'm building a drawing class that is passed an image, and it will run an ENTER_FRAME drawing lines of varying thicknesses and gradients to look as if it is being hand painted. All works well and is doing just what I'd hoped. My problem is after a while, it starts to hammer the CPU. I can understand why it could be taxing, but I thought the drawing API was meant to be rapid? Is there a way I can optimize the process? I am only using 1 enterframe, and it seems to get progressively worse the more lines are laid down. Does the Flash Player not render them as Bitmap after they are drawn? I'm just trying to work out why the more lines are drawn the heavier the swf runs.
View 7 Replies
Oct 7, 2011
I drew a line (stepVoltage) in a fla using the graphics class. Once drawn, I want to move it to the right in an update function, but am having trouble. I tride just moving the line with statements like stepVoltage.x = newX; stepVoltage.y = newY; but this didnt work. Then I tried to delete the previous line and draw a new one with a clear () function (see below) but this blocked the next drawn line from showing up.
The code:
var stepVoltage:Shape = new Shape ();
stepVoltage.graphics.lineStyle(2,0x000000);
addChild (stepVoltage);
[Code]....
View 1 Replies
Nov 23, 2009
Now I set dragEnabled="true", dropEnabled="true" and dragMoveEnabled="true" to archive the ability to reorder my Items via Drag and Drop. But as soon as I start to Drag an Item the whole Application crashes with:
[Code]....
View 1 Replies
May 17, 2011
I'm using an external as script to create some simple drag and drop effect. In the FLA I have a face where you can drag a pair of eyes to a certain area of the face, the user can then drag a different colour pair of eyes which are meant to replace the first eyes. If I'm using the same class to do the same thing on all of the eyes (there will be numerous), how can I tell flash to remove any eyes on the face when new ones are dragged over.
I thought maybe in my if statement I would like like to say if there are any instances of 'this' then set back to their original spot as the new instance of this is dragged to the hit point.
[Code]...
View 0 Replies
Mar 24, 2006
I want to restrict the movement of my movieclip. For example, I only want it to move 100 pixels to the right and left.
Code:
class Drag extends MovieClip {
var ease;
var dx:Number;
[code].....
View 3 Replies