Flex - Taking A Snapshot, Scaling It And Repeating?

Apr 1, 2012

I'm trying to scale text from 1 to 5, a sort of zoom in type of look. I'm using the code below:

<s:Scale target="myLabel" autoCenterTransform="true"
duration="2000"
scaleYFrom="1" scaleYTo="5" scaleXFrom="1" scaleXTo="5"
>

The text scales terribly. So my goal is to take a snapshot of the text label at a large font, add it to the display list, set the scale to a 5th and then animate the scale up to 1. After that I have to set the text again and do it all over again.

This is a Flex app and that's where my question comes in. I don't know how to take a snapshot, then what to add it to (group?) and then how to erase it and start over again?

View 1 Replies


Similar Posts:


Actionscript :: Flex - Snapshot With Clipping Rectangle And Scaling Matrix?

Jan 29, 2010

var snapshot:ImageSnapshot = ImageSnapshot.captureImage(someSprite);
var file:FileReference = new FileReference();
file.save(snapshot.data,'abc.png');

n the above code I am able to capture an image.But I also want to apply a scalingMatrix(for zoomIn/Out) and a clipping rectangle to it. How to do it? I tried capturebitmapdata too, but with that I can't even get a proper image. See here. So I don't want to use that.

View 1 Replies

Flash - Taking A Snapshot Of A Loader?

Apr 4, 2011

I'm attempting to take an image from a networked camera and store it as a bitmap. I discovered that flash didn't support MJPEG so I found a class someone had written that could talk to the camera and output on the screen. Then I edited it so that I could request the current image at any time and store it in a ByteArray.I've managed to load that ByteArray with a loader class and place it on the stage, but I'm not sure how to save that as a Bitmap?

View 3 Replies

Flex :: BitmapData - Scaling Always Taking Place On Previous Point

Feb 1, 2010

I am working on an application that will allow a user to scale an image. The issue that I am having with the method below is that the scaling is always taking place on the previous scale point. For example: If I scale the image up one and then scale the image down one. I have to scale down twice to get it back to the point I want it to be.

Here is my current code:
private var sourceBMD:BitmapData = testImage.source as BitmapData
private var matrixScaleX:Number = 1;
private var matrixScaleY:Number = 1;
private var baseScaleX:Number = .05;
private var baseScaleY:Number = .05;
[Code] .....

View 1 Replies

ActionScript 2 :: Taking Flash Image Snapshot Possible?

Sep 30, 2011

Is there any approach to take the snapshot of a drawing created in pure AS2 flash coding ?
I tried to use Bitmapdata and bridge but bitmap works in as3 and bridge combines two swf together and communicate with them. Is there a way of doing screenshot in as2 ?

View 1 Replies

ActionScript 3.0 :: Taking Snapshot Of Movieclip, How To Get Rid Of Background Color

Nov 24, 2010

I am downloading an external swf file, which contains a library movieclip which I want to go through and extract bitmapdata of each frame. to do this I am using a for loop on this bit of code:

Code:
var tmpBMData:BitmapData = new BitmapData(baseObj.width, baseObj.height);
tmpBMData.draw(baseObj);

Problem is, when I stick that bitmapdata in a new bitmap and put it on the stage, the bit of the mc I am interested in is surrounded by a white square. Not sure if this is something I need to handle in the Flex AS3 or the Flash CS5 used to create the swf.

View 9 Replies

ActionScript 2.0 :: Taking A Snapshot From A Movie Clip And Storing It

Apr 13, 2006

I need to take a snapshot of a movie clip (only a rectangular of a movie clip, not the whole) and to store it in a variable so I can later show it to the user.

View 2 Replies

ActionScript 3.0 :: Scaling Movieclip Not Scaling But Repeating?

May 20, 2010

i have a diagonal movieclip that I am trying to scale along with the background video. The background video scales perfect, I am attaching the diagonal movieclip (br in the code as bottomright) with addChild
Instead of scaling with the window, it seems to repeat such as the image is displaying. this is the main section of the code that is doing the scaling
 
var br:mc_bottomright = new mc_bottomright();
addChild(br);
//proportional scale
if ((stage.stageWidth / stage.stageHeight)> (owidth/oheight))

[code]....

View 4 Replies

ActionScript 3.0 :: Snapshot Of A Movieclip And Add The Snapshot To The Stage On Every Frame?

Nov 8, 2009

I want to take a snapshot of a movieclip and add the snapshot to the stage on every frame.

Does anyone know how to do this?

I'm trying to achieve a reflection effect...

View 3 Replies

Flash :: DisplayObject Snapshot In Flex 3?

Jul 9, 2009

i'm creating a visual editor in flex and need to let users export thier projects into Image format. But i have one problem: size of the canvas is fixed and when user add element which is out of these sizes some scroll bars added. And user continue working on the project. but when he want to take snapshot of the canvas he just get the visible part ot the canvas with scrollbars. how to get image of the fullsize canvas?

The only solution i found is to check the positions and sizes of canvas child objects and rezise it to fit them. then take snap and resize back. But it hmmmm... too complicated i think. Is there some "easy methods"?

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script>

[Code].....

View 3 Replies

Flex :: Sending Snapshot Without Using Base64Encode

Mar 15, 2010

var is:ImageSnapshot = myImagesnapshot;
var str:String = ImageSnapshot.encodeImageAsBase64(is);

As of now, I am sending my jpeg data to the server with the code above. The problem is that it almost doubles the size of the data. Is there a way to send the image data directly without using any encoding.

View 3 Replies

Flex :: How To Take Webcam Snapshot Picture

Jul 11, 2010

Using Flex, what is the recommended way of taking a webcam snapshot picture? Something along the lines of:
var camera:Camera = Camera.getCamera();
var image:Image = /* magic goes here */

View 2 Replies

Flex :: Unable To Create Snapshot Of Canvas?

Nov 6, 2009

In my application a canvas object has height = 90 px & width = 86400 px (indicating number of seconds in a day [60 * 60 * 24] ). The canvas is scrollable and the user can add or delete components in that.Now, I want to have snapshot of the whole canvas & shrink it to size 910x30 to draw taken snapshot in another canvas.Can anybody tell me how to take snapshot of such large Component?I have tried to take snapshot in BitmapData object but as it max width is 2880 can not give whole canvas snapshot.

View 3 Replies

Flex :: Take A Snapshot Of A Movieclip With A Transparent Background?

Sep 13, 2010

I am coding in AS3 and I am using BitmapData to take a snapshot of a movieclip. Is there a way to have the end result BitmapData to support transparency?

How do I take a snapshot of a movieclip without any background?

View 2 Replies

Actionscript 3 :: Take Snapshot Of Video Control In Flex?

Feb 2, 2011

I had mx:Video object that play live strreamingvideo So how I can take snapshote of that Video

View 1 Replies

Flex :: Upload - Adobe Flex Mobile Selecting Image From Camera Roll Or Taking Picture Restarts The Application

Jan 19, 2012

I have a flex mobile application that I am working on that I am having issues with selecting an image from roll/taking a picture. My application is not tabbed, however one part of it contains a Tabbed View Navigator with tabs across the bottom. Within one of those tabs, I have the ability to upload an image to a webservice that I have created. However, when I select an image or take the picture, it pops back out to the initial splash screen and the application restarts. If I use the component standalone (outside of the tabbed view navigator) it selects the image and uploads without any problem.

[Code]...

View 1 Replies

Flex :: Capture Snapshot With Camera Height / Width Different From Video Display

Feb 3, 2011

I have a video display in my flex app. which is attached to the camera. The camera resolution can vary depending on the user's selection, While the video display (preview) dimensions are fixed. I am then doing this:
bmd.draw(vidDisplay);

Where bmd is the bitmap.. The problem is the resulting bitmap has the correct size of the camera settings (which is set) but the capture from the video is always the size of the video display inside the bitmap.. I hope i am making sense. The result looks like a little picture inside a bigger image top left justified. I want to have a video display preview with fixed height, but be able to take snapshot with varying resolution.

View 2 Replies

Flex :: Screen Taking Lot Of Time To Load?

Feb 10, 2011

We have a flex application and in that we have a screen that taking a lot of time to load, almost 60 seconds.Basically the screen is a very big form. I wanted to divide the form as a wizard but the client wants a single form with Vertical Scroll on. Now there are 8 sections in the form, each section has two form elements (so around 16 form components) but i have divided each section into a separate component of its own as some pieces are reused .So the whole screen is like Form - Divided into 8 sections Each Sections is an mxml components contained in a Almost each components contains two form components kept side to side in horizontal flow i.e something like that.This screen is taking hell of a lot of time to load. How should i speed it up, please tell the approaches.Also the main application doesn't take much time to load, this particular screen is loaded on the click of a button and on clicking the button the screen gets stuck because its taking a lot of time to load.

View 2 Replies

Actionscript 3 :: Know What Is Taking Up The Most Size Of Swf With The Help Of Flex Profiling?

Feb 10, 2011

Now the size of my flex swf is 480KB and I'm trying to find a way to reduce its size,are there any tips to follow?

View 1 Replies

ActionScript 2.0 :: No Resize/scaling A Movie Clip On The Scaling Stage?

Mar 11, 2008

I've search through all the threads with "scaling" and "resizing" and can't find the solution.

Basically I have a GUI element on a gallery that I don't want to scale, while the rest of the page is free to resize/scale.

I think I need to add a listener of some sort to the stage, but I'm not sure how to do this.

View 2 Replies

ActionScript 3.0 :: Scaling Button Background Without Scaling Text?

Feb 23, 2009

I'm building some navigation that extends all the way from left to right across my SWF. When the window resizes, I'd like the nav buttons to get wider but not have the text on the buttons get wider.

The buttons themselves are rectangles with a vertical gradient and a stroke around the outside. I'm using 9-slice scaling so the stroke doesn't scale, but the middle (gradient) gets wider or narrower.What'd be great is to be able to select an object or layer and say "don't scale, even if the rest of this movie clip scales". Is there a way to do that, or will I have to do it via actionscript?

View 1 Replies

ActionScript 3.0 :: Scaling A Movieclip Without Scaling Its Contents

Apr 10, 2009

I am trying to achieve an effect of scaling a movie clip on click...very similar to [URL] When the user clicks on See, Hear, Play and Shop boxes, the boxes expand. I have created a box movieclip that has a bar on top. This bar is a movie clip inside the box movieclip. When i try to scale the main box movieclip, the internal bar movie clip scales as well. How to stop this?

View 2 Replies

Flex :: Map Scaling - Exclude Some Children?

Jun 15, 2011

I'm trying to build a webmap application in flex. For this, I've got a fxg-file which represents the maps. It's in a also there are some elements, like POIs, text etc., in this group. I zoom the with scaleX and scaleY, this works just fine for the map. But the problem is: All children zoom also. I don't want this. They should stay the same place on the map and the same size.

Heres some code the as function
<fx:Script>
<![CDATA[
import mx.skins.Border;
[Bindable]
public var hoehe:Number = 1;
[Code] .....

ComponentsLakwView contains some labels etc. This should not be resized?

View 2 Replies

Actionscript 3 :: Scaling SVG Images In Flex?

Jan 11, 2012

I am having a problem where, when I scale an SVG in flex, it clips a part of the image, as shown below (the bottom right is clipped off, it should be rounded, like the top left)

Here is my code:

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" actionBarVisible="false"
xmlns:s="library://ns.adobe.com/flex/spark" title="Table">

[Code]....

View 2 Replies

Actionscript 3 :: Scaling Flex Graphic Object Via UI?

Apr 15, 2012

I have basic shapes created using flex primitives classes like ellipse rectangle etc. Each of these are added into a graphic object.Now i am in search of a mechanism to select it and scale it (as in Photoshop Transform -dragable corners and edges, image gets scaled on dragging)

View 1 Replies

Actionscript 3 :: Scaling And Resizing Flex Component?

Mar 30, 2011

I have custom flex component inherited from UIComponent (compiled, no source code access). It has fixed width-to-height proportions and it's scalable. If I set its width and height to 100%, it's trying to fit parent's size, but it keeps width-to-height proportion, so if it's proportion does not equal parent's proportion, there can appear empty space near this component when resizing parent.

What I need, is to fit my component completely to parent's size. Is there any nice way to do this? I could listen to parent's resize event, and play with component's scaleX and scaleY

View 3 Replies

ActionScript 2.0 :: Non Scaling In Scaling Part

Apr 18, 2004

really sorry to bring this one up again. I've managed to create quite good working gallery. What I'm trying to now is create a menu that is attached to the scaling part but does not scale it self - in other words just changes position. here's an example of what I mean: galleru #1

View 14 Replies

ActionScript 2.0 :: Non Scaling In Scaling Part?

Apr 18, 2004

What I'm trying to now is create a menu that is attached to the scaling part but does not scale it self - in other words just changes position. here's an example of what I mean: galleru #1

View 13 Replies

Flex :: Scaling And Repositioning Circles Based On Resolution

Dec 23, 2009

We are building an application in Flex where we have to scale and reposition the circles based on the changed screen resolutions. Example: Current resolution: (800, 600) I draw a circle at position (410,290) with radius 10 Now If i change the resolution of screen to (1440, 960) then the circle should be drawn at the same place on the screen with respect to the new resolution with relative increase in the radius.

View 1 Replies

Flex :: ComboBox Dropdown Scaling Does Not Follow DisplayList?

Jan 13, 2010

I've been working on an application (with ComboBoxes) that requires scaling the entire application based on screen resolution. I thought it would simply require changing the "scaleX" and "scaleY" properties of the top-level application, but discovered that the ComboBox dropdown doesn't appear to scale accordingly, as in the following example:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
applicationComplete="init()">

[Code]....

which results in the dropdown appearing (sliding down) unscaled until it reaches it's extended length and stops at which point it scales up and remains at that scale until it is closed. I have also found that if you call "invalidateDisplayList()" on the comboBox or the dropdown, then it undoes the scaling, so it appears that whenever the updateDisplayList is called, the dropdown only applies it's parent ComboBox's scaling, and not the ComboBox's parent container's scaling.

I understand that, as a pop-up, the dropdown isn't in the Application's or ComboBox's displayList tree, which appears to be the root of the problem (no pun intended).

View 3 Replies







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