Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-20-2006, 07:51 PM   #1
Cowgirl32
Registered User
 
Cowgirl32's Avatar
 
Join Date: May 2005
Location: Washington, USA
Posts: 72
Default loader sizing problem

i am using the loader component to display images from an xml file. The xml file passes in width and height of what the image should display as. When i run the swf file. It displays the image as the original size, which is larger than what i would like to see on the screen. Is there a prameter that i am missing that should be set. Here is the code for the loader that i am setting:

ActionScript Code:
var obj:Object = createClassObject(mx.controls.Loader,"obj"+Cnt,Cnt+100);                                     objHeight = chNode.attributes.Height;                                     obj.setSize(chNode.attributes.Width, objHeight);                                     trace("width of the image: " + obj.width);                                     trace("height of the image: " + obj.height);                                     obj._x = chNode.attributes.X;                                     var TopAdjust = new Number(chNode.attributes.Y) + topOffSet;                                     obj._y = TopAdjust;                                     obj.scaleContent = false;                                     obj.contentPath = chNode.firstChild.attributes.FileName;

when i do a trace after i setSize, it outputs the correct sizes that i would like. I am wondering there is an aspect ratio that i am missing or something along those lines..
Cowgirl32 is offline   Reply With Quote
Old 03-20-2006, 10:56 PM   #2
Cowgirl32
Registered User
 
Cowgirl32's Avatar
 
Join Date: May 2005
Location: Washington, USA
Posts: 72
Angry

update on my problem:

the loader is sizing my images with the correct width, but then it is adjusting the height so it is constrained with the width. If i put in a width and height of 400 by 400. it will size the width to 400 and make the height what ever size so it looks the same as the original image.

so there must be some kind of restraint on the loader. PLEASE i am going crazy here.
Cowgirl32 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 Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sizing function problem A1A2 ActionScript 1.0 (and below) 0 09-13-2004 07:51 PM
Loader Component funny problem steve43 Components 1 08-27-2004 01:19 PM
pre loader externe swf problem?? djmate ActionScript 1.0 (and below) 1 05-06-2003 12:29 AM
No loader problem but a loading problem agenba Simple Stuff (Newbies) 1 02-11-2002 06:29 AM
No loader problem but a loading problem agenba Other Flash General Questions 0 02-10-2002 04:11 PM


All times are GMT. The time now is 01:01 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.