Loading ALL ROWS of dynamic data into Flash?

  • Grantspad
  • Newbie
  • Newbie
  • Grantspad
  • Posts: 13
  • Loc: M'Bro

Post 3+ Months Ago

Hi All,

I have just worked through the "Loading data into Flash" article in
Flash-db.com and managed to get it working.

However, instead of assigning individual mc/buttons to records in the database, I would like to list all rows in the database into a scrollable movieclip/panel containing dynamic buttons.


Here is the code I have so far...


Code: [ Select ]
myData = new LoadVars()
myData.load("view.asp")
myData.ref = this
myData.onLoad = function(succes){
      
if (success) {
    // code to put the buttons goes here
    for (n=0; n<=Number(count); n++) {
      _root.attachMovie("template", "btn"+n, n+1)
      _root.mc = _root["btn"+n]
      _level0.Title.text = this["Title"+n]
      _root.mc._y = 50 + n
    }
  } else {
    // pop up an error message; - the system will be completely unusable without the buttons
  }
};
  1. myData = new LoadVars()
  2. myData.load("view.asp")
  3. myData.ref = this
  4. myData.onLoad = function(succes){
  5.       
  6. if (success) {
  7.     // code to put the buttons goes here
  8.     for (n=0; n<=Number(count); n++) {
  9.       _root.attachMovie("template", "btn"+n, n+1)
  10.       _root.mc = _root["btn"+n]
  11.       _level0.Title.text = this["Title"+n]
  12.       _root.mc._y = 50 + n
  13.     }
  14.   } else {
  15.     // pop up an error message; - the system will be completely unusable without the buttons
  16.   }
  17. };




1. Please could you tell me where I am going wrogn with the actionScript
2. Please could you tell me the procedure for creating the actual movieclips/buttons which will contain the dynamic data


Greatly appreciated,

Grant

http://www.grantmilestone.com[/url]
  • Abelius
  • Proficient
  • Proficient
  • User avatar
  • Posts: 260
  • Loc: Miami Beach, FL, USA

Post 3+ Months Ago

What is "template"...? An item in the Library? Are you giving it a "Linkage name"...?

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 6 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.