Question about Computers & Internet

4 Answers

Image crop want to made in flash

Image cropping by Action script2.0 , how i can do or any link through this possible

Posted by on


4 Answers

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 1 Answer

Class ImageViewer { // The movie clip that will contain all ImageViewer assets private var container_mc:MovieClip; // The movie clip to which container_mc will be attached private var target_mc:MovieClip; // Depths for visual assets private var containerDepth:Number; private static var imageDepth:Number = 0; private static var maskDepth:Number = 1; private static var borderDepth:Number = 2; private static var statusDepth:Number = 3; // The thickness of the border around the image private var borderThickness:Number; // The color of the border around the image private var borderColor:Number; // The MovieClipLoader instance used to load the image private var imageLoader:MovieClipLoader; public function ImageViewer (target:MovieClip, depth:Number, x:Number, y:Number, w:Number, h:Number, borderThickness:Number, borderColor:Number) { // Assign property values target_mc = target; containerDepth = depth; this.borderThickness = borderThickness; this.borderColor = borderColor; imageLoader = new MovieClipLoader( ); // Register this instance to receive events // from the imageLoader instance imageLoader.addListener(this); // Set up the visual assets for this ImageViewer buildViewer(x, y, w, h); } private function buildViewer (x:Number, y:Number, w:Number, h:Number):Void { // Create the clips to hold the image, mask, and border createMainContainer(x, y); createImageClip( ); createImageClipMask(w, h); createBorder(w, h); } private function createMainContainer (x:Number, y:Number):Void { container_mc = target_mc.createEmptyMovieClip( "container_mc" + containerDepth, containerDepth); container_mc._x = x; container_mc._y = y; } private function createImageClip ( ):Void { container_mc.createEmptyMovieClip("image_mc", imageDepth); } private function createImageClipMask (w:Number, h:Number):Void { // Create the mask only if a valid width and height are specified if (!(w > 0 && h > 0)) { return; } // In the container, create a clip to act as the mask over the image container_mc.createEmptyMovieClip("mask_mc", maskDepth); // Draw a rectangle in the mask container_mc.mask_mc.moveTo(0, 0); container_mc.mask_mc.beginFill(0x0000FF); // Use blue for debugging container_mc.mask_mc.lineTo(w, 0); container_mc.mask_mc.lineTo(w, h); container_mc.mask_mc.lineTo(0, h); container_mc.mask_mc.lineTo(0, 0); container_mc.mask_mc.endFill( ); // Hide the mask (it will still function as a mask when invisible) container_mc.mask_mc._visible = false; } /** * Creates the border around the image. * * @param w The width of the border, in pixels. * @param h The height of the border, in pixels. */ private function createBorder (w:Number, h:Number):Void { // Create the border only if a valid width and height are specified. if (!(w > 0 && h > 0)) { return; } // In the container, create a clip to hold the border around the image container_mc.createEmptyMovieClip("border_mc", borderDepth); // Draw a rectangular outline in the border clip, with the // specified dimensions and color container_mc.border_mc.lineStyle(borderThickness, borderColor); container_mc.border_mc.moveTo(0, 0); container_mc.border_mc.lineTo(w, 0); container_mc.border_mc.lineTo(w, h); container_mc.border_mc.lineTo(0, h); container_mc.border_mc.lineTo(0, 0); } /** * Loads a JPEG file into the image viewer. * * @param URL The local or remote address of the image to load. */ public function loadImage (URL:String):Void { imageLoader.loadClip(URL, container_mc.image_mc); // Create a load-status text field to show the user load progress container_mc.createTextField("loadStatus_txt", statusDepth, 0, 0, 0, 0); container_mc.loadStatus_txt.background = true; container_mc.loadStatus_txt.border = true; container_mc.loadStatus_txt.setNewTextFormat(new TextFormat( "Arial, Helvetica, _sans", 10, borderColor, false, false, false, null, null, "right")); container_mc.loadStatus_txt.autoSize = "left"; // Position the load-status text field container_mc.loadStatus_txt._y = 3; container_mc.loadStatus_txt._x = 3; // Indicate that the image is loading container_mc.loadStatus_txt.text = "LOADING"; } /** * MovieClipLoader handler. Triggered by imageLoader when data arrives. * * @param target A reference to the movie clip for which * progress is being reported. * @param bytesLoaded The number of bytes of target * that have loaded so far. * @param bytesTotal The total size of target, in bytes. */ public function onLoadProgress (target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void { container_mc.loadStatus_txt.text = "LOADING: " + Math.floor(bytesLoaded / 1024) + "/" + Math.floor(bytesTotal / 1024) + " KB"; } /** * MovieClipLoader handler. Triggered by imageLoader when loading is done. * * @param target A reference to the movie clip for which * loading has finished. */ public function onLoadInit (target:MovieClip):Void { // Remove the loading message container_mc.loadStatus_txt.removeTextField( ); // Apply the mask to the loaded image container_mc.image_mc.setMask(container_mc.mask_mc); } /** * MovieClipLoader handler. Triggered by imageLoader when loading fails. * * * @param target A reference to the movie clip for which * loading failed. * @param errorCode A string stating the cause of the load failure. */ public function onLoadError (target:MovieClip, errorCode:String):Void { if (errorCode == "URLNotFound") { container_mc.loadStatus_txt.text = "ERROR: File not found."; } else if (errorCode == "LoadNeverCompleted") { container_mc.loadStatus_txt.text = "ERROR: Load failed."; } else { // Catch-all to handle possible future error codes container_mc.loadStatus_txt.text = "Load error: " + errorCode; } } /** * Must be called before the ImageViewer instance is deleted. * Gives the instance a chance to destroy any resources it has created. */ public function destroy ( ):Void { // Cancel load event notifications imageLoader.removeListener(this); // Remove movie clips from the Stage container_mc.removeMovieClip( ); } }

Posted on Sep 22, 2008


How to identify image

Posted on Sep 01, 2008


How I can crop the uploaded image by action script2.0
Such as I upload an face image and now i want to cut the image as required, see example in

Posted on Jul 31, 2008

  • Level 1:

    An expert who has achieved level 1.


    An expert who has answered 20 questions.


    An expert that hasĀ over 10 points.


    An expert whose answer gotĀ voted for 2 times.

  • Contributor
  • 71 Answers

Could you give me more info plz

Posted on Jul 30, 2008

1 Suggested Answer

  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

A 6ya expert can help you resolve that issue over the phone in a minute or two.
Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
The service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
Good luck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%


Complete. Click "Add" to insert your video. Add



Related Questions:

1 Answer

I have just purchased a Lenovo A616 but cannot insert a picture into my contacts list. Has anyone any idea how to do this.

  1. Locate and display the contact's information.
  2. Edit the contact's information.Touch the Edit icon or, if it's unavailable, touch the Action Overflow or Menu icon and choose the Edit or Edit Contact command.
  3. Touch the icon where the contact's picture would go, or touch the existing picture assigned to the contact.
    When no picture is assigned, the icon shows a generic human image.
  4. Touch the Choose Photo from Gallery command.
    The option could be titled Select Photo from Gallery or just Gallery.
    If you have another image management app on your phone, you can instead choose the app's command from the list.
  5. Browse the Gallery to look for a suitable image.
  6. Touch the image you want to use for the contact.
  7. Optionally, crop the image.
    You can use the figure as a guide, though the cropping tool on your phone may look different from the one shown in the figure.
  8. Touch the Save button to set the cropped image.
    At this point, the image is cropped and set in the contact's information, but that information hasn't yet been saved.
  9. If necessary, touch the Done or Save button to finish editing the contact.
    The image is assigned, and it appears whenever the contact is referenced on your phone.
How to Add Picture to an Android Phone Contact

Jul 06, 2016 | Cell Phones

1 Answer

How can I crop a picture?

Download an efficient image software like Irfanview ( the area. Then Cntrl +Y to crop the image. Save the cropped image with a different name. > Siddhartha Basu, India

Jan 01, 2010 | Canon PowerShot A400 Digital Camera

1 Answer

The print shop is not cropping correctly. Once I have the image I want to crop ready and click on applty crop the image crops another area such as the feet of a person.

You have to choose area effects tab first, click on the area (aprox) where you are going to crop, then choose crop and orientation tab and do your croping. I don't know why it works like this, but this has solved the problem for me.

Jul 12, 2009 | Broderbund PrintShop Pro Publisher Deluxe...

1 Answer

Cropping and Saving an image

the Power Shot S-series cameras have been some of my favorite camaras..... The SX100 does not support the RAW image format, .... you can rotate and re size a photo, though you cannot crop it

May 05, 2009 | Canon PowerShot A75 Digital Camera

1 Answer

Command Action

Open - Window - Action. Click on arrow on top right. Create New Action name it, and record an action by cropping one of the images.
Go to File - Automate - Batch. And choose folder with images you want to crop.

Apr 05, 2009 | Adobe Photoshop 7.0 for PC

1 Answer


You cannot crop images and save them on a D200. Thats what the Nikon Capture and Nikon PictureProject software are for. Here is the Cnet review link:

You've made an excellent choice btw....

Jan 04, 2008 | Nikon D50 Digital Camera with 18-55mm Lens

1 Answer

Scanning Problem

Scanned image is unsatisfactorily cropped
You can turn auto-cropping off or adjust how the image is cropped.
To turn auto-cropping off:
From your desktop, double-click the Lexmark X6100 Series
All-In-One Center
The All-In-One Main Page appears.
2 Click See More Scan Settings.
3 Click Display Advanced Scan Settings.
4 Select the Scan tab.
5 Click Select area to be scanned, and then select a size from the
drop-down menu.
6 Click OK.
To adjust how the image is cropped:
From your desktop, double-click the Lexmark X6100 Series
All-In-One Center
The All-In-One Main Page appears.
2 Click See More Scan Settings.
3 Click Display Advanced Scan Settings.
4 Click the Scan tab.
5 Select Auto-crop the scanned item.
6 Slide the Tolerance bar to the left to crop less or to the right to crop
7 Click OK.

Dec 06, 2007 | Lexmark X6170 All-In-One InkJet Printer

2 Answers

Indesign Crop Mark and nudge

To crop or straighten images in Camera Raw
In the Camera Raw dialog box, select the Crop tool or Straighten tool .
(Optional) If you want the crop area constrained to specific proportions, click the Crop tool icon and choose a proportion from the pop‑up menu. Choosing Custom opens the Custom Crop dialog box, where you can specify the proportions or the dimensions of the crop. Click OK.
Do one of the following:
To crop the image, drag the Crop tool over the image.
To straighten the image, drag the Straighten tool in the preview image to establish what’s horizontal or vertical.
(Optional) To adjust the crop area, do one of the following:
To scale or rotate the crop area, drag just outside the bounding box handles.
To move the crop area, click in the bounding box and drag.
If you selected several images in the Camera Raw dialog box, they are all cropped to the same size, with the crop applied in the same position.
Note: To cancel the crop operation, press Esc with the Crop tool selected or click the Crop tool and choose Clear Crop from the pop‑up menu. To cancel the crop and close the Camera Raw dialog box without processing the camera raw image file, click the Cancel button or deselect the Crop tool and press Esc.
Click Open, Done, or Save to apply the crop and process the camera raw image file.

Oct 20, 2007 | Adobe InDesign CS2 for PC

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

835 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18424 Answers

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers

David Payne
David Payne

Level 3 Expert

14162 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides