Adobe Dreamweaver Forums



Last 10 THreads :         Opening a file in navpane from toolbar (Last Post : ChrisRousset - Replies : 0 - Views : 1 )           »          Help importing PNG sequence (Last Post : []MULISH - Replies : 0 - Views : 1 )           »          Problems importing PNG sequence (Last Post : []MULISH - Replies : 0 - Views : 1 )           »          Flash CS4 grey Icons in the Tool Panels are hard to see (Last Post : rnfw - Replies : 0 - Views : 1 )           »          Strip EXIF camera data from PSD files? (Last Post : Russell_Proulx@adobeforums.com - Replies : 2 - Views : 3 )           »          CSH Calls for Merged CHM's (Last Post : TrentSnake - Replies : 0 - Views : 1 )           »          Image Replacement (Last Post : WhatNow - Replies : 0 - Views : 1 )           »          Embedding Flash SWF Skin in External Site (Last Post : QADesign - Replies : 0 - Views : 1 )           »          Compatible issue with ie6 (Last Post : zhtjlong - Replies : 0 - Views : 1 )           »          Re: Photoshop CS4 is a disaster (Last Post : Paulo_Skylar@adobeforums.com - Replies : 0 - Views : 1 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-03-2008, 04:36 AM
FlexBin
 
Posts: n/a
Diggs:
Default Loss style when overriding the function 'set data' for aTileList

Hi!

In a TileList, I set the itemRenderer for a components from where I override
the function set data like in this example:

but, by doing this, I'm loosing all the built-in CSS behavior. The onMouseOver
effect the change the backgroundColor and the hand pointer. I try to set it
programmatically but without success.

An idea?

Thank you

public override function set data(value:Object):void
{
var xml:XML = new XML(value);

if(this.backgroundIconName != null &&
this.ico != null &&
this.labelText != null) {

if(xml.backgroundIconName != "") {

this.backgroundIconName.source = "assets/" + xml.backgroundIconName;
}

this.backgroundIconName.visible = (xml.backgroundIconName != "");

this.ico.source = "assets/" + xml.iconName;
this.ico.width = Number(xml.width);
this.ico.height = Number(xml.height);

this.labelText.text = resourceManager.getString('myResources',
xml.label);
}

if(xml.@available == 'false')
{
this.enabled = false;
}
}



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-03-2008, 04:36 AM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Loss style when overriding the function 'set data' for a TileList


"FlexBin" <webforumsuser@macromedia.com> wrote in message
news:gdaj4r$noj$1@forums.macromedia.com...
> Hi!
>
> In a TileList, I set the itemRenderer for a components from where I
> override
> the function set data like in this example:
>
> but, by doing this, I'm loosing all the built-in CSS behavior. The
> onMouseOver
> effect the change the backgroundColor and the hand pointer. I try to set
> it
> programmatically but without success.
>
> An idea?
>
> Thank you
>
> public override function set data(value:Object):void
> {
> var xml:XML = new XML(value);
>
> if(this.backgroundIconName != null &&
> this.ico != null &&
> this.labelText != null) {
>
> if(xml.backgroundIconName != "") {
>
> this.backgroundIconName.source = "assets/" + xml.backgroundIconName;
> }
>
> this.backgroundIconName.visible = (xml.backgroundIconName != "");
>
> this.ico.source = "assets/" + xml.iconName;
> this.ico.width = Number(xml.width);
> this.ico.height = Number(xml.height);
>
> this.labelText.text = resourceManager.getString('myResources',
> xml.label);
> }
>
> if(xml.@available == 'false')
> {
> this.enabled = false;
> }
> }



There are examples of how to properly implement this kind of functionality
in the itemRenderers here:
http://flexdiary.blogspot.com/2008/0...featuring.html
http://flexdiary.blogspot.com/2008/0...efunction.html


Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 04:16 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk