header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
cf_flex
Points:240
Posts:0

8/5/2010 1:36:51 AM

Title: Image loader- progress bar


hi all,

in my application i am allowing to upload there images,while uploading i want to show a image and once the image is uploaded my pre-defined image should dissapear and the uploaded image should display.


please provide with the sample code/eg

thank u



1
Ronald
Points: 430
Posts:0
8/5/2010 1:58:22 AM



place two image components , In one image component display the loaded image and in the other one embed the image that you want to show temporarily.

Initially hide the temp image.
On starting upload set the temp image visibility to true, and hide the upload image component and on the complete event of the uplodImage container set the temp image visibility to false

2
cf_flex
Points: 240
Posts:0
8/5/2010 4:49:26 AM



Thanks Ronald,

it didn't work,actually i want to show a progress bar when the user image is uploading.

any idea about this,
thanks

3
Davis
Points: 780
Posts:0
8/5/2010 5:16:30 AM



use the progress event in the image loader to get the progress of data loaded and you can show the progressbar using that data

4
Brad
Points: 750
Posts:0
8/5/2010 5:31:02 AM



simplest way to show progressbar on an image loading is to use the flex inbuilt progressbar control. Its quite easy to use see this example in flex with actionscript 3.0


<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
	<mx:Script>
		<![CDATA[
			public function showImage():void {
				//load image into image component
				imageCom.load('myimage.JPG');
			}
		]]>
	</mx:Script>
	<mx:VBox width="600" height="600">
		<mx:Canvas>
			<mx:ProgressBar width="200" source="imageCom"/>
		</mx:Canvas>
		<mx:Button id="myButton" label="Show Image" click="showImage();" />
		<mx:Image id="imageCom" height="500" width="600" autoLoad="false" visible="true" /> 
	</mx:VBox>
</mx:Application>



Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 8+3 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions