A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Flex tree "onready" function

  1. #1
    Member
    Join Date
    Jul 2008
    Posts
    94

    Flex tree "onready" function

    Hiya, I can expand my flex tree after it has loaded with the use of a button, but I'd like to do this automatically. I have the actionscript that will expand it, but I'm not sure how to trigger it. The tree is created from an xml generated by php, so it takes a second or so before it is ready. Does the tree have a "I am ready" attribute that I can listen for to initialise the expand function?

    Many thanks.

    Dave

  2. #2
    Senior Member Gohloum's Avatar
    Join Date
    Aug 2002
    Location
    Florida
    Posts
    185
    FlexEvent.DATA_CHANGE should work for you, but what you could do is create a bindable variable and then use the ChangeWatcher.watch() and then have a responder run code to open the tree.

    I did an faq for a company that used a tree and this is how I did it. I also added in URL Kit so you could save the opened node as a URL variable allowing the user to bookmark the page with the tree open to a specific node.
    The Early Bird may get the worm, but the second mouse to the trap gets the cheese...

  3. #3
    Member
    Join Date
    Jul 2008
    Posts
    94
    Gohloum, I haven't had a chance to go through any of your answers yet (you've replied to at least 3 of my questions) - I'm not ignoring you. I'm back on this stuff next week so really look forward to having a go. In the mean time, can I just say thank you so, so much for all your help!! SWF filesize one in particular looks fantastic, so ... THANK YOU!

  4. #4
    Senior Member Gohloum's Avatar
    Join Date
    Aug 2002
    Location
    Florida
    Posts
    185
    Hey, no worries... The forums are here to assist and it's rare I have time to stop in and post... If anything I've posted helps, then job well done for me, which is all I desire.

    keeping it real = keeping it humble
    The Early Bird may get the worm, but the second mouse to the trap gets the cheese...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center