Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-04-2009, 08:06 PM   #1
Registered User
Join Date: Feb 2009
Posts: 1
Default List dimensions are wonky

I'm making a Flex app for showing videos hosted on Vimeo. We have a database that tracks which videos are related and we display them in a list on the side. The idea is to kind of mimic Youtube where on the right there's a list with a thumbnail, title, number of views, etc. I created a component using MXML that takes a few parameters (url of the thumbnail, title of the video, date posted, and so on) and displays the video's info. Then I created a list which uses the new component as its itemRenderer. The list is populating correctly but for some reason it's width and height are all screwy. The list has two items but the height is huge (as in you can scroll down really far even though there's nothing there) and the width is just a little too narrow to fully display the component. I don't know how to start fixing the height, but I've tried to fix the width in a few ways. I've defined the width of the list and the component using absolute and percent values but nothing changes. Anyone know how I can fix either dimension? Please excuse my sloppy code, I'm still pretty new to Flex. I've attached the full code but the relevant bits are here below.

The component's code:
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
width="250" height="85"
verticalAlign="middle" paddingLeft="5" horizontalGap="5">

public function set vThumb (location:String):void { thumbnail.source = location; }
public function set vTitle (text:String):void { title.text = text.length <= 50 ? text : text.substr(0, 50) + "..."; }
public function set vViews (num:String):void { views.text = num.toString() + " Views"; }
public function set vLength (length:String):void { time.text = length; }
public function set vDate (posted:String):void { date.text = posted; }

<mx:Image id="thumbnail" width="100" height="75" />
<mx:VBox height="100%" width="100%" paddingTop="5" verticalGap="2">
<mx:Text id="title" width="100%"/>
<mx:HBox width="100%">
<mx:Text id="views" />
<mx:Text id="time" />
<mx:Text id="date" />

The code for the list that refuses to size correctly:
<mx:Panel width="100%" height="50%" layout="absolute" title="Channel"> **Note the height is set to 50% because there's another list for videos with the same keywords**
<mx:List dataProvider="{channelVideosArray}" width="100%">
vDate="{data.vDate}" >
Attached Files
File Type: zip VideoChooser.zip (2.6 KB, 69 views)
eiIntern is offline   Reply With Quote

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
Re: Auto HorizontalScrollbar in the List angaps ActionScript 3.0 0 09-23-2008 07:29 AM
Making items in a List 'jump' into another List in a Flex effect/animation.... RR_QQ Flex 2, 3 & 4 1 06-26-2008 09:23 AM
Error #1010 Dynamic List scrollVertically woes RR_QQ ActionScript 3.0 0 03-11-2008 09:35 PM
Filter list as you type interface like on an iPod BCSWebStudio ActionScript 2.0 4 10-01-2006 06:54 AM
Macromedia Central CyanBlue ActionScript 1.0 (and below) 13 08-01-2003 09:05 PM

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