header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
Venkatesan M
Points:0
Posts:0

9/9/2010 1:39:18 AM

Title: Skinning problem


Hi all..

I'm trying to write a skin for a titlewindow. i'm writing a path instead of border rectange in the skin. Now i'm struggling to set the path value dynamically from the hostComponent which is the titlewindow
if i hardcode the path it works perfectly. but i want it to be dynamic

Thanks!



1
Warrior
Points: 420
Posts:0
9/9/2010 4:52:44 AM



check these links to apply run-time skins on components in flex

http://blogs.adobe.com/kiwi/2006/07/loading_flex_skins_at_runtime.html
http://ted.onflash.org/2007/01/flex-201-understand-runtime-css.php

2
Venkatesan
Points: 0
Posts:0
9/9/2010 5:20:28 AM



Hi warrior..

I think i was not clear with the question. I'm not asking for loading skins at runtime.

for eg: say there is a titlewindow.mxml for which there is a skin called titlewindowskin.mxml.

instead of border rectangle, i'm drawing a path of some shape using data property for path..

now i want the path property to be set by the titlewindow.mxml instead of hardcoding a string in the skin. the reason is i want to use the same sking for more titlewindows but with different paths alone.

can u help out??
an example would be better or even approach is fine!!
thanks!

3
Mark
Points: 380
Posts:0
9/9/2010 9:03:50 AM



To set the path dynamically in your skin mxml you should be able to pass a parameter to the skin mxml which tells which path to use. I don't see it an easy approach. I think you may use a global variable which is being accessed in the skin mxml. Before setting any skin update the variable first with the new path string and then apply skin. The skin will pic the path from global variable.


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 6+8 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions