Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Three beginner questions 1

Status
Not open for further replies.

webmigit

Programmer
Joined
Aug 3, 2001
Messages
2,027
Location
US
Alright.. I'm wanting to create something with Flash MX that pulls from a database.. So I have three questions..

1. Can I pull directly from the db?
2. If not, how do I pull variables... Through url? Is there an html code for setting variable for flash?
3. How do I create a text box to put data into.. I found checkbox and everything else, just not text box..

And make that four questions.. I have this all setup in a page already but I need flash because I want it to print in one format at all times.. One font size, in the colors I want...

Can I just import the html code into the flashlet.. like generate it in html (with the language I use: Cold Fusion) and import the code... will it come out with exact font sizes and such? Will it keep the background colors? Can I give it background images?

I know its a lot to ask but I need to get this done and I need to know how...

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
1. No - you'll need some a middleware script (PHP/ASP etc) to pull the data and then format it for Flash.

2. Use LoadVars() (or loadVariables in Flash 5) to pick up the data. The information should be formatted as variable pairs:

&value1=firstValue&value2=secondValue etc

3. Textboxes are created with the 'T' text tool - set the options in the property inspector to 'dynamic' so that the textbox will display dtata pulled form a script, then give the text box an instance name so that you can access it and set its content.

getData=new LoadVars();
getData.onLoad=function(){
textbox1.text=this.value1;
textbox2.text=this.value2;
}
getData.load('externalScript.php');
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top