ActionScript 3.0 :: Getting Selection Of Movieclip Using JPEGEncoder Or Bitmap/Data?

Nov 23, 2009

I have a swf that includes another swf (my main movie (video_mc)) and i want to be able to take 'photos' of that swf using clicking of the mouse.I have tried using JPGEncoder and Bitmap/data but neither seem to give me the option to specify the point of origin for my movieclip.Is there a way to get either JPGEncoder or bitmap to take an image of a 100x100 box where the mouse is on the movie clip i've been pulling my hair out for days now! I've also searched everywhere but cant seem to find the answer.

View 2 Replies


Similar Posts:


Actionscript 3 :: Draw Textfield Caret And Text Selection Onto Bitmap?

Jan 6, 2012

I'm drawing a textfield onto a bitmap which I use as texture for a 3D object. I'm listening for Event.change, and so whenever the user adds a character I redraw the texture. But to really give the 3D object a 'interactive textfield feeling', I want to draw text selections and draw the caret (the blinking text cursor), but by default these a not drawn when using bitmapData.draw(textField), nor can I find a Event to listen for 'textSelected'.

//is there any event that catches text selection / blinking of text-cursor?
textField.addEventListener(Event.CHANGE, redrawTexture);
//...
//is there any way to draw text selection / text-cursor in the bitmap?
bmpData.draw(textField);

View 1 Replies

ActionScript 3.0 :: Bitmapdata.hitTest - Bitmap 'emptyBitmap' With Bitmap Data Created

Feb 3, 2009

I'm cutting my teeth in actionscript 3 on a game that has a character running through a world. So, I have set up my Hit Testing by using the bitmap data hit test method, since I figured my world is going to be destructible - it'd be nice to update the level and then redraw it and have the character interact with the new change. (That works beautifully) I am however; a bit confused as to how I have my hit Testing set up. I've been messing around with it, and it works for now - but I'm not sure why.. currently, I have a character set up by using a class I built and using a series of animations I created. So, this character has a walking and falling animation, etc. This is a movie clip.

Then there's a bitmap 'emptyBitmap' with bitmap data created - however; I never really added this as a child to the character. This is sized to the dimensions of my character. My level is created as a movielip, then it's drawn to a bitmap - when the level movieclip is changed, the bitmap redraws, and that's how this updates.

[Code]....

View 1 Replies

ActionScript 3.0 :: Flash - JPEGEncoder Could Not Be Found

Jan 31, 2009

Is JPEGEncoder available in Flash? Or does it work only in Flex ? Which package should I import? It gives me the following error:
1172: Definition com.adobe.images:JPGEncoder could not be found.

View 1 Replies

Use Either Maintaining Movieclip Array Or Bitmap Data Array?

Jun 5, 2009

I am working on a project in which I am suppose to matain an array of movieclips, and I can also convert the movieclips into bitmap data. so I would like to know which one is the best to use either maintaing movieclip array or bitmap data array.

View 2 Replies

ActionScript 3.0 :: Movieclip On The Stage(lets Call That Selection Movieclip)

Sep 1, 2009

I have a movieclip on the stage(lets call that selection movieclip) that once a button is clicked is going to open another movieclip(call this slideshow) I am trying to remove the selection movieclip when you launch the slideshow movieclip.

Error:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display:isplayObjectContainer/removeChild()
at mc_work/clickHandler3()

[Code]...

View 9 Replies

Flex :: Maintain Selection In A DataGrid When The Data Changes?

Apr 6, 2010

I have a DataGrid and I set the DataProvider to my data. When my data changes the DataGrid loses the selected row and the scroll bar jumps back to the top. How do I maintain the selection and scroll position?

View 2 Replies

ActionScript 3.0 :: Setting ComboBox Default Selection Using Data Field?

Jul 20, 2009

I've got a comboBox with defined data and label fields. On Event.CHANGE I capture the data field. I need the comboBox to default back to the user selection if they should navigate to another screen and then come back. Normally I've got an array of labels that I can use to just lookup the index: comboBox.selectedIndex = labelArray.indexOf(user selection); In this case I don't have labelArray. What I really want to do is something like this (only with real AS, not fake):
 
comboBox.selectedData = storedDataString or, if the data array is accessible: comboBox.selectedIndex = comboBox.data.indexOf(user selection); Is there an easy way to do this, or should I just suck it up and add yet another global label array?

View 2 Replies

Flex :: Conditional Data Provider To Tree On The Basis Of List Selection?

Aug 1, 2011

This is my XML data in a file named nodesAndStuff.xml.

<?xml version="1.0" encoding="utf-8"?>
<root>
<node label="One" />[code].........

Now I have added my tree just below the list and I have saved counting from 10 to 19 in one.xml, 20 to 29 in two.xml and so on in different XML file. I have no clue how to connect the XML containing counting from 10 to 19 as the single node in tree at the selection of label one in list

View 1 Replies

Flash :: Dynamic MovieClip Selection?

May 15, 2009

If I have movieclips called "test1", "test2" and "test3" in the _root, I can use:

for(i = 1; i <= 3; i++){
_root['test'+i]._x = 100;
}

[code]....

View 6 Replies

ActionScript 2.0 :: Press TAB, The Selection Goes To Another Movieclip?

Apr 17, 2009

when i press TAB, the selection goes to another movieclip, instead of the next text field.i read a lot of threads, but could't fix this bug,

so far (after lots), i got this code:
[AS]
var textAR:Array = ["nome_txt", "contacto_txt", "email_txt", "morada_txt", "pais_txt"]
var textCounter:Number = 0
Selection.setFocus(textAR[textCounter]])

[Code]...

View 1 Replies

IDE :: CS4 Jsfl - Fl.getDocumentDOM().selection Doesn't Retain The Selection Order

Nov 11, 2010

I never realized that fl.getDocumentDOM().selection doesn't retain the selection order... <sniff>. I was hoping to build relationships based on the order. I guess I took if for granted that tools like Maya and Max store the selection buffer in order of what was selected. I'm trying to avoid: Select Object, <Press 'Parent' Button>, Select Parent, <Press 'Parent' Button>

View 2 Replies

ActionScript 2.0 :: Selection.setFocus Selection.getFocus Inputting From Mc?

Sep 6, 2007

i am attaching a number of _mc (my_mc) with a for loop. Inside each my_mc is an input textfield (my_txt)I want to click on my_mc.my_txt and select the textfield .the following code allow this and i can enter text from the keyboard however I want to add text from a _mc keybooard on screen (here called myBtn_mc).As soon as I click on myBtn_mc of course I lose focus ... i have tried to use a variable (select) to keep scope&focus

View 6 Replies

ActionScript 1/2 :: Bitmap Data Can't Draw MC With FLV

Aug 1, 2010

I've created a prototype that will copy the pixel data from a movie clip then create a JPG image from it via PHP. It works perfectly. But when the MovieClip (called mcImage) contains a Video Object loaded with a streamed FLV, it won't copy the pixel data to the Bitmap object. The image generated is white. Here's a sample code:
 
var oBitmap:BitmapData = new BitmapData(nW, nH, true);
var oMatrix = new Matrix();
var oColorTrans:ColorTransform = new ColorTransform();

[Code].....

View 4 Replies

Professional :: Displaying A Bitmap Data?

Oct 24, 2011

i did a function the captures the stage and save it to bitmap datai want to display that bitmap data on a different frame what code should i do (the bitmap changes becuse the capture function triggerd alot);

View 3 Replies

Php :: Send Bitmap Data From Flex

Aug 5, 2010

I want to save a screenshot from my Flex app on the Webserver (LAMP). Here is the Flex code:

[Code]...

View 1 Replies

ActionScript 3.0 :: Any Way To Crop Bitmap Data?

Mar 1, 2009

Is there any easy way to crop my BitmapData without converting it to Bitmap (I only want the first 300x200 pixels).

View 9 Replies

IDE :: Putting Bitmap Data To The Stage?

Dec 16, 2009

I have made a little drawing program for my daughter, and I have worked in the ability to save and load images that you have made. It's a simple line drawing thing, but she's 3, and it works.Whatand I'm still new with Flash and AS3) is that I can "addChild" to put the jpeg on the stage, but it's on (or over top of) the drawing area. That means that when I start to draw, I don't really add to the picture, instead, it's drawing behind it. I used the line drawing tutorial as the basis for this little app, the basic code is :

