Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 10-25-2007, 01:59 PM   #1
tarafenton
Tara Fenton
 
Join Date: May 2005
Location: Brooklyn, NY USA
Posts: 346
Send a message via AIM to tarafenton
Default loader height and width

Hello,

Is it possible to change the height and width of a jpg image that was loaded?

Thanks
Tara
tarafenton is offline   Reply With Quote
Old 10-25-2007, 02:08 PM   #2
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073
Default

You mean scaling it up or down?
atomic is offline   Reply With Quote
Old 10-25-2007, 02:13 PM   #3
tarafenton
Tara Fenton
 
Join Date: May 2005
Location: Brooklyn, NY USA
Posts: 346
Send a message via AIM to tarafenton
Default

yes
tarafenton is offline   Reply With Quote
Old 10-25-2007, 02:30 PM   #4
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,875
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

which is also the answer to your question
__________________
(6)
senocular is offline   Reply With Quote
Old 10-25-2007, 02:36 PM   #5
tarafenton
Tara Fenton
 
Join Date: May 2005
Location: Brooklyn, NY USA
Posts: 346
Send a message via AIM to tarafenton
Default

yay! but how?

I really want to be able to make the height and width a certain amount.

nothing i'm trying is working

Last edited by tarafenton; 10-25-2007 at 03:10 PM.
tarafenton is offline   Reply With Quote
Old 10-25-2007, 07:05 PM   #6
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,875
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

set the width and height properties. Just make sure the image is loaded first.
__________________
(6)
senocular is offline   Reply With Quote
Old 10-26-2007, 03:54 AM   #7
anurag
Senior Member
 
Join Date: May 2007
Posts: 106
Default

but Internet Explorer had a problem with that loader behaves like nightmare on it works fine with firefox
anurag is offline   Reply With Quote
Old 10-26-2007, 07:52 AM   #8
panel
AS3
 
panel's Avatar
 
Join Date: Mar 2007
Location: Warsaw
Posts: 1,991
Send a message via Skype™ to panel
Default

What dou you mean exacly?
panel is offline   Reply With Quote
Old 10-26-2007, 10:41 AM   #9
saravanan
You have the power
 
saravanan's Avatar
 
Join Date: Jun 2006
Location: Chennai(Now @ Bangalore),India
Posts: 716
Send a message via MSN to saravanan
Default

Hi here is way of resize image after loading...

ActionScript Code:
import flash.display.Loader; import flash.net.URLLoader; import flash.events.*; var _loader:Loader=new Loader(); _loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onLoadingComplete); _loader.load(new URLRequest("http://www.thesquashracket.com/wallpapers/nature/165858ducks.jpg")); addChild(_loader); function onLoadingComplete(evt:Event) {     trace(["before resize",evt.target.content.height,evt.target.content.width]);     evt.target.content.height=100;     evt.target.content.width=100;     trace(["After resize",evt.target.content.height,evt.target.content.width]); }
saravanan is offline   Reply With Quote
Old 10-26-2007, 07:22 PM   #10
tarafenton
Tara Fenton
 
Join Date: May 2005
Location: Brooklyn, NY USA
Posts: 346
Send a message via AIM to tarafenton
Default

awesome!!
just what i needed

Thanks
tarafenton is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
image width and height jjyang ActionScript 3.0 4 10-31-2009 06:16 AM
get width and height of a dynamically loaded image once it's done loading?! manovotny ActionScript 3.0 3 06-14-2007 03:41 PM
onEnterFrame, width / height of images.. got me stumped charliedavey ActionScript 2.0 0 05-09-2007 02:55 PM
swf width & height problem akashockwave ActionScript 2.0 1 12-26-2006 06:17 AM
Get picture height and width woodsrr ActionScript 2.0 10 06-28-2004 08:06 PM


All times are GMT. The time now is 07:05 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.