Go Back   OXYLUS Flash Board > Support > Sliding List

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-01-2008, 04:48 PM
Junior Member
 
Join Date: Nov 2008
Posts: 4
Default Clearing the title field on Back or Root click

How would I go about clearing the result_txt text field when the Back or the Root buttons are clicked?
Reply With Quote
  #2 (permalink)  
Old 11-01-2008, 05:19 PM
Junior Member
 
Join Date: Nov 2008
Posts: 4
Default

I figured out how to make it work for the back button:
Find this chunk of code:
// populate menu
PList_mc.root = xo.firstChild;
PList_mc.data =xo.firstChild;


Then paste this right after it:

this.PList_mc.d.onRelease = function(n:XMLNode){

// display title in the result_txt text box on the stage
gotoAndStop("framename");
result_txt.text = "";
}


Can't figure out how to make it work for the Root button though. Anyone have any ideas for that?
Reply With Quote
  #3 (permalink)  
Old 11-01-2008, 10:25 PM
Super Moderator
 
Join Date: May 2008
Posts: 656
Send a message via Skype™ to Adrian
Default

Could you be more clear please? I don't understand what you are trying to achieve
Reply With Quote
  #4 (permalink)  
Old 11-03-2008, 04:23 PM
Junior Member
 
Join Date: Nov 2008
Posts: 4
Default

I'm using the result_txt text field as a title for the loaded content. I want to clear it when the user selects Root so that the headline is not left on screen when you go back to the root level of the menu.

I was able to achieve this with the script posted above for the back button, but it doesn't work for the Root button.
Reply With Quote
  #5 (permalink)  
Old 11-06-2008, 09:11 PM
Super Moderator
 
Join Date: May 2008
Posts: 656
Send a message via Skype™ to Adrian
Default

Try this:

Code:
PList_mc.onItemSelect= function(n:XMLNode){
	if(n != PList_mc.root)
	result_txt.text = n.attributes.title;
        else result_txt.text = "";

}
Reply With Quote
  #6 (permalink)  
Old 12-06-2008, 06:30 AM
Junior Member
 
Join Date: Nov 2008
Posts: 4
Default

That worked. Thank you.
Reply With Quote
  #7 (permalink)  
Old 01-03-2009, 06:14 PM
Junior Member
 
Join Date: Jan 2009
Posts: 2
Default Clearing result_txt on Root / Back click

Quote:
Originally Posted by Adrian View Post
Try this:

Code:
PList_mc.onItemSelect= function(n:XMLNode){
	if(n != PList_mc.root)
	result_txt.text = n.attributes.title;
        else result_txt.text = "";

}
Could you please elaborate (I'm new to AS), the above doesn't seem to work for me. Here's how the script for me looks like

_root._visible = true;
// define item select handler
PList_mc.onItemSelect= function(n:XMLNode){
// display title in the result_txt text box on the stage
// result_txt.text = n.attributes.value;

if(n != PList_mc.root)
result_txt.text = n.attributes.title;
else result_txt.text = "";
}
// populate menu
PList_mc.root = PList_mc.data =xo.firstChild;

I am looking to achieve the same, i.e. to clear result_txt field when Back or Root button is clicked. What am I missing?

Thanks in advance.
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

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


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.