Code:
public function DrawMain(){
graphics.lineStyle(theLine,0x000000); //default to black lines

[code]....

View 2 Replies

ActionScript 3.0 :: Converting MovieClip Containing MovieClip To Bitmap?

Jan 4, 2012

If I have a MovieClip, containing several MovieClips inside, how can I convert this scene to Bitmap, without converting every element individually?

View 2 Replies

ActionScript 3.0 :: Capturing Bitmap Data In FullScreen

Jun 19, 2009

I am trying to do an image capture while in full screen, however the full image area is only partially captured, or the coordinates are off. In the source files you will see a few of my attempts commented off.

View 6 Replies

ActionScript 3.0 :: Erasing A Circle From Bitmap Data?

Sep 29, 2009

I'm trying to create sort of an eraser to remove sections of a bitmap on stage.

I have achieved this by creating a MovieClip in flash that is a circle and exporting it as a Class called Hole.

Now I use this MovieClip to erase a circle section of the image using the following.

var mat = new Matrix();
var ct = new ColorTransform();
var hole = new Hole();
mat.translate(x,y);
image.draw(hole, mat, ct, "erase");

Now what im trying to do is scale the size of the circle depending on a certain variable but no matter what I try the scale doesn't seem to change and. The size seems to stay the same as I drew it in Flash. I tried adding the following line

hole.width = hole.height = size;

I even created a class file called Hole and the size as a parameter

var hole = new Hole(200);

This didn't work either it still appeared to have the same size. I have even tried altering the scaleX and Y values with no success.

View 2 Replies

ActionScript 3.0 :: Remove A Bitmap Data From A CanvasBitmap?

Jan 25, 2010

I am adding a bunch of bitmap data (images) inside a canvas bitmap (using copyPixel) which is added to the stage (addChild(cavasBitmap)) how can I remove a bitmap data from a canvasBitmap?

View 5 Replies

ActionScript 2.0 :: Webcam - Bitmap Data Capture Every 5 Min

Sep 24, 2010

I have to take a snapshots form my webcam every 5 minutes. Now my script is whit a button and its working but my file have to take the picture alone and then again whitout button to send them? I saw something on the net but when I try to do it its not working.

View 1 Replies

Actionscript 3 :: Flex - Get The Bitmap Data From A Component

Jan 18, 2010

Is it possible to get the bitmap data from a component using ActionScript? I dynamically load an image. onComplete I create a Flex Image component and add the loaded image to the source

[Code]...

Later I want to create a new Image component and get the bitmapData from the first Image. I have tried this canvas.getChildAt(0) Which seems to give me the Image, but I can not figure out how to get the bitmap data. canvas.getChildAt(0).bitmapData; gives me a compile error "... undefined property" how ot get the bitmap data so I can use it in my new Image component?

View 3 Replies

As3 :: Upload Bitmap Data To Server Using HttpRequest?

Feb 23, 2010

I captured screenshot of my ui element, and would like to send it to server, using httpService.

Currently I am doing the following:

var httpService:HTTPService = new HTTPService();
httpService.method = "POST";
httpService.url = "/admin/compositions/add/";

[Code].....

View 1 Replies

Flash :: Bitmap Data As Movie Clip?

Apr 13, 2010

I import my images with

imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
imageLoader.load(imageRequest);
and then try and cast as a movieclip:

[code]....

View 2 Replies

Actionscript 3 :: Extract Bitmap Data From An Flv Stream?

Jan 17, 2011

extract bitmap data from an flv stream?

View 2 Replies

Actionscript 3 :: Creating Reflections Using Bitmap Data?

Oct 14, 2011

Can anyone point me to demos or source code for creating reflections in actionscript? I want to create the effect of an object sitting on a reflective surface.

View 2 Replies

ActionScript 3 :: Most Common Color In Bitmap (Data)

Mar 26, 2012

I would like to extract the most common color of a bitmap. My first idea was to do this by looping through the bitmapData and extracting every pixel color and storing it in an array. But the function has to be as light as possible so my question is; Is there a more lightweight approach to achieve this? The function is used to extract background color of a Bitmap.

View 4 Replies

ActionScript 3.0 :: Send Bitmap Data Via Localconnection?

Aug 4, 2009

I am working on somethign at the moment which allows a user to use a local connection to send and receive bitmap data. But I am havign a slight problem. Ok so at the moment I am using code from the bytearray live jpeg encoder to encode bitmap data as jpeg and then send it on to another swf opened at the same time when I click on an mc in the send swf.

So here is my code:

ActionScript Code:
// CODE INSIDE OF SENDER
var localConnection:LocalConnection = new LocalConnection();
import asfiles.encoding.JPEGEncoder;

[Code].....

But what ends up happening each time is that it seems to draw only the bottom right quadrant of the mc I am targeting. As shown by the screenshot I have provided. When the user clicks the first of the blue buttons it should send the whole bitmap.

View 4 Replies







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