Hello,
I am a newbie to flash. Currently I have a flash document that has an xml
document loaded on it. The xml document is rather large but not too big. On
the initial flash document it displays the xml data in alphabetical order
according to one of the nodes in the xml document. There is a button that a
user can click and it will go to the rest of the data in the xml document in
pairs.
What I want to do is...instead of a user to keep clicking a button to get to
the information that they are interested in. I want to add a scroll so that
all the xml data is on one page and the user just has to scroll down. The xml
isn't loaded into a textarea or textfield. So that is my problem. Trying to
add a scroll to the already existing flash document.
Any information is helpful.
MotionMaker - 08 Jan 2007 13:19 GMT
You should have no restrictions to creating a scrolling solution. At this point
your UI design is not clear, so design the UI. You load all the XML and provide
it as data to the UI controller(s).
You might have the XML in an array where each element is an object from a node
in the XML. When your scroll UI widget changes state, you then display the next
item from the array.
Aasin - 08 Jan 2007 15:32 GMT
I am not using the UI controllers. The XML is in an array. I was going to
create the scroll manually. I am using flash MX 2004 professional, which
doesn't come with a scrollbar within the components. I was able to update the
flash mx 2004 professional so that it now has the scrollbar in the components.
When I added the scroll to the page it didn't change state at all. I thought
it would change state but it didn't.
MotionMaker - 08 Jan 2007 19:30 GMT
That was my point. You would design a UI controller (or use one pre-built).
That UI item you make or use than would use the data in your array.
The UI Scroller I believe only interfaces with a Flash TextField and is not
really usable otherwise.
The goalappears to be is to get or build a UI scroller and learn its
Actionscript interface. A typical interface would be set the max value, set the
increment value and a change event that provides the current value.
For example if you have 100 items in the array from the XML, then the
scrollers maximium value is 100 and increment is 1. Then when a change occurs
the scroller would provide a call back (event) that you could use to access the
data in your array.
Aasin - 10 Jan 2007 14:38 GMT
You are correct. My goal is to get or build a scroller and learn its
Actionscript interface. My other goal is how to integrate it into my current
flash document. Do you know of any articles or tutorials that may help with
that? In the meantime, I will go ahead and create a scroller. I will use your
example above as a guide to bind the scroller and the xml array together.
Aasin - 22 Jan 2007 16:29 GMT
I am having trouble binding an xml array with a scroller that I created. The
xml data in not loaded into a text field. It appears that the xml is loaded on
a graphic. One of the node fields displays in a subheading graphic while other
node fields display in a background graphic. I created a scroller but I am
having trouble binding it with the xml data so it can scroll.
Help please!
MotionMaker - 22 Jan 2007 17:43 GMT
Are you creating a TextField scroller?
Aasin - 22 Jan 2007 19:56 GMT
Currently the flash application loads and parses the xml document on a graphic.
There are buttons on the graphic that allow the user to page through the xml
document. I no longer want the user to page through the xml document on the
flash application. I want all of the data from the xml document to be
displayed on 1 page. So the user can use a "scroll" to be able to view all of
the data without paging through the data. I hope that makes sense. Basically
instead of having a paging function...I want to have a scroll function. So all
the data is on 1 page. Does that make sense? I know that I can load the
xml document onto a textfield and then implement a scroll. But the xml nodes
are loaded on top of graphics for display. I don't know how to implement a
scroll without using a textfield.
Any information is helpful.
Aasin - 22 Jan 2007 19:58 GMT
Currently the flash application loads and parses the xml document on a graphic.
There are buttons on the graphic that allow the user to page through the xml
document. I no longer want the user to page through the xml document on the
flash application. I want all of the data from the xml document to be
displayed on 1 page. So the user can use a "scroll" to be able to view all of
the data without paging through the data. I hope that makes sense. Basically
instead of having a paging function...I want to have a scroll function. So all
the data is on 1 page. Does that make sense? I know that I can load the
xml document onto a textfield and then implement a scroll. But the xml nodes
are loaded on top of graphics for display. I don't know how to implement a
scroll without using a textfield.
To answer your question... I don't want to create a Textfield scroller but if
I have to I will. But that would mean placing the graphics that the xml nodes
are loaded on ...onto the textfield. I am still a novice at flash.
Any information is helpful.
MotionMaker - 23 Jan 2007 12:27 GMT
Assuming you are loading text XML parsed or not, you probably need a dynamic
TextField for display. TextField has a property to turn the
http://livedocs.macromedia.com/flash/8/main/00002735.html on and off. That
should allow you to see a graphic behind the text.
Then you can use the UIScroller by dragging to the TextField at design time.
If you want your own custom scroller, then you need to build a scroller UI
which is likely to be made out of MovieClips. The scroller communicates with
the TextField's scroll property
http://livedocs.macromedia.com/flash/8/main/00002774.html . You will may need
the http://livedocs.macromedia.com/flash/8/main/00002756.html property.
Although it does not communicate with a TextField, you can look at the
customer UI scroller with source files here on my site:
http://www.hosfordusa.com/ClickSystems/courses/flash/examples/Players/SwfPlayerE
x01/SwfPlayerEx01_Doc.php