Sandcode
08-30-2011, 07:21 PM
Hello community
I have this simple project (well at least in conception :P) where I want to present a serie of items from a database (no problem here reaching my XML from my DB) and make them appear in front of us with an angle and allow us to scroll through them indefinitly.
I have a picture showing what I have done up to now. But all I have manage to do is load some 30 items (but only 12 can be shown on screen wich is what I want) and I am able to scroll through them but not indefinitly, so at one point nothing shows when I keep scrolling cause I didn't figure how to loop through them on screen.
The purpose is to show items people could bet on, the goal is to give the feeling there is always more item when all will be done is loop cycle through them.
I will attach my code too so you guys can see what I have done if you want but all I am really looking for is ideas.
From a simple projection, I populate the screen with a FOR loop with ItemHolders (I thought I'd give it some external class for the holders if I wanted to better manage my holders independently from my MAIN.as code, i.e. the style of my itemsholders) and they have a simple MOUSE_DOWN function that allows us to scroll them but when I reach the end, nothing more shows up and I don't know how to loop back at the beginning and in both directions (if I keep going down or if I keep going up, I wish them to loop).
I thought about 4 rows of MovieClip to update from an array maybe but I don't know how to approach the update method. I think arrays is a good part of this management but I'm no wiz with arrays though I'm working on it.
Ok well, any ideas is appreciated,
tks for your time and happy coding all !
PS : well I couldn't include the FLA but there's only my stage set-up and a link to my Main.as
I have this simple project (well at least in conception :P) where I want to present a serie of items from a database (no problem here reaching my XML from my DB) and make them appear in front of us with an angle and allow us to scroll through them indefinitly.
I have a picture showing what I have done up to now. But all I have manage to do is load some 30 items (but only 12 can be shown on screen wich is what I want) and I am able to scroll through them but not indefinitly, so at one point nothing shows when I keep scrolling cause I didn't figure how to loop through them on screen.
The purpose is to show items people could bet on, the goal is to give the feeling there is always more item when all will be done is loop cycle through them.
I will attach my code too so you guys can see what I have done if you want but all I am really looking for is ideas.
From a simple projection, I populate the screen with a FOR loop with ItemHolders (I thought I'd give it some external class for the holders if I wanted to better manage my holders independently from my MAIN.as code, i.e. the style of my itemsholders) and they have a simple MOUSE_DOWN function that allows us to scroll them but when I reach the end, nothing more shows up and I don't know how to loop back at the beginning and in both directions (if I keep going down or if I keep going up, I wish them to loop).
I thought about 4 rows of MovieClip to update from an array maybe but I don't know how to approach the update method. I think arrays is a good part of this management but I'm no wiz with arrays though I'm working on it.
Ok well, any ideas is appreciated,
tks for your time and happy coding all !
PS : well I couldn't include the FLA but there's only my stage set-up and a link to my Main.as