Flash - Transform Tool Architecture?

Jan 27, 2012

I'm trying to get familiar with design patterns, modularity, unit testing and etc... (with ActionScript). I'm developing a simple "Free transform tool" right now, just as a exercise, but I don't like the solutions that I come up with so far, so I'll try to walk you trough my line of thoughts. When I come up with the idea I was thinking "What to write so I can test this great Unit testing framework FlexUnit", the first thing that I saw was guess what.. a free transform tool. :) When I was thinking about the architecture of the tool I run every scenario trough "How can I write unit tests for that thing?", so I come up with some kind of twisted MVC meta pattern:

A view that's holding all components (rotation area, drag area, resize buttons)A model (or something like that) that holds the necessary logic (setSize, setPositiom, rotateAroundCenter, etc..).And a controller that add listeners to the view components, update the mouse cursor when its over a component, get the mouse coordinates when is interacted with a component, do the calculations and call methods from the model that will update the view and the object that is benign transformed.

I was thinking: "Ok its flexible, i can switch M, V or C at any time, I achieved my main goal, because I can make lots of unit test for the model, where the important calculations are, so its great..".I just have started implementing it, but I think most of those thoughts are wrong. Yes I can change the view and add new skin but it's not flexible at all, if I want to add "skew" (or any other) functionality I should rewrite (or If I'm lucky just extend) M, V and C.Yes I can make bunch unit test for the model but controller's calculations will be hard to test.

So now I'm thinking for something like the Decorator pattern that will allow me to create whatever combination of controls i want to use and keep their logic separated, but I want to have the option to re-skin the controls themselves and to keep the logic separated so I can do the tests.I realize I want to create some kind of "ultimate transform tool", but I'm really trying to push my limits and learn something.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Loading In An External Image That Can Transform With The Senocular Transform Tool Class

Jun 26, 2009

I'm having trouble with loading in an external image that I can transform with the Senocular Transform Tool class. I have managed to load in the picture but the transform class doesn't seem want to grab it. Eventually I want to us the FileRef to upload the image but I just need to figure out how it works first. Here my code to load in the external image

[Code]...

The transform class can grab the other movieclips but it doesn't want to grab the new image loaded in from the code above.

View 1 Replies

ActionScript 3.0 :: Remove / Disable Tool For Objects Using Transform Tool

Jul 6, 2009

Working with senocular Transform Tool - How to remove/disable tool for objects Im new to AS3, and i have to use it for my current project. I have used the AS2 Transform tool extensively, but needless to say, the AS3 version works entirely differently.
The way i understand it, the tool applies to and every Sprite , movieclip on stage

[Code]...

View 2 Replies

Animation Motion CS4 Flash - Use Transform Tool Double Click Set Back To 0?

Sep 2, 2009

after i done all the animations and i want to paste it another fla. the movie clip animation positions not in the stage anymore, after i click on the timeline of the movie clip, it set path the movie clip to -8000+ X and Y. even i want to set to any number, it pop out invalid position. i have to use mouse drag the number back to position that i want. it's totally drive me crazy... really unstable.. sometimes i open back my fla, the movie clip position run too and i need to use transform tool double click set back to 0.

View 3 Replies

ActionScript 3.0 :: Flash Senocular Transform Tool - Scale Image Proportionally Without Shift Key?

Jun 19, 2011

i am using senocular transform tool in my flash, anyone know how to force user to scale image proportionally without pressing shift key?

View 2 Replies

Professional :: Rotate Using Gradient Transform Tool?

Dec 6, 2011

When I try to rotate using  Gradient transform tool, I can't rotate my gradient 45 degrees or 90 degrees. nap to objects is enabled and holding shift also doesn't work.

View 5 Replies

ActionScript 3.0 :: Skinning Senocular Transform Tool

Dec 27, 2010

Has anyone a chance to make custom skin for new transform tool v2 beta? Or can anyone guide me for a starting point?

View 0 Replies

Add Reset Button To Senocular Transform Tool?

Mar 11, 2010

I am a teacher I used the senocular transformer tool "action sript 3.0 Transformer tool [url]... to create a program for my students I want to add a reset button to it may anyone help me to do so?

View 3 Replies

ActionScript 3.0 :: AIR How To Modify Senocular's Free Transform Tool

Oct 13, 2009

how can I modify the code in Senoculars Free transform tool so it resizes on width/height basis instead of scaleX / scaleY like in the current version?

View 2 Replies

Professional :: Why The Text Disappears When Rotate It Using Free Transform Tool

Aug 3, 2010

My Text is visible before rotating it to verticle position using Free Transform Tool. But when once it is rotated to verticle position the text disappears from the Stage. And it is not an animated Text as well?

View 4 Replies

ActionScript 3.0 :: Loading External Images To Senocular's Transform Tool?

Apr 29, 2011

how to load an external image with fileReference and loader into a movieclip such that it can be transformed with senocular's transform tool.Here's what I have so far: (It places the image down but I cannot transform it)

ActionScript Code:
var fileRef:FileReference = new FileReference();
MovieClip(root).loadBtn.addEventListener(MouseEvent.CLICK, openClick);[code].....

View 1 Replies

ActionScript 3.0 :: Senocular Transform Tool / Restrict Drag Area

Jul 16, 2009

I am using senocular's transform tool AS3 in one of my projects.I am having a problem in customizing the tool, I need the movieclip to be drag only with in a rectangle.

View 2 Replies

ActionScript 3.0 :: Senocular's Transform Tool - Constrain Dragging To A Given Area?

May 1, 2011

Does anyone has a modified version of this awesome tool that can limit the dragging of the objects to a given area? me in the right direction on how to accomplish this, which class i need to modify.

View 1 Replies

ActionScript 3.0 :: Flip Objects Horizontally And Vertically Using Senocular Transform Tool?

Oct 15, 2008

I am using the senocular transform tool for scaling, rotating etc... skew is disabled in the tool. I Have tried many ways to flip the display object horizontally and vertically. he function I am using is given below. It works fine when the display object is not rotated. When it is rotated and then flipped it outputs a skewed inverted display Object.

function flipHorizontal(dsp:DisplayObject):void
{
var matrix:Matrix = dsp.transform.matrix;
matrix.transformPoint(new Point(dsp.width/2,dsp.height/2));

[code]....

View 1 Replies

ActionScript 3.0 :: Senocular Transform Tool With Dynamic Sprites And Loaded Images?

Jul 20, 2010

I'm using the Senocular Transform Tool to allow the user to scale an image that is loaded in. The demos work fine with sprites that are already on the stage.My setup is PureMVC and the images are loaded in, then I turn the loader content into a Bitmap and put that into a Sprite.I mimmicked the source files and added the TransformTool onto the stage level then I make the target the Sprite with the image inside.This all works and when I click on the image the TransformTool pops up and is the right size and shape. Unfortunately as soon as I try to scale or move it using the tool the image skews and scale in huge increments and goes off into the wrong directions.

I tried adding the Bitmap to the Sprite with the registration in the middle. I tried using a transform matrix to move the registration point to the center.

View 3 Replies

ActionScript 3.0 :: Flex Flip Objects Horizondally And Vertically Using Senocular Transform Tool?

Oct 15, 2008

I am using the senocular transform tool for scaling, rotating etc... skew is disabled in the tool. I Have tried many ways to flip the display object horizontally and vertically. he function I am using is given below. It works fine when the display object is not rotated.When it is rotated and then flipped it outputs a skewed inverted display Object.

function flipHorizontal(dspisplayObject):void
{
var matrix:Matrix = dsp.transform.matrix;

[code].....

View 1 Replies

ActionScript 3.0 :: Free Transform Tool Simulator That Rotates An Image When The Middle Top Button Is Clicked And Held?

Feb 6, 2009

I have a free transform tool simulator that rotates an image when the middle top button is clicked and held. The image rotates to 180 and then stops. Does anyone know why it is getting stuck?I have enabled viewsource for the code. the method is in WidgetEditor.as

View 3 Replies

ActionScript 2.0 :: Senocular's Free Transform Tool (or Even Senocular)

Mar 14, 2007

I've been using Senocular's free transform tool: [URL] in tandem with an image upload (using the fileReference class) so that users can upload an image and the transform it.

The free transform class has a function that allows you to restrict the scaling of the movieClip that you apply the free transform to, but it works on a 'scale' rather than specific height and width properties. My problem is, that I don't know what he dimensions of each uploaded image will be, so if it's restricted to a scale, some images will be allowed to be bigger than others....

View 4 Replies

Flash :: MMO For Facebook Architecture

Jan 25, 2010

architecture of the social multiplayer browser game with flash.

View 1 Replies

Java :: Android Flash App Architecture?

Jun 17, 2011

I am creating an app in flash for Android. What would be the correct architecture for this? Would I wrap the flash in Java, and the java would control the adverts and menu?

If so, when, for example, clicking Save on the menu, the java would need to get data (in this case, an image) from the flash app. Is this possible? If so, how? ![enter image description here][1]

View 1 Replies

Linux :: Architecture Of Multitouch In Flash On OS

Jan 24, 2012

Does flash support multitouch in Linux OS? How flash receives multitouch events from Linux OS?

View 1 Replies

Flash :: Getting 'Not Supported On This Architecture' Error Message

May 29, 2009

I'm having a problem with Flash and InDesign (both CS4), installed as a bundle in one go from Adobe Master Collection discs, When trying to launch InDesign or Flash, I get a message that they are 'not supported on this architecture'.

I'm on a MacPro with 2x3GHz Quad Core and 4GB running 10.5.7.

All the other CS4 Master Collection apps have installed and run fine.

My volume is formated as Mac OS Extended (Journaled).

View 3 Replies

Flash :: What Client Architecture For An LCD Wall Application

Dec 23, 2010

I have been asked to design an LCD wall application for a display like the one in this ad. Requirements are that the wall can display full screen video or partition the wall in different sections to display multiple video or images and video. I would like to understand what platform can be used to drive such beasts (what OS? what video card?). I wonder what software platform can drive multimedia on such a scale. Html5 + JavaScript would be OK on a single monitor, but on that scale would it slow down? Flash also is an interesting platform, as it is Air, but, once again, can it scale like that?

I am also considering the server architecture that is needed to drive a set of walls in the same location and the slideshow designer to create storyboards, but this is dependent on what client architecture will be embraced.

View 1 Replies

Flex :: Flash - Adobe Air (Html) Application Architecture?

Feb 15, 2006

have no experience in Adobe Air/Flex and wanna know, Are there some principles(design patterns) for develop Adobe Air/Flex applicati

View 4 Replies

.net :: 3-tier Architecture Be Applied In A Rich Internet Application (Flash/Flex)?

Oct 27, 2009

how would the 3-tier architecture be applied in a Rich Internet Application?I thougt that flex was presentation, .net web services where busines and informix was data. But then when I started I feel that I must be wrong.

View 1 Replies

Flash :: Architecture - Detecting Loading Status Of Multiple External MP3s?

Nov 4, 2011

I'm loading a number of MP3 files into my Flash (the number changes dynamically). I would like to be able to say, in total, how much longer all the files will take to load.

I can do this for each individual sound.Mp3.addEventListener(ProgressEvent.PROGRESS, test_function);

But each sound is loaded by an instance of my sound loader class, how can I pass the ProgressEvent up to the parent object, and then have it calculate the total time to load?

View 1 Replies

ActionScript 2.0 :: Draw Line Tool Like Flash Line Tool?

Mar 12, 2010

I want to create a line tool exactly like flash line tool. But the code that I am using shows the line when we release the mouse button. How can I show the lines while it is drawing

Code:
this.createEmptyMovieClip("drawing_mc",this.getNextHighestDepth());
drawing_mc.lineStyle(1,100);

[code].....

View 1 Replies

Files Not Saving With Deco Tool Or Spray Brush Tool Selected?

May 6, 2009

I found that .fla files do not save in Flash CS4 when the Deco tool or Spray Brush tool is selected. Is this a bug? Or is there a workaround to this issue.

View 3 Replies

Flash :: CSS Transform With Content?

Nov 28, 2011

i have a web application that runs inside a iframe. The iframe is scaled with -webkit-transform:scale(0.8), thats works pretty good but my flash audio recorder inside that iframe doesn´t work when the iframe gots scaled. The flash selfs got loaded and works but the SecurityPanel on which the user has to allow the access to the microphone, is not clickable.

Maybee someone has the same problem or any idea what i can do to fix that?

View 1 Replies

Error "You Can't Run Adobe Flash Cs4 Because It Is Not Supported On This Architecture"

Sep 17, 2009

I just installed adobe cs4 design premium, and everything works fine except for the program I wanted most, which is Flash. It has a little circle with a line through the icon and whenever I try to run it, it tells me that it cant run because it is not supported on this architecture.

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved