Flex :: 4 - TouchEvent StageX & StageY Properties Fluctuate Under Transformed Target

Aug 3, 2011

I've written code that enables DisplayObjects to be fully manipulated under two touch points (drag, scale, rotate). The problem I'm having is that as the DisplayObject is being manipulated, it causes fluctuations in the TouchEvent's stageX & stageY properties. These fluctuations are feeding back into the tranformation code and as a result, the object shakes/shivers.

It seems that the stageX & stageY properties are being calculated from the localX & localY properties of the TouchEvent. I've tried adding listening to the stage itself for the TouchMove event, but as soon as I drag my finger over a transformed object, the traced stageX & stageY values change slightly, going from integers to floating-point numbers. This is evidently what's causing the shakey feedback loop.

View 1 Replies


Similar Posts:


Flex - Display Object That Has Been Transformed With A PerspectiveProjection?

Jul 20, 2010

I'm currently transforming some objects to make them appear far away using a PerspectiveTransform. This works well, but I have no way of knowing where on the screen the object is displayed. The x and y coordinates are the coordinates of the object if it were at z=0. How can I compute the display coordinates of my component?

View 1 Replies

Flex :: FLASH - User Added/Transformed Text Field

Aug 4, 2011

how I'd go about having a text field a user can change the dimensions of by clicking and dragging in Flash?

i.e. the movie would show a text field with transform handles and depending on how wide or high it changes the word wrap..

View 1 Replies

ActionScript 3.0 :: Make A Movie Clip Only Visible When The MouseY Is .25 StageY?

Mar 19, 2010

I really need the code to make a movieclip visible only if the mouse is near the bottom of stage.[code]...

View 9 Replies

ActionScript 3.0 :: Make A Movie Clip Play When The MouseY Is Less Than A Percentage Of StageY?

Feb 20, 2010

I have a listener which traces the Y value of mouse:
 
stage.addEventListener(MouseEvent.MOUSE_MOVE,f);
function f(e:MouseEvent){
trace(e.localY);
}
 
I need to make a movie clip play when the localY value is less than .25 of stageY, or even less than 150 would work. 

View 7 Replies

Actionscript 3 :: TouchEvent Vs MouseEvent?

Apr 10, 2012

I am develop on Air for iPad app, just wonder is TouchEvent more efficient or MouseEevent is doing fine. i am talking about performance wise, things like doing drag and drop and ect...

View 1 Replies

Transformed Text Can't Show Up In Run Time

Dec 7, 2010

I am having a problem where the text that I transformed (rotated) doesn't show up when I test the movie. I am using Flash CS4.

View 1 Replies

Css :: Flash :: Embedded Videos Be CSS Transformed?

Mar 11, 2011

I'm experimenting with CSS transforms and I noticed that embedded videos (like for instances the ones from youtube) don't behave as expected when a CSS transformation is applied to them.

I've tested this in the latest Chrome, Firefox and IE and none of them was able to display transformed videos.Is this a bug of sort, or are videos not supposed to obey to CSS transformations? Not even using html5 in Chrome solved the issue.

View 1 Replies

ActionScript 3.0 :: TouchEvent Within Class File?

Mar 11, 2011

Experimenting with touchscreen events, using Flash Builder "Burrito", Flash CS5, and Device Central...As follows is the document class (Engine.as) for a (properly set up and responding) resource fla:

ActionScript Code:
package {
import flash.display.MovieClip;

[code].....

View 0 Replies

Button Hover - Stroke Enlarges When Transformed?

Dec 7, 2009

I have a button that I use universally to show a hover state, so that the user knows the item is clickable. The hover state is a simple black stroke. Because the buttons with the timeline are of different sizes, I stretch the button to encapsulate the entire area I want to be linked. However, the stoke of the hover state is stretched too, so it's get thicker the bigger I make it. Is there any way to ensure the stroke is always the same weight?

View 4 Replies

Actionscript 3 - Flash TouchEvent And MouseEvent Conflict?

Jan 8, 2011

I have 2 controllers on my stage, one behaves like an analog controller (A) for left/right up/down etc, controlled with a TouchEvent. The firing controller (B) is bound to another TouchEvent.problem is TouchEvent seems to be much slower than using say MouseEvent.MOUSE_DOWN for controller (B) which results in a much faster firing mechanism. If I am using TouchEvent to control (A), and MouseEvent.MOUSE_DOWN on controller (B), (B) will not fire unless I release (A) meaning I cannot move and shoot at the same time which is frustrating, but I can use a MouseEvent for controller (A) and a TouchEvent for controller (B). how I can stop the conflict?

View 1 Replies

Flash :: Add Image To Sprite So TouchEvent Responds?

Apr 30, 2011

I create my sprite and eventlistener like this:

public function init():void
{
var mySprite:Sprite = new Sprite();
mySprite.graphics.beginFill(0x336699);
mySprite.graphics.drawRect(100,100,150,50);
addChild(mySprite

[Code]...

But how would I and a image to the sprite so the TouchEvent responds to touching the image?

View 1 Replies

ActionScript 3.0 :: Properties And Methods For "event.target"?

Dec 21, 2010

I don't have a problem with code but a big problem figuring out where to find out the properties and methods for "event.target". I'm working on a project where, naturally, events are essential. I've noticed, while reading some Actionscript code, that people use code such as:

Code:
event.target.name
event.target.loader

Very useful and interesting but the problem is where can I find out the properties and methods for "event.target"? I'm using Flash Builder 4 and I get the instance's properties and methods when I press the dot (code hinting). However, I don't get e.g. any "name" property after "target". It would be very useful for me to know where to look...

View 2 Replies

Actionscript 3 :: Adobe Device TouchEvent Test - Single Touch Doesn't Work

Apr 5, 2012

test touchEvent on Adobe Device Cental, google it can't find any information. I know you can do multi touch, but single Touch doesn't seem to work.

View 1 Replies

Flex :: Generate Dynamic Flex-ComboBoxes By Class-Properties

Jul 6, 2011

I have an Flex-Object with for example 3 properties.

myObj.prop1
myObj.prop2
myObj.prop3

I like to generate 3 Comboboxes to show the data.
No problem if I do it hardcoded in sourcecode.

But how can I find the prop1 to prop3 at runtime?

If next time I have 5 properties with different name it should generate 5 combos.

View 1 Replies

Actionscript 3 :: Flex - Changing Properties Of Several Objects In Flex

Sep 7, 2010

In my example below I have several objects. I want to change the label of all objects in one go, without calling each element by id. I know how to do this in HTML, but not in Flex.

CODE:

This is how I would usually set the color of 3 objects to grey in one line.

CODE:

Is there any way I can change the labels of all 3 buttons with a single line of code similar to the jQuery example?

View 3 Replies

Flex - Get Settings/properties Into A Flex/FlashBuilder Application?

Feb 28, 2012

I have a Flash Builder application which uses URLs within its code and I want to be able to change these URL values without having to recompile my application, i.e. I want to have a plain text file I can edit which is used to populate these URL values when the application begins. I've worked out what feels like a kludge to do this with ResourceBundles, but maybe there's a better or more straightforward way to go about this.

[Code]...

View 3 Replies

ActionScript 2.0 :: Stop Further Items Being Dragged Onto A Target When The Target Box Is Full?

Sep 29, 2003

On the attached exercise, is it possible to stop further items being dragged onto a target when the target box is full?

View 1 Replies

Flex :: Can E.target Use To A Button

Oct 22, 2010

Rather than assign to every buttons with MouseEvent, I assign to AIR application with:

private function init():void {
this.addEventListener(MouseEvent.MOUSE_DOWN,mpressKey);
}

[code].....

View 2 Replies

Target Flash 10.3 With Flex 4.6?

Feb 3, 2012

How would i go about compiling a Flex 4.6 Project for Flash Player 10.3 ? In the Flex compiler settings, I have set the additional compiler arguments:-target-player=10.3.0 -swf-version=12

And I added the 10.3 playerglobal.swc Here are my settings (I cannot change the "Adobe Flash Player options"): But the resulting swf still requires Flash 11.1.

Am I missing something or do Flex 4.6 Projects not compile to Flash 10.3? I have been using Flex 4.1 previously and didn't add any Flex 4.6 specific components.

View 1 Replies

Flex :: Access Properties Of Column?

Aug 18, 2009

I have following datagrid[code]...

I want to send a name of opponent to a webserver after Delete button is clicked. Can I access correspondent value in datagrid on click event?

View 1 Replies

AS3 :: Flex Documentation Of The Lesser Know Properties

Sep 17, 2009

Over the past three weeks, I have lost at least 120 man hours because of some lesser known functionality in ActionScript 3. One of the problems was that, with Internet Explorer, if there are too many messages sent through LocalConnections, it will slow the messages sent through, but in the standalone player and in Firefox, this threshold is significantly higher. Another was that the static values of a class are instantiated even if the member itself is not being used:[code]Since FooClass had a static reference to a Singleton, that Singleton was instantiated so when I loaded a Module which used that Singleton, it would bind to values in an unpredictable way.Additional cases where things behave in an unexpected way:

So here's the question (and I'm sorry for omitting this in the original post), is there any consolidated documentation for this type of behavior anywhere? Is there any (even non-Adobe) documentation on these issues (websites, forums, books, ANYTHING)? I know that these things are definitely easy enough TO document, but has anyone done so?

View 3 Replies

Flex :: JSON: Ignore Certain Properties Name?

Nov 10, 2009

Is there some library for flex, that will let me: define properties to fully exclude from serialization define classes to serialize without the property names (as if they were an array)

View 1 Replies

Flex :: Inheriting Properties From A DisplayObject?

Dec 21, 2009

In regards to as3 project: Is there a way to inherit the properties of a given DisplayObject? I am looking for a single method that will grab something like the x, y, width, height, color, etc. Whatever is involved in the common classes between the two display objects.

Edit:

I don't think I was clear enough... Let me give an example of the type of functionality I am looking for.

var sp1:Sprite = new Sprite();
sp1.x = 30;
sp1.y = 30;
sp1.width = 500;
sp1.height = 30;
var tf1:TextField = new TextField();
tf1.inheritTransform(sp1);

So, in this case I know that the method 'inheritTransform()' doesn't exist, but I am wondering if there is something similar. Or maybe I am missing the point of extending a class in some way? I don't see how the two would relate in such a case.

View 2 Replies

Flex :: Modify Its Properties Since It Already Exists?

Mar 19, 2010

I have a Rect object that I'd like to create and set its properties only once. After that, I want to just modify its properties since it already exists. This is my general idea

if(theRect == undefined){
Alert.show("creating");
var theRect:Rect = new Rect();[code].............

but can't get the desired effect. Everytime this code block runs, and depending on which version I've used, it either gives me a "can't access null object" error or the if statement always evaluates to true and creates a new Rect object and I get the "creating" Alert. What's the right way of creating that Rect but only if doesn't exist?

View 1 Replies

AS3 :: Flex - Detect Read-Only Properties?

Aug 26, 2010

I have a simple AS3 class that just holds private variables. Each private variable has a getter function, but not all of them have setter functions. At runtime, Is there a way of telling which properties do not have setters but are read-only? Then I can decide to give the user an input field to edit the properties that have setters.

View 4 Replies

Actionscript 3 :: Properties With $ Prefix In Flex?

Oct 14, 2010

What is the significance of the $ prefix on some properties of Flex Objects?

e.g. item.$width

View 3 Replies

ActionScript 2.0 :: Set Properties - Get Properties - Change An Mc Name Dynamically?

Sep 14, 2005

Just been playing around with the tutorials, on the Set properties/Get properties. Everything is all cool, except the "instance name" aspect. I dnt really understand that too well. Is it possible to change an Mc Name dynamically? If you look at my FLA when you hit the top left red button you will get a trace of the mcName as "square". Now if you input a new mc Name on the right hand side, you will see it change on the left hand side. But i want to know why it doesnt remain as the new mc Name, it still goes back to square.

View 3 Replies

ActionScript 2.0 :: Trace The Properties Of An Object's Properties?

Jan 30, 2008

I forgot to put it in the title so I'll just place it here; I am using AS 2.0. I know that there are other ways to accomplish the goal that am after, but I was wondering if anyone knows of a way to access the properties of an object's properties?

Here is the code that I thought of, even though it doesn't work

var a:Object = new Object();
a.bproperty = 0; //lowerlevel properties
a.cproperty = 1; // lowerlevel properties

[Code].....

This really just boils down to how I am organizing the code(I have ideas on what do next, and i am 99% sure that I can get them to work), and if there is a way to dynamically access the properties of the objects properties, It will save me from creating yet another large block of code for my project. If you want to see the unfinished project, go to [URL]

View 3 Replies

Flex :: Target Of Assignment Must Be A Reference Value

May 4, 2010

Target of assignment must be a reference value

for (var z:int=0; z<this.tags.getItemAt(i).yearPopularity.length; z++) {
summedPopularity.getItemAt(z) = summedPopularity.getItemAt(z) + tags.getItemAt(i).yearPopularity.getItemAt(z);
}

View 3 Replies







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