ActionScript 2.0 :: Upload Image To A Movieclip, Then Drag And Resize?

Jun 11, 2007

I need to make a form that allows the user to upload an image from their own computer, then dump that loaded image into a movie clip, and allow them to move it about on stage, and possibly scale it. I have the upload function working, it allows me to select a file, and i have the server side php to dump the images on the server, but im not sure how to go about dumping the image in the movie clip after the usser has selected and uploaded it. Ive found stuff around the net that dumps the file into a scroll pane, but im not really sure how to modify the code to work with a movie clip. I think dragging and resizing will be cake after that, because theyre functions ive used before. But i just cant seem to get past this upload hurdle.

View 4 Replies


Similar Posts:


ActionScript 3.0 :: FileReference - Resize Image During Upload?

Jan 23, 2011

I would like to automatically resize an image uploaded through fileReference if the image is larger than the movieclip. The movieclip is 500x400 pixels.Here is my code.

The movieclip where the image will load is called "upload_area"

Code:
var fileRef:FileReference= new FileReference();
btn_upload.addEventListener(MouseEvent.MOUSE_DOWN, onDown);
function onDown(evt:MouseEvent):void{

[code]....

View 3 Replies

ActionScript 3.0 :: Drag And Resize Rectangle MovieClip

Jun 14, 2011

I would like to add the ability to resize a rectangle movieclip, plus have the ability to drag it horizontally. I have the horizontal drag code working, but I am not sure how to add the ability to grab the ends and resize it.. There are a lot of these bars on screen, so I am adding listeners in a loop:

this["box" + i].addEventListener(MouseEvent.MOUSE_UP, dropIt);

I imagine I need to add 2 movieclips to each rectangle to allow for resize handles, but I'm not sure how to refer to them or initalize them...Here is a pic of what I am looking to accomplish.

View 10 Replies

ActionScript 2.0 :: MovieClip - Control Resize With Mouse Or Single Click / Drag

Jan 20, 2010

I'm pretty new to Flash and seem to be struggling with variable scope, events and where to put code within movieclips/main area etc. What I'm trying to do is produce a Flash movie that will allow the user to click on a tool from a selection, i.e. a circle, then click on another part of the screen to place the centre of the circle, with a second click to set the radius of the circle (an alternative would be a single click and drag to place the circle and drag it out to the desired radius.) Once the mouse if clicked a 2nd time, or the drag operation is completed, the circle will stay at the selected radius.

The code I'm using so far to test out the idea is below:
_root.onEnterFrame=function(){
_root["item1"].onMouseMove=function(){
d = Math.sqrt(Math.abs(_xmouse-this._x)*Math.abs(_xmouse-this._x)+Math.abs(_ymouse-this._y)*Math.abs(_ymouse-this._y));
if(d<370){
this._width = d*2;
this._height = d*2;
}else{
this._width = 87;
this._height = 87;
}}}

This uses a simple circle movieclip, and the above code is placed in Frame 1 of the background as opposed to the movieclip itself. It resizes the circle movieclip ok, but I want to be able to control the resize with the mouse or with a single click/drag.

View 10 Replies

ActionScript 3.0 :: Upload Image Into Movieclip?

Jun 2, 2011

I am trying to upload an image into a movieclip on the stage. either using PHP or anything else...

is there any working tutorial that I can follow? I found a couple of tutorials on google but none of them working!!

View 7 Replies

ActionScript 3.0 :: Save And Upload Movieclip As Image?

Mar 28, 2012

I have been using [URL] to create an flash file that creates a picture of an movieclip. But this only allows me to download the image from the flash, not upload it to a ftp server and to a database. The php file looks like this

<?php switch ($_POST[format]) { case jpg: header(Content-Type: image/jpeg); break; }
case 'png':
header('Content-Type: image/png');
break;
if ($_POST[action] == prompt) { header(Content-Disposition: attachment; filename=.$_POST[fileName]); }
echo base64_decode($_POST[image]); ?>

and I want the function if ($_POST[action] == prompt) to upload the image to an ftp and a database?

View 7 Replies

ActionScript 3.0 :: Import Image Into Movieclip From User's Harddrive Without Upload To Server

Feb 12, 2010

Basically im building a flash based drum head designer for users to upload their own image, resize, add text etc, then it be uploaded to a web server when they complete the purchase.

I have all the server side part working, able to send a 2800px square image and compress it into a 1.5MBish jpg.

the problem im having is for the user to upload an image into flash. I've seen prototypes where it uploads the image to the server, then flash loads that image, then upoads the completed one, but this uses alot of transfers.

What I hoped to achieve is something similar to the system on the [URL] website where the image is stored in the cache first. I have spent hours looking for resources on importing user images into flash without uploading first.

View 2 Replies

ActionScript 2.0 :: Resize Image/movieclip In Flash?

May 15, 2011

I have been looking for a way to create an effect like this in Actionscript 2.0.Like thisThe application above is in AS3 and I am trying to create that effect in AS2!anyone knows how we can achieve that so the users can re-size the images via handles around the images inside the flash? or maybe re-size a movie clip with handles like that?

View 4 Replies

ActionScript 2.0 :: Resize A Movieclip Once An Image Has Downloaded Into It

Apr 13, 2010

I've been trying to get this to work for a few days and uploaded a simplified version. Basically I need to download an image which could be any size and then resize it. To illustrate this I've placed a large file on my server which is to represent someone loading an image. Unfortunately, in real life, I won�t know the size of the image someone will choose, so I need to resize it. I've included a resize button which works. Unfortunately I won�t be able to add an extra button, so I've added a listener to detect when the file has finished

View 2 Replies

Actionscript 3 :: Change Single-image Upload Into Batch Upload?

Feb 28, 2012

EDIT: Reworked my code a bit and decided to throw out URLLoader in favor of the ile.upload() method.Now I'm stuck again >_<Here's the code I currently have, stripped down to bare-bones:When I drag-drop image files onto my app, here is the trace log that gets returned to me:

[object Document] called.
doDragEnter() called.
doDragDrop() called.

[code]......

View 2 Replies

Actionscript 3.0 :: Resize Images Before Upload?

Jan 7, 2009

I am creating an upload tool for an image gallery. The swf uploads the files with filereference to a php files which resizes the images. But when the images are larger than 600kb it fails, php runs out of memory and I can't edit the php.ini file on the server.

So my solution is to resize the images before uploading them, this saves also bandwidth.

View 14 Replies

ActionScript 3.0 :: Scale Or Resize The Image By Dragging And Resize Option?

Sep 19, 2011

I am working on image and i like to scale or resize the image by dragging and resize option.same working as "free transform tool" in flash (design part); i need same functionality in application.

View 7 Replies

Jquery :: Flash - Looking For Plugin That Resize Images Before Upload?

Feb 11, 2010

i'm looking for a jquery plugin that can upload multiple images.I've tried uploadify and it works well.But with huge images it's very slow

View 5 Replies

Php :: Do Sites Like Facebook Resize Images Before Upload To Save Bandwidth

Jul 18, 2011

Do sites like facebook resize images before upload to save bandwidth?... or do they just get resized remotely, beause when i try and do it using gd library i have the problem that images wiht large dimenions timeout, whatever memeroy limit i set..

View 4 Replies

Flash :: File Upload Via Drag And Drop?

Jul 18, 2011

I need to be able to have a user drag multiple images from the locate file system onto the flash/flex/html5 app which will then taker the file name details and contact the server.Upon server response then upload the file ( assuming server validation passed ).I know this can be done in Java but that is not an option.Please do not suggest the FileReference.browse function as the retouchers are to stupid(no joke here) to use this and it has to be drag and drop.This has to work with all current versions of the popular browsers( hrome,FireFox,IE,Safari)What it comes down to is I want to put an image up on the web page stating drop here and allow them to upload the file(s) by dropping on it.

View 3 Replies

ActionScript 3.0 :: Drag And Drop - Click On The Image ,one Can Hold Down The Mouse And Drag A Copy?

Nov 13, 2010

I want to have an image and when I click on the image ,one can hold down the mouse and drag a copy to where ever on the stage and when one lets go, one can drag another and another with each copy still being able to be dragged after released.this is what i have but its pretty simple and doesn't work....

stage.addEventListener(MouseEvent.MOUSE_DOWN,makeA Box);
var i:Number = 1; //i will be the total number of boxes
var newBox:myMC = new myMC();[code]....

View 3 Replies

Flex :: Drag And Drop Photos From Desktop Web App To Upload Them?

Oct 28, 2010

I use Flex 4 wish I can let users drag/drop photos from their computer to the web app to upload them automatically.

View 2 Replies

ActionScript 3.0 :: Upload Image From Flash And Generate Xml For Image Gallery?

May 22, 2009

Just wondering if anyone knows about the project I am trying to start, uploading images from flash using php is fine but wondering if anyone knows how to create dynamic xml from php and it takes all the image names from the same folder where those images have been uploaded. So we can load all the images in image gallery through xml into flash.

View 5 Replies

Java - Upload Image Thumbnail To Server Without Uploading Whole Image?

Aug 27, 2009

As far as I know, what I ask here isn't possible, but I thought I'd ask anyway in case I'm missing something.

Suppose you want to let users upload JPG images, and these images are scaled into smaller icons and the original images are always discarded and never required again. Is there any way that would commonly work in most modern browsers that would let the user select a single image on their hard drive, have that LOCALLY turned into a thumbnail and upload the created thumbnail to a server?

In a case where the server just needs a small image, it would be wasteful both in user time and server resources to proceed uploading the whole image, only to immediately discard it. It would be much better to just scale it on the client.

I can imagine three options. Just plain HTML/Javascript, using Flash or using Java. If this were possible with Flash, that would seem like the best option. But reading flash.net.FileReference documentation, it seems that you can upload a file from the HD yes, but you cannot look inside the file you are uploading. On the other hand, if you enable "can access local files" in Flash publishing options, it seems that you can then no longer access the net, so that doesn't work.

With HTML/Javascript, it is possible to load images and display them on a <canvas>, but if you try to access the pixels of these images, you get security violations, so that doesn't seem to work.

Java I hesitate to use, because only 96.52% of my users have it installed, and the file upload dialogs I have seen implemented in Java (at Facebook for example) have not worked well (unresponsive interface). I wonder though if Java is the only thing allowing resizing images from local HD?

View 5 Replies

Javascript :: Agile Uploader (resizes Image Before Upload On The Server): Doesn't Work If Image Name Has Cyrillic Letters

Jan 31, 2012

I'm using Agile Uploader in my project to resize image before upload on client side.And it works fine except one thing: if image name contains cyrillic letters it fails with server error 500.

How to avoid this or if needed how to rename file with english letters "on fly" (possibly with javascript).

View 1 Replies

Actionscript 3 :: HitTestObject / StopDrag Stops Drag On Two Movieclips Even Though Function States One Movieclip To Stop Drag

Apr 27, 2011

I have a function that states when movieclip1 is dragged and hits a line then it stops the drag, however it seems to stop the entire drag function in the swf on the other movieclips even though they arent called in the function.[code]

View 1 Replies

ActionScript 2.0 :: Drag+Drop Then Resize Symbol (MX)?

Feb 27, 2006

I'm dragging a symbol that has been reduced in size, I'm dropping that symbol and I then want the symbol to resize itself, basically return to it's 100% h+w.

The dragging and dropping is no probs and I'm sure the resize would be setting some sort of symbol property value or something

View 21 Replies

ActionScript 2.0 :: Resize An Item (a Vector Square Or Such) On Drag?

Oct 24, 2006

how to resize an item (a vector square or such) on drag? In other words, I want to click a side and drag that side having it resize. Sort of like WACK [URL]

View 1 Replies

ActionScript 2.0 :: Resize LoadClip Image - Return 0 When The Image Loaded Is Obviously Much Larger Then 0 Pixels

Dec 13, 2007

Some images I load dynamically are too big so I would like to scale them to fit the stage.

[Code]...

this returns 0. Why does it return 0 when the image loaded is obviously much larger then 0 pixels. How do I change the width and height of imgCont to a specified dimension.

View 1 Replies

ActionScript 2.0 :: Drag And Drop Resize And Scale Movie Clips On Stage?

Jun 25, 2010

'i am doing a game for children where users can drag and drop resize and scale movie clips on stage!The drag and drop is not an issue...

View 2 Replies

ActionScript 3.0 :: Add A Visible Border To The Image That Allows To Resize The Image

Mar 19, 2010

i am building an editor which allows you to resize images and to do this (once an image is selected) I add a visible border to the image that allows you to resize the image. so i want to have a function something like,

[Code]....

and i have to call this redrawborder function inside the MOUSE_MOVE listener that controls the resizing (so that i am constantly removing and redrawing the border). constantly removing and redrawing the frame seems very inefficient. is there some property or better why to do this? i want to have, displayobj.scaleChildren = false or something like that

View 1 Replies

Flex :: Place An Image By Dragging And Placing It In The Drag Proxy Image Position

Mar 23, 2010

I found examples in adobe site only to position the object where the mouse pointer is. But i have to place the image in the position of drag proxy image.

View 1 Replies

ActionScript 3.0 :: StartDrag And Bounds - User Will Be Able To Drag The Image, As Long As The Edges Of The Image Doesn't Show?

Jan 19, 2011

I have an image on the stage which is bigger than the stage itself:

The stage is 700x550

The image is 2100x1650, and it's registration point is at its center, if I remember correctly.The initial location of the image on the stage is 350,75.I want to make sure that the user will be able to drag the image, as long as the edges of the image doesn't show.here's what I did:

mapRect = new Rectangle(0-mapMC.width/2, 0-mapMC.height/2, mapMC.width, mapMC.height);

and later on:

mapMC.startDrag(false,mapRect);

The the top and the left of the image are bounded well, but as far as the bottom and the right side of the image.

View 1 Replies

Professional :: Drag A Slider To Reveal An Image Underneath Another Image

Oct 6, 2010

What i want is: A slider that can be pulled by the user across an image to reveal a second one underneath. The same as this example, only I want a vertical scroll button not a horizontal. [URL]

View 7 Replies

Upload Image Into SWF?

Aug 27, 2009

I'm at that awkward point in Flash authoring where I know the basics, have tackled only a few of the intermediate issues, and have been assigned a task that seems a bit daunting. I did my fair share of googlin, and searching on these forums and haven't found what I'm looking for.I've created a simple drawing program in flash before, but what I need to add is the functionality to upload a user image and crop/resize it. Does anyone here have a link to an article that will explain a bit about flash's jpg manipulation abilities?

View 2 Replies







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