homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

Read from database with Flash MX
can anyone provide a direction to go?

WebmasterWorld Senior Member 10+ Year Member

Msg#: 126 posted 2:48 pm on Nov 19, 2003 (gmt 0)

I'm an ASP developer, looking to make a simple news ticker with Flash MX. I'm going to have the data stored in an Access database, then pulled to the flash ticker to display. Are there any sites that provide good tutorials regarding pulling data from a database? I don't want pre-built stuff, I would like to learn how to do it from scratch. I've never used ActionScript before, but I'm sure I can piece together the parts I need.

Thanks for your help.




WebmasterWorld Administrator 10+ Year Member

Msg#: 126 posted 7:42 pm on Nov 20, 2003 (gmt 0)

This might get you started:


WebmasterWorld Senior Member 10+ Year Member

Msg#: 126 posted 1:34 pm on Nov 25, 2003 (gmt 0)

ive been dabbling with something similar - getting bits from a php script into flash.

Ive found that if you have a script that pulls what you need out of database and echos (dont know asp equivilent;)) it out like this:

var1=blah&var2=blah&var3=foo etc

so if you were to goto script url and view source in browser you would see just that var1 etc, no html or anything, you can then call it into flash using something like:

var myVars = new LoadVars();
myVars.onLoad = function(ok) {
if (ok) {

holdermc.box1.text = myVars.var1;
holdermc.box2.text = myVars.var2;
myVars.load("http://path to script.asp");

holdermc is the 'instance' name of a movieclip to recieve the data.

box1 and box2 are the 'instance' names and 'variable' names of dynamic text boxes that are within the holdermc movieclip that are going to contain the recieved variables, var1 and var2 in this case.

this should load the variables into the dynamic text boxes. obviously you can add as many text boxes as you have variables produced by the script - just add more lines in this format: holdermc.box2.text = myVars.var2;

the last line: myVars.load("http://path to script.asp"); can also have parameters append to the url. in the?usual=way.

the parameters append can also be dynamic, e.g from a input box, just use a variable to hold the info you want to pass and added it like this:

myVars.load("http://path to script.asp?subject="+SUBJECT);

where SUBJECT is a variable containg the output from a input or whtever.

finally, if you then need to animate the recieved data, just animate the contating movieclip as normal. if different data needs different animations, create two or movie 'holdermc' type movieclips - with different instance names.

sorry for going on and on.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved