Hi. Using Flash 2004 to display dynamic text field populated by content from xml file (series of nodes, each is a separate 'statement' that is displayed to end user). Intent is for end user to navigate by 'next' and 'previous' buttons and see changing text.
Would like to have actionscript on 'next' button that loads the content from the xml variable into text field, then, upon clicking 'next' again, loads info associated with the next node. Same with 'previous' button, this time loading the previous node info from XML.
Also, buttons should not be displayed to end user if there is no content (e.g. there is 'previous' content to display at the beginning of the XML file, and there is no 'next' content to display at the end, so those buttons shouldn't be visible as options to the end user). Button actionscript needs to test whether there is another node or not (and possibly jump to one of three frames in the scene? One frame, just 'next' button, second frame both buttons, third frame only 'previous' button). At least, I think so.
I'm not able to figure that part out or even how to get the 'next' button to refresh the content in the dynamic text field by populating it with the next node (unless I keep adding frames with instances of buttons on the timeline...think it's more efficient using actionscript and only three frames as described above).
Any suggestions please? Thanks.
Would like to have actionscript on 'next' button that loads the content from the xml variable into text field, then, upon clicking 'next' again, loads info associated with the next node. Same with 'previous' button, this time loading the previous node info from XML.
Also, buttons should not be displayed to end user if there is no content (e.g. there is 'previous' content to display at the beginning of the XML file, and there is no 'next' content to display at the end, so those buttons shouldn't be visible as options to the end user). Button actionscript needs to test whether there is another node or not (and possibly jump to one of three frames in the scene? One frame, just 'next' button, second frame both buttons, third frame only 'previous' button). At least, I think so.
I'm not able to figure that part out or even how to get the 'next' button to refresh the content in the dynamic text field by populating it with the next node (unless I keep adding frames with instances of buttons on the timeline...think it's more efficient using actionscript and only three frames as described above).
Any suggestions please? Thanks.