Hi all, hope someone can help me with this... I wanted to create a listbox which can show dynamically imported images (thumbnails) as well as text. I may also go on to add buttons although thats looking unlikely given the problems I have had so far...
I partially followed the guide here: http://www.macromedia.com/devnet/flash/articles/extending_components.html and created a custom listbox item named FListBoxItem which extends FSelectableItemClass. In the gui editor I put a spacer movie clip in to expand the item to the height I require (probably not the best way to do this, but it was quick and worked). I extended the code as in the guide above but without the icon stuff with the happy/sad face. The display content function looks like this: FCustomItemClass.prototype.displayContent = function(itmObj, selected) { super.displayContent(itmObj, selected); if (this.fLabel_mc.labelField.text != "") { this.createEmptyMovieClip("thumbnail_mc", 1000); this.thumbnail_mc._x = 2; this.thumbnail_mc._y = 2; this.thumbnail_mc.loadMovie("test_thumb.jpg"); } } The if statement stops it displaying images in empty items. The problem is that this works fine in it's own .fla file, with a listbox and a bit of code to add items. But when I transfer this to the existing project which I need it for it doesn't work. Instead of the images being displayed there is just blank space (don't know whether they are not visible or not loaded). I have been debugging this for nearly two weeks now trying to get it to work, and this is what I have found so far: - The listbox in my project is using the FCustomItem and the code is identical, no problems copying it over and no problems with the symbol registration. -The code in the new displayContent is being executed, can check it with a trace(). - The thumbnail_mc movieclip is being created (well at least I can trace its properties, like .getDepth()) - The file test_thumb.jpg exists (although if someone could tell me how to make sure of this programmatically it would help to confirm this). I have no idea what the problem is. The application it's going into has few distictive features that would affect the listbox code. It is a forms based application and the listbox is placed on a form (e.g. Form1) which is currently displayed and everything else I have on there works fine (video conferencing type stuff). I'm getting desperate here so any help/advice/thoughts are really appreciated. I've only been using flash for a couple of months so I could well have missed something obvious to you guys. Cheers Kev _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

