Flex :: Dropped Image Be Rotated In Canvas?

May 25, 2011

this is the code for 3d rotation [code]i want to rotate the image after dropping them in the canvas.i am able to rotate them in the panel.

View 1 Replies


Similar Posts:


Flex :: Saving Canvas And Dropped Image

Jun 10, 2011

I have an image loaded from an url and added to canvas as child. Then I am drag and dropping another image on it which also uses the senocular transform so the image can be transformed on the canvas. I have coded in such way that the transform handles shows up only after it's dropped on canvas. The image shows up correctly. But I am trying to save the result image (that is the main image and the dropped image on top of it), I only end up with the main image that was loaded earlier. The dropped image doesn't show up.

Below is the code for handleDrop() that is fired on dragDrop event and prepares the final image.

[Code].....

View 1 Replies

Flex :: Skin A Canvas With Image And Scale It To Size Of Canvas In It?

Apr 9, 2011

I'm trying to skin a canvas with an image (which is essentially a custom border for the canvas). I've been trying the backgroundImage style as well as the borderSkin style. I can't get the image to scale to the full size of the canvas though. I was wondering what the best way to go about this is.[code]...

View 2 Replies

AS3 :: Can't Get The Bitmapdata From Dropped Image In Flex Air

Apr 4, 2011

When I drop an image onto my canvas I can get the nativePath to the image but not the bitmapdata wich is the one I need.

In debug mode when I look into the file properties the data is set to NULL.

In my code file.data doesn't give me anything.

protected function creationCompleteHandler(event:FlexEvent):void
{
this.addEventListener(NativeDragEvent.NATIVE_DRAG_ENTER,onDragIn);

[Code]....

View 1 Replies

Flex :: Calculating Position For Rotated Image

Aug 5, 2010

I have a couple of images, representing tents, that look like this: The red and blue parts on each side of the tents are doorways, and several tents can be connected together via these doorways. For example, I want to connect the two blue doorways so that they match up like in this picture: If the first tent is stationary, around which point do I rotate the second tent and how do I calculate where to place it?

Currently, I have the upper left corner of each doorway as an x and a y value, together with the width and direction (in degrees) of the door. I'm treating the doorways as one dimensional, so they don't have heights. Would another representation suit this better? Perhaps a start point and an end point plus direction?

View 1 Replies

Flex :: Put An Image Inside A Canvas Without It Overflowing?

Aug 13, 2009

I have an Image nested inside a Canvas.

<mx:Canvas>
<mx:Image source="@Embed(source='assets/library.swf', symbol='Waves')" />
</mx:Canvas>

I'd like the Image not to overflow the bounds of Canvas. But when I set width and height on the Canvas, my Image disappears. Canvas also doesn't seem to respect horizontalScrollPolicy.

Seems easy enough, but as the official Flex documentation is down at the moment, I thought I'd turn to SO.

View 2 Replies

Flex :: Adding Selectable Image On Canvas

Dec 24, 2009

I am new to flex, and do not know how to add an image (or other ui component) to canvas, so user can select it (and see that it's selected), also I want to add a possibility for example to click backspace and remove selected image from scene. How to do that?

View 1 Replies

Flex :: Place An Image In Specific Coordinates On Canvas?

Nov 30, 2009

I know that the question may seem very easy. I am trying to display an image on canvas.I need to do it in AS, and also I need to locate image in specific coordinates.

View 2 Replies

Flex :: Dynamically Add Different Items To ThumbContent Canvas And Use Scroller Canvas To Scroll

Jun 5, 2009

I have the following code in my flex project.

[Code]...

I want to dynamically add different items to thumbContent canvas and use scroller canvas to scroll. I see than the height of thumbContent bigger than 7977 it truncate from scrolling. So - I see the scroller canvas with empty space on top. Then I scroll to bottom - I see the content of thumbContent and at bottom scrolling I see empty space too.

View 1 Replies

ActionScript 3.0 :: Loading Larger Image When Dropped?

May 27, 2010

I am working on this image scroller, where thumbnails of images are displayed.  I get each image by

function urlLoaded(event:Event):void {
urlLoader.removeEventListener(Event.COMPLETE,urlLoaded);
xml=XML(event.target.data);

[Code]....

So is there anyway I could use any of the above code to load the big image associated with the small image?  If event.target points to the current thumbnail being picked up, could i do something like event.target.url to point to its name or something?

View 3 Replies

Professional :: Created, Than Dropped On The Background Image?

Sep 19, 2011

I am wanting to allow icons/small images dragged and drop on the background photo. Is this possible? If so, can you point me in the direction to look?

I want to create my own little icons/images and allow someone on the web to drag and drop an image I created, than dropped on the background image.

View 3 Replies

ActionScript 3.0 :: Get Scale Value From Rotated Image?

Aug 21, 2009

I have made an application where you can design your own greeting cards. I use matrices to scale and rotate images, and I always need to know what scale the image has.

It works when the image isn't rotated, by taking the value from matrix.a or .d which are the scaleX and scaleY values. But when I rotate the image, using the matrix.rotate() function, the a and d values no longer corresponds to the scale of the image.

How can I get/calculate the scale value of an object that is rotated? And I don't want to scale the image by using the scaleX and scaleY methods.

View 9 Replies

ActionScript 3.0 :: Rotated Image Scroll Bar?

May 5, 2010

I need to rotate the imageClip,then zoom in,then i need to scroll the imageClip fully.ve the tutorial for thisboth horizontal and vertical scroll for Rotated imageClip..

View 0 Replies

ActionScript 3.0 :: Dynamic Loaded Image Low Quality When Rotated?

Jun 11, 2010

I'm loading external images in a flash animation, on slides, and these ones get a random rotation.My problem, the rotated images are looking bad and pixelised almost like if you were using bitmap text for dynamic text areas.

View 1 Replies

Flex :: Bitmapdata From Multiple Images (drag & Dropped)

May 29, 2011

I have an image loaded from BitmapData displayed in an Image control. This Image control has dragEnabled and user can drag and drop small images (from a bunch of images in a TileList) on top of it.

The image loaded from the Bitmapdata can be different every time with different resolution and the Image control scales it down to fit its fixed with/height. But while saving the image after editing I am saving it with its original width/height. For this purpose I am storing the original Bitmapdata in a temp object and applying any edits there before saving.

how to create an image combining the Large image and the small images dropped into it. May be I can use display object snapshot but then I want to save the image with its original with/height and preferably after converting it to Bitmapdata.

View 2 Replies

Actionscript 3 :: Find The Index Of A Dropped Item In Flex?

Jul 14, 2011

How can I find the index of a item dropped into a list in flex using a spark list?

View 2 Replies

Saving Image Of Canvas?

Jul 19, 2009

I am trying to make a flash application that can save (to the user's local hard drive) a screen shot of the canvas (or more accurately part of it).I've dabbled with Quasimondo's Bitmap Exporter which did some funky stuff to render an image, ship it to a php script on the server, and bounce it back to the client. But not only is that inefficient it also has two other major flaws:

1) it's written in actionscript 2 so I can't use any actionscript 3 abilities.

2) it breaks as soon as one of the images on the stage is defined as a variable brought in through $_GET rather than hard coded. (the image comes in fine but then the rendered finished product is a blank white image)

View 6 Replies

ActionScript 3.0 :: Save Image Out Of Flash (whole Canvas)?

Dec 15, 2009

I'm creating a flash fun thing where you dress up a character by just dragging and dropping little images, everything is working fine.

I want to add an option to save the image you have created, I can do this but the problem is you have to set a movie clip to capture, the thing i want to capture is a few movie clips layered on top of each other(the finished character).[code]...

View 3 Replies

ActionScript 3.0 :: Adding Image To Canvas Won't Start At 0 (but Img.y Says 0)

Sep 9, 2011

I am going nuts! I have a canvas which I am trying to add a background image to. I am not setting the Y position, but after I add it to the canvas it always starts about 40 px down. If I trace the Y position it still says 0, even after a timer. I have tried to move it to the parent canvas and got the same results.

View 1 Replies

Actionscript 3 :: Set Bitmap Image In Canvas Background?

Nov 18, 2010

I have image as Bitmap:

var bitmapImage:Bitmap=getDefaultImage();

I need to set this bitmap as canvas backgroundImage.

I find method myCanvas.setStyle("backgroundImage",url); But i dont need url. Whent i do this:

myCanvas.setStyle("backgroundImage",bitmapImage); I have an error.

How to set bitmap image in canvas background?

View 1 Replies

Actionscript 3 :: Flash Upload Image To Drawing Canvas

Jul 18, 2011

im trying to create a online business card editor to learn flash again, one of the functionality im trying to achieve is being able to upload an image (jpg,png etc) and place said image onto a drawing canvas and then being able to scale the image and rotate the image and move the image around. can some one direct me to a decent tutorial for this kind of functionality.

View 1 Replies

ActionScript 3.0 :: Unable To Make An Image As An Object On The Canvas

Apr 30, 2010

I have an app wer i drag and drop images onto a canvas and then move them on the canvas to arrange them appropriately. After that i shud be able to click on those images and draw connectors between them as the user seems required. But after dragging and dropping the images on the canvas and arranging them, when i click on the image i am getting a typeerror 1009 error, i.e, "cannot access a property or method of a null object reference".

Actually after arranging the images, i add an event listener to the image(proxy) on the canvas:

image.addEventListener(MouseEvent.CLICK, mouseClickk);
image.addEventListener(MouseEvent.DOUBLE_CLICK, mouseUpp);
MouseClickk Function:

[Code].....

View 0 Replies

Flex :: Force Containers To Do Layout After Children Rotated?

Aug 6, 2009

My problem is pretty simple: Flex containers do layout based on un-transformed children, and so rotated children are positioned as if there were no rotation, but then they're rotated around the top-left of that position. I've attached an image to show what I mean. Can I wrap the components in something? Or do I have to resort to custom components or fixed layouts? The image inlining doesn't look like it's working to me. Link to example image: [URL]

View 2 Replies

Flex :: Get Visual Width And Height Of A Rotated Component?

Jul 25, 2010

I'm playing around with code like this:

<s:Button id="test" label="test" transformX="{Math.floor(test.width/2)}" rotationY="20" x="20" y="20" />

The button is rotated on the Y axis and the rotate pivot is in the middle of the button.

This will create a button that looks something like this[code]...

I put together a sample to show off the various approaches for calculating this that people are suggesting. The source code is also available. Nothing is quite working like I'd expect. For example, turn the rotationSlider to 85. The button is effectively invisible, yet all approaches are still giving it height and width.

View 3 Replies

ActionScript 3.0 :: Choosing Background Image From File On Server As Canvas

Nov 28, 2010

I need the exact simple application but the ability to choose a background image from a file on the server as the canvas and I want to save the created image on a server file instead of on the client machine. The ability to change the pencil drawing size would be an additional plus. I work with php and mysql so I would like to use them to store the file parameters, even as a blob in mysql, along with some additional user (server) defined variables (I can do the php/mysql side if I can get the file there, I understand there is an swf to png ByteArray class that might be able to save on server. The project is for an opensource group so the final product would need to remain as such, I would be able to pay for the modifications mentioned above. The source files are available at the links below. [URL]

View 1 Replies

ActionScript 3.0 :: Saving BitmapData In Image Component And Clear Canvas

Feb 10, 2009

I made a program in Flex that uses the actionscript 3 drawing api. I am drawing on a Canvas and on every mouseUp event I save the bitmapData in an Image component and clear the the Canvas. That works great, but the problem appears if I want to add a background to the paint that was drawn.

Here are the mxml components:
Code:
<mx:Canvas id="_backgroundColor" width="100%" height="100%" x="0" y="0" />
<mx:Image id="_image" x="0" y="0" mouseEnabled="false" />
<mx:Canvas id="_paper" x="0" y="0" />

And here it is the function I have on the Canvas (_paper) mouseUp
Code:
private function onSaveModifications(evt:PaperEvents):void{
var bmpData:BitmapData = new BitmapData(this._paper.width,this._paper.height,true,0x00FFFFFF);
bmpData.draw(this._paper);
this._image.source = new Bitmap(bmpData);
this._paper.graphics.clear()
}

I want when I set the _background Canvas background color to see it, but I cannot because the Image component(_image) where I save the bitmap is masking it.

This is how I set the background
Code:
this._background.setStyle("backgroundColor",0xff0000)
Do you know how can I make the pixels of the bitmap that weren't drawn to be transparent?

View 2 Replies

ActionScript 2.0 :: Rotated Tiles Background - Flip The Image Horizontally For Every Other Placement Horizontally

Feb 7, 2007

I have a image of burlap @ 500 width x 430 height. I need to tile this as my entire background for my full screen flash site. flip the image horizontally for every other placement horizontally, and then i need it to flip vertically for every other Vertical placement. So the image only looks seamless if i do this. I have a illustration below to help show what i mean.

[Code]....

View 2 Replies

Flex :: Actionscript 3 - Find Upper Right Point Of Rotated Rectangle?

May 2, 2010

I have a rectangle of any arbitrary width and height. I know X,Y, width, and height. How do I solve the upper right hand coordinates when the rectangle is rotated N degrees? I realized if it were axis aligned I would simply solve for (x,y+width). Unforunatly this doesn't hold true when I apply a transform matrix on the rectangle to rotate it around its center.

View 2 Replies

Css :: Flex 4 Rotated Horizontal Label With Embedded Font Truncated?

Feb 14, 2011

I am trying to get the horizontal label of a ColumnChart rotated by 45°. I already know the font needs to be embedded for this to work, but now, my label are being truncated. Note that it worked in a basic chart proof-of-concept I made months ago, but now it is integrated in a panel with a verticalLayout, label are truncated.

[Code]...

Note that if I use the style for the vertical axis, I also get the number truncated to the first digit.

View 1 Replies

ActionScript 3.0 :: Canvas Size Limit 2880 But Image Width 5000

Aug 20, 2010

My artist drew a beautiful island but it's 5000 in width. We scroll it as it's for a Virtual World. - it's in layers and we scroll the different layers at different speeds. Flash documentation states that the limit is 2880 BUT it does work in the player i.e.: you can see the full island but it does run a little slow.

Should I
a. Create a smaller island of 2880 which is a shame as I would have to get rid of a lot of good stuff
b. Split it into two images and dynamically connect them with code.

Also, I have different layers scrolling at different speeds which would make things more difficult to look natural.

View 13 Replies







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