ActionScript 2.0 :: Image Resize Before Uploading Using Flash?
May 8, 2008That is my client need's before image uploading he need's to resize the image size....for saving a band width..
View 2 RepliesThat is my client need's before image uploading he need's to resize the image size....for saving a band width..
View 2 RepliesAfter browsing for the images, and selecting them. How can I display a preview of the image in the datagrid? I am able to display the file name, file size, but was unable to display the image. Below are the codes I have written, it is not a complete code but just enough to make it understandable.
// variables used
var list:Array = new Array();
var listDP:Array = new Array();
[Code]....
i am currently creating a software, i need to upload images form my HDD to server. i can do this with FileReference Object. with this code i can select file.
var f:FileReference;
f.browse(); // for selecting file (object)
and after that i will send that FileReference object to a PHP file and i upload via that PHP file.
but i want to upload file without using FileReference Class i am using File Class on Air 1.0 on Flash, and that class can provide full url of image from my HDD like: D:My Documentsimage01.jpg
there is any way to upload this file on my HDD to server without using browse() class for selecting file on Flash with PHP?
or is there one way to convert File Class (AIR) to FileReference?
I'd upload an image choosen by the client, but I want to wrap it in a movieclip in order to manipulate its size and color with color transform. How can I do it? (AS3 in Flash 10)
[Code].....
I currently have it working so it displays a dialogue box to save the image on your computer:
if (isset($GLOBALS["HTTP_RAW_POST_DATA"]))
{
// get bytearray
[code]....
I need to upload an image to a SWF, however I can't use ActionScript for it because the client wants drag-and-drop capability. I figure that I can make the upload button cause a popup, where there is JavaScript for drag-and-drop. The SWF allows for some photo manipulation, so the image needs to be uploaded, and be in the SWF for that use. how can I make that image accessible to the SWF file?
View 1 RepliesActionscript:
System.security.allowDomain("http://" + _root.tdomain + "/");
import flash.net.FileReferenceList;
[code].....
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?
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 RepliesThat script below is for uploading an image via PHP. Now I'ld like to give the user the option to cancel the upload. How to cancel the PHP request once it got send?
package
{
import com.adobe.images.PNGEncoder;
[Code]....
I asked a similar question before but didnt get a definite answer! Basically I just want to know if its possible to have a standalone SWF file which allows the user to browse there computer and load an image into the SWF to view it (in AS2)? Ive researched this FileReference class but it seems that requires servers and what not. I only want to upload the image to the SWF, not to an external server?
View 2 RepliesI'm looking for some flash based plug-in which allows me to display an image as soon as the user selects it in the file dialog.I looked at swfupload but couldn't find any way to display the image selected.. no handle on file path or contents as far as I could find.
View 1 RepliesFor the past few hours I've been trying to figure out a way to add a watermark to an image file before uploading it using the FileReference.upload(); method. The uploading works already. I just have to figure out how to get a small watermark (PNG image with alpha-transparency) on the lower right of the image file. Another thing is, I don't want to modify the source file. I just want to add the watermark on upload.
What approach would you recommend for this type of setup? I also can't seem to find any pre-made classes already that I can use for this certain thing. Is this not a very common task? And no I can't use server-side (PHP) to do the watermarking because I'm communicating directly to a service's API, not through my server.
I am writing an app for android devices, it uses the CameraRoll class to retreive images from the gallery. It then catches the raw bytearray data and encodes it into a base64 string, then sends the string via httppost to a server that decodes the string and saves the file.Every part of this is fine except one detail, the images are corrupt when they are saved on the server. Except one thing that makes things weirder, when I load these corrupt jpg images into a flash app they work just fine.Previously I have made apps that uses the Camera class to take photos in the app, and this works fine, the reason I am using cameraroll is because I want to be able to get high quality images, which is not possible using the regular camera -> bitmapdata.draw -> jpegencode -> send method.The code is basically thi
ActionScript Code:
//mediaevent select is triggered
var loader:Loader = new Loader();
[code].....
I have a psd that is the background image on a site im creating, when i test the movie it looks fine however when i upload it to the ftp the text looks jagged.
[URL]
If you look on the edges on the cost of love logo you'll see what i mean.
I've developed a Flash quiz app for facebook, which calls for a php script silently upon completion. The php script's function is to generate an image from the POST data sent by the flash, and then post it to the user's wall.That would be all neat and dandy, but for some reason the image never gets uploaded, probably because when i call it, it's like [URL] and the facebook SDK script inside gets an Oauth error, probably because it is not embedded in their canvas.
If I'd like to have my php script generate an image and upload it to the fb wall, then how should I call it from the flash?This is the AS2 code I'm using currently:
callRemoteFile = function(ourVariable:Number) {
var result_lv:LoadVars = new LoadVars();
result_lv.onLoad = function(success:Boolean) {
[code]....
If I simply navigate to the php with my browser it giver me this:
Fatal error: Uncaught OAuthException: Invalid OAuth access token signature. thrown in /home/a01223445/public_html/appfolder/base_facebook.php on line 1039
If I view the same php through facebook canvas it works perfectly. My problem is: The canvas will show the flash and I want the php to silently be evaluated while the flash is running.
I am building a form builder in Flex 4.5. For that I need help regarding uploading image at runtime such that any user can just simply place cursor on particular location on image and is able to upload any image from the local file system.
View 2 RepliesWhy is it image is not uploading when im running on swf version, but image uploading works when im running the exe version of the flash project? And how can i add a progress bar to check if the image is uploading or not? Oh yeah, im new at actionscript so please go easy on me. anyway here's the code.
Code:
import com.adobe.images.JPGEncoder;
var jpgSource:BitmapData = new BitmapData (container_mc.width, container_mc.height);
jpgSource.draw(container_mc);
[code]....
And how can i say to image_mc to load the jpeg at the center of image_mc's axis. So that when i flip the image, the image will flip vertically at the center?
is it possible to upload an image from local computer to online flash application, but without actual uploading it to a server, just in memory. Need to load picture, make some manipulations, print it from flash and forget.thrashing the server with loads of photos is worst scenario.
View 5 Repliesi am trying to have flash read an image and resize it if it doesnt fit..it works fine when the image gets scaled down.but when the imaged gets scaled up the imaged gets rotated (which is what i am trying to get fixed)i have attached the fla file (but w/o it linking to an image or an image attached) or you can just look at the code.[code]
View 1 RepliesI 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 RepliesI have this document in flash where I want an image to pan with mouse movement. When I test the movie it runs ok with any problem. But when I resize the window the position of the big image, it goes all wrong. I'm going crazy with this. Any help? I'll leave the link here so you can see the .fla document.
[URL]
And here is the code (Actionscript 2.0)
var boundX:Number = bigPic._x+activator._x*(bigPic._width/activator._width);
var diffX:Number = bigPic._width-activator._width;
var easeSpeed:Number = 7;
[code]....
Just wondering if anyone knows how to auto-resize an image in flash/xml. I have a flash slideshow that is loading an external xml file with images, but would like the images to appear no larger than a certain size in flash. I'm not really sure if it would be better to do this in flash or in the xml file. I have tried setting a fixed width and height within the xml file with no luck (it is still displaying the image at its original size in flash).
View 5 Replieswanting to upload an image (gif probably) from the dynamic content of a specific movie clip within a swf file.
View 1 Repliesi am currently working with flash based fashion website. here i am uploading large image and thumbnail from xml. i also have menu navigation at top. my code structure is detail below:
[Code]...
my problem here is like i have home button with 5 thumbnail and handbags with 2 thumbnail when i click home button will display 5 thumb with large image and again when i click hangbags buttom it will display 2 thumb which is what i want but 5 home thumbs keeps on remain at back. dont know how to remove them upon new button click
I am new to AS3.0 and I am starting to create an application using flash. I always get an error:
TypeError: Error #1034: Type Coercion failed: cannot convert "uploader.php" to flash.net.URLRequest.
at ieditor_fla::MainTimeline/uploadCurrent()
Not loading the images for a little info bar at the bottom. It works if you view a folder, however it doesn't work when you just view the main images. I am tracing it, and it traces great, just doesn't want to work.
View 1 RepliesI want make a image up-loader in flash.i will call to Ajax to upload image, AJAX check for flash re sizer and it re size image using flash re sizer and upload on sever.please any body can help me how i can re size image in flash before upload on server.
View 2 RepliesAm struggling to find the right as3 code to resize an image once it is dynamically called into the stage and placed in a MC. I am loading using:
var myLoader :Loader = new Loader();
mc.addChild(myLoader);
var url :URLRequest = new URLRequest("myimage.jpg");
myLoader .load(url );
The stage will eventually open up into fullscreen (works ok) so I need to keep the image in its original size which is much bigger than the stage. What I need to do is shrink it on loading to the same height as the stage whilst keeping the width in proportion (oh and center it). I have tried all sorts of codes but cant find anything to work as all I have managed to do is resize the MC containing the image but NOT the image itself.
[URL]This swf object load an external xml file (generated by php script which doesn't locate on the same machine) and then display the product list (thumbnail and title). The script was tested working fine on my local machine, but when updating to the hosting, the images don't resize. At the first i thought that it's hosting performance issue, so i migrated it to amazon s3, but it still doesn't work.
View 2 Replies