473,769 Members | 1,640 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Formating Dynamic Text

67 New Member
I just read an article on kirupa.com about incorporating mySQL and PHP with flash. I am dynamically loading conent into a flash movie and am not sure how to format. In my php code i have:

$y = "";
foreach($result as $x){
$y = $y . $x['firstname'] . " ";
}
print "myVar = $y";

In short $result is a query and $y is the value i will be passing along to flash.
the statement $y = $y . $x['firstname'] . " "; puts a space between each name that is passed along. I am trying to find ways of formating $y before sending, i.e. line breaks, bold, italics, color.... etc. In this example i may want the names to be listed on top of each other rather than with a space between them.

I am able to set initial values (other than line breaks (carrage return)) in my flash movie for the content that is dynamically loaded. Is it possible to set formating through my script?
Jul 11 '07 #1
1 2550
koolaid82
12 New Member
This does not answer the question you asked, but i load .txt files dynamically like this. Just figured i would share couldn't hurt. Sorry i can't answer your question specifically.

////myTextBox represents the instance name of your dynamic text box the semi collen strict data types it to TextField (all that means is it tells flash what it is)

var myTextBox:TextF ield;
myTextBox.text = "Please Wait... Loading..."

//// declare and instantiate a LoadVars object

var ourLoadVar:Load Vars = new LoadVars();

//// point our LoadVars 'onLoad' handler to our function that will populate our textField once our data has been loaded. Note that this should be done before trying to load any data.

ourLoadVar.onLo ad = function(succes sful) {
if(successful) {
myTextBox.text = ourLoadVar.Text ;

//// note that Text is a property that will be created in our data file that we will be loading

} else {
myTextBox.text = "error loading data"
}
}
ourLoadVar3.loa d("yourfilename .txt");

/// IMPORTANT the text in your text file must start with Text= that is determined by this line of code (myTextBox.text = ourLoadVar.Text ;) We tell flash to look for Text= in your document. Text= will not dispaly just everything after it
Jul 12 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
2218
by: Polar | last post by:
I have a database that stories entries of short stories for a writers website. I can easily input the data into MYSQL but my trouble lies in retrieving the data. the story in just cut and pasted from a WP into the TEXTAREA on the form. When I look at the story in the DB I can see it retains all the paragraph spacing etc. but when I try and read that cell when retrieving data all the text is crammed into one paragrapgh. What am I...
6
4711
by: Dave Smithz | last post by:
Hi there, A client of mine wants to start generating some reports from their PHP / MYSQL database. They were previously gathering data from the screen and cutting and pasting it into a Word document template. They now just want to generate it. My initial thoughts are to just format the information in a table and then they print it out. But due to the dynamic nature of the reports and what is
1
1922
by: gevayl | last post by:
Hi, Is it possible to do memo text formating in ms access 2000? I mean like underlining a portion of text in a memo field or a text field? Thank you.
22
10784
by: craig | last post by:
I've declared the following as a "vector" of "lists" using STL vector< list<Edge*> > I've tried many ways to add objects to this but can't figure out how to do it. Does anyone have any tips, or references to material that might explain it? Any help greatly appreciated.
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7408
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.