Greetings,
I’ve just taken a crash course in AS 3.0 and am in the midst of creating an application that allows users to create a custom layout by uploading one image and then adding text all within an user interface. I’ve be able to successfully upload the image data (whether to the server or the actual flash app, I cann’t tell) using the fileReference class. This allows the user to browse via fileReference.browse() and then I call the fileReference.upload(urlRequest) which calls a php script on the server via the URLRequest class. This is doing something because I’ve traced it out and get back all the image info(name, type, size) after it’s loaded to the movie. But this is where I get stuck.
The FileReference class doesn’t appear to me to have anyway of translating that data to a Display Object to add to the stage via addChild().
I’ve also successfully loaded an image via the Loader class in conjunction with fileReference.browse() and then turn this into a Display Object, but it doesn’t allow me to select and upload anything outside the directory where the .swf file is located. I can’t get a full URL to attach from the FileReference.browse() method, only the immediate name.
My dilemma is this: the FileReference.upload() and the Loader.load() methods both appear to be doing half of what I need them to. With FileReference.upload() I can successfully upload from anywhere on my hard drive, but do not know how to display the image that it accesses. With Loader.load() I cannot get it to upload from anywhere on the hard drive except for the immediate directory where the .swf file is located, because i can only access the immediate file name via FileReference.browse().
Thanks in advance,
Brent