Formatting Multiple External Fields?
Thank you for the responce on my last posting about loading external text. I got it to work almost perfectly. My next question is reguarding modifying the text. I used this tutorial for my coding.
http://www.kirupa.com/developer/mx/externaldata.htm
this is an example of some of my external coding
PHP Code:
&name=Ty Mansfield &email=random@random.com &location=Whatever Also &car=Miata MX-5 its cool &website=www.spiderarts.com &content1=RANDOM STUFF Random stuff AGAIN and again and again.
Everything works great except the last line. You will notice there is a break after "RANDOM STUFF" the problem is, flash interprets it as a hard return when its supposed to be a soft return. My output looks like this
PHP Code:
RANDOM STUFF
Random stuff AGAIN and again and again.
when i want it to look like this
PHP Code:
RANDOM STUFF Random stuff AGAIN and again and again.
Also, im running into a formatting problem. I cant seem to get individual formatting to work. In the lines above, for example. I want to put the words "again" into bold text. How might i do that? Is it possible? Worth the effort? Is it something i need to add into the text file? In the coding on the forum it would look like this .
PHP Code:
RANDOM STUFF Random stuff [b]AGAIN[/b] and [b]again[/b] and [b]again[/b].
Im not new to actionscript, but im not an expert. Im very new to external data and such. Anyway, help on this subject would be GREATLY appreciated!
Thanx for the help before!
Ty Mansfield
ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 07-06-2005, 04:07 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Need Your Help Loading Multiple External Text Into Multiple Dynamic Text Fields
Hi all,
I can't seem to get the external tex file loaded into a dynamic text field.
I am trying to display an external text file into a dynamic text field using a next page button. The layout is this I have 80 frames. Frames 1-10 with a static text field with text & a next page button and Frames 11-20 with a dynamic text field with a previous button. I want to onRelease of the next page button in the first set of 10 frames to load the external text file into the dynamic text field of the next set of 10 frames. Also, being able to jump back and forth from next page to next.
Below I layed out all the contents in my test.fla file.
Hope this will give you an understanding of what I am trying to do.
I need to be able to click a next page button and loading an external text file into a dynamic text field, vice versa.
I have set the variable in the text file.
I used this code to try and load the text file into a dynamic text field, using actinscript. Which frame or frames do I need to include this script in? I know it has got to be multiple ones.
var styles = new TextField.StyleSheet();
styles.load("cssdocName.css");
textfieldName.html = true;
textfieldName.styleSheet = styles;
var lv:LoadVars = new LoadVars();
lv.onData = function(content) {
textfieldName.text = content;
}
lv.load("htmldocName.html");
Thanks for your time!
I have 6 different layers with 80 frames:
Layer titles:
- labels
- actions
- next_prev buttons
- contents
- tabs
- outline
Now in each layer:
- outline layer: just an outline border [displayed in Frames 1-80]
- tabs layer: movie clips tab1, tab2, tab3 within each tab is a movie clip
called bottomline [displayed in Frames 1-80]
- contents layer: Static Text Field [displaying text in Frames 1-10]
Frame 1 ActionScript
stop();
Dynamic Text Field instance name dpmoreinfo_txt
[displayed in Frames 11-20]
Frame 11 ActionScript
stop();
Dynamic Text Field instance name dpmoreinfo2_txt
[displayed in Frames 21-30]
Frame 21 ActionScript
stop();
Static Text Field [displaying text in Frames 31-40]
Frame 31 ActionScript
stop();
Dynamic Text Field instance name spmoreinfo_txt
[displayed in Frames 41-50]
Frame 41 ActionScript
stop();
Static Text Field [displayed text in Frames 51-60]
Frame 51 ActionScript
stop();
Dynamic Text Field instance name cmoreinfo_txt
[displayed in Frames 61-70]
Frame 61 ActionScript
stop();
Dynamic Text Field instance name cmoreinfo2_txt
[displayed in Frames 71-80]
Frame 71 ActionScript
stop();
next_prev buttons
layers: dpmoreinfonext_btn [Frames 1-10]
Frame 1 ActionScript
dpmoreinfonext_btn.onRelease = function() {
gotoAndStop("dpmoreinfo");
};
dpprev_btn & dpmoreinfo2next_btn [Frames 11-20]
Frame 11 ActionScript
dpprev_btn.onRelease = function () {
gotoAndStop("DataPulse");
};
dpmoreinfo2next_btn.onRelease = function () {
gotoAndStop("dpmoreinfo2");
};
dpmoreinfoprev_btn [Frames 21-30]
Frame 21 ActionScript
dpmoreinfoprev_btn.onRelease = function () {
gotoAndStop("dpmoreinfo");
};
spmoreinfonext_btn [Frames 31-40]
Frame 31 ActionScript
spmoreinfonext_btn.onRelease = function () {
gotoAndStop("spmoreinfo");
};
spprev_btn [Frames 41-50]
Frame 41 ActionScript
spprev_btn.onRelease = function () {
gotoAndStop("StructurePulse");
};
cmoreinfonext_btn [Frames 51-60]
Frame 51 ActionScript
cmoreinfonext_btn.onRelease = function () {
gotoAndStop("cmoreinfo");
};
cprev_btn & cmoreinfo2next_btn [Frames 61-70]
Frame 61 ActionScript
cprev_btn.onRelease = function () {
gotoAndStop("Courses");
};
cmoreinfo2next_btn.onRelease = function () {
gotoAndStop("cmoreinfo2");
};
cmoreinfoprev_btn [Frames 71-80]
Frame 71 ActionScript
cmoreinfoprev_btn.onRelease = function () {
gotoAndStop("cmoreinfo");
};
labels layer: Frame name is DataPulse [Frame 1-10]
Frame name is dpmoreinfo [Frame 11-20]
Frame name is dpmoreinfo2 [Frame 21-30]
Frame name is StructurePulse [Frame 31-40]
Frame name is spmoreinfo [Frame 41-50]
Frame name is Courses [Frame 51-60]
Frame name is cmoreinfo [Frame 61-70]
Frame name is cmoreinfo2 [Frame 71-80]
Actions layer: Frame 1 ActionScript
contents.stop();
numberOfTabs = 3;
for (i=1; i<=numberOfTabs; i++) {
line = eval("tab"+i);
line.onRelease = function() {
for (i=1; i<=numberofTabs; i++) {
otherTabs =
eval("this._parent.tab"+i);
otherTabs.bottomLine._visible =
true;
}
this.bottomLine._visible = false;
contentFrame = Number (this._name.substr(3,
1));
this._parent.contents.gotoAndStop(contentFrame);
}
}
tab1.bottomLine._visible = false;
tab1.onPress = function() {
gotoAndStop("DataPulse");
};
tab2.onPress = function() {
gotoAndStop("StructurePulse");
};
tab3.onPress = function() {
gotoAndStop("Courses");
};
Dynamic Text Fields, Formatting
I have two questions:
the first, can you use html in a text file and format COLOR in a dynamic text field in flash??
the second, i'm having trouble with maxscroll. I want my text in a text file to go to the end of the text when imported. When there are more lines in the text than can fit in the text field, the maxscroll works great and jumps right to the end. If there are less, the textbox says undefined. Is there a way to trigger it so that when the text in the text field goes over the size of the textbox, maxscroll kicks in???
there has to be an if function...
Its a simple problem, but my brain can't handle it at the moment
thanks everyone!
Formatting Dynamic Text Fields?
Is it possible to format single lines of text in a dynamic text field. At the monent I have bulk text in a text field, the only reason it is dynamic is so that it can have a scroll bar attached. When I try and format a single line i.e bold, italic, colour, indent etc it applies to the whole text and not just the highlighted line as it would if the text were not dynamic.
Is it possible to format dynamic text this way, if not, is there any cheats around this?
Please help...
cheers guys.
AS 2 Formatting Dynamic Text Fields?
Does anyone know why after about Flash 6/AS 1.0 you can no longer format dynamic text by simply using the text field properties? And any ideas for a work-around? I have several dynamic text fields on a page, populated with text from a .txt file. The text file is created through an admin page using PHP so it seems a little tricky using an html rendering solution. The easiest solution was to set the text field properties in the flash movie with the knowledge that any dynamic text input would take on those same properties....
Any ideas would be welcome.
HTML Formatting & Dynamic Text Fields
I’m sure this is a no-brainer, but I can’t see the wood for the trees right now. I’m pulling in some text from an external txt and dumping it into a HTML enabled, multi-line dynamic text field.
I’ve embedded the font’s I require and that doesn’t appear to be the problem.
The text in the txt runs as follows...
&bodyText=<*font size="16" face="HelveticaNeue Condensed" color="#FF6600"><*b><*i>Sub Head text<*/b><*/i><*/font>
<*font size="12" face="Helvetica 55 Roman" color="#666666">Body Text<*/font>&
(added * above to prevent HTML parsing)
Now, no matter what I do, I can’t get anything passed the end of the first <*/font> tag to display. So in the case of the above, all I get is a correctly formatted…
Sub Head text
...and that’s it. Nothing else.
Any suggestions you could make would be most gratefully received.
Thank you kindly.
HTML Formatting In Text Fields .... AHHHHG
There has got to be a better way then what I'm doing.
I want to let a user update a portion of their Flash page by using LoadVar and loading from a file the HTML text that is placed into a Text Field.
Problem is that I don't want the user to have to learn HTML formatting or for me to have to do it because its a pain...you know where.
I can type:
htmlText_txt.htmlText ="<P ALIGN="CENTER"><FONT FACE="Times New Roman" SIZE = "24" COLOR="#FF0000"><B>P.O. Box 170 Sheridan, Michigan U.S.A.<B><FONT><P>"
but to do this for each line is a pain...you know where for me or impossible for the person whos site I'm doing.
This then has to be converted to URL Encoding before loaded using LoadVar.
Is there a tool out there to make this ease for us people that don't want to waste the night away just to type in 10 lines in HTML formatting?
Please...LOL. This would be valuable to the user if I could find a easier way.
Thanks in advance and PEACE
Load External Text Into Multiple Text Fields
Can you load one (1) external .txt file into multiple text fields ?
I'm trying to create seperate variable names for the seperate text fields and reference them from one .txt file - - Is this possible ?
Dynamic Text Fields, .txt Files And Html Formatting
Basically like the title says, I have my dynamic fields loading external text files. I have the html formatting working, the basic bold, italics, and stuff.
Basically I am designing a site that will be updated by the customer, but with bad experiences from previous clients they screwed things up a lot and I'd have to go in and fix it. I want to create a site that can easily be updated with text files that they can put whatever they want...
A question though, with html formatting, is there a way to include <a href></a> tags so they can put in their own links? Or is this strictly for text formatting.
Any help would be gladly appreciated
Text Fields Weird Formatting Inside Buttons?
Hi folks
I'm getting strange text formatting inside buttons~ same font/size/formatting looks stretched inside some buttons and not in others. I can delete the text field and recreate it and it's still formatting strangely. Copy paste from one button to the other same deal. the text is sitting on button keyframes.
Anyone dealt with this?
thanks
AS3: Load Multiple Variables Into Multiple Dynamic Text Fields
I have a php file that makes this list
Code:
Cid1=3
&Lid1=22
&Title1=amazing
&Date1=1212128413
&Ext1=jpg
&Hits1=129
&Rate1=9.5000
&Cid2=1
&Lid2=22
&Title2=cool
&Date2=1212128413
&Ext2=jpg
&Hits2=129
&Rate2=8.5000
Now, I want to load the 7 bits of data into 7 dynamic text boxes.
I have to code to load a movieclip as a button onto the stage.
When I click that button I want the data to load.
I can kind of load all the data as a string into one dynamic field but don't know how to get each variable into a different text box. Any help would be great.
Regards,
Glen Charles Rowell
This is some working code for loading one variable but I need help with the rest please.
Code:
var url:String = "http://www.secretcanttellsorry.php?cid=3&orderby=ratingD&guid=on";
var Cid1:URLLoader = new URLLoader();
Cid1.addEventListener(Event.COMPLETE, completeHandler);
Cid1.load(new URLRequest(url));
function completeHandler(event:Event):void {
poptext.text = event.target.data as String;
}
Using Text Format For Multiple Fields In Multiple Frames
I'm trying to use Text Format to format all of my dynamic text fields in my movie. My code looks like this:
Code:
var content_fmt:TextFormat = new TextFormat();
content_fmt.color = 0x666666;
content_fmt.font = "Arial";
content_fmt.size = 12;
course_txt.setTextFormat(content_fmt);
I put it on the first frame of my movie. Unfortunately with setTextFormat, it needs to be set for every instance of text field. I don't want to have to copy and paste this code into keyframes across my whole movie. Is there a way to have it check for the field in each frame and apply the colors? Maybe with a for loop?
Loading Multiple Txt Variables Into Multiple Txt Fields From One Txt Doc - POSSIBLE?
I'm wondering, for efficiency sake, if it's possible to load into my main timeline multiple text variables from ONE external .txt document then have that information populate multiple dynamic text fields located in an MC within an externally loaded .swf. held in a containerMC on _level0?-eg path. _level0.containerMC.MCInstanceWithinLoadedSwf.???
If this is possible, how would it be done?Would I simply just use one loadvariableNum action for all?How would the text within the .txt doc be formatted?
- would I simply just list what each textfield variable is = to?
Apply Formatting To Multiple TextFields
welp -
heres where im at:
function defTxt(m){
for(i in m){
if(m[i] instanceof mx.controls.TextField){
//apply formatting function here, already made - working.
}
}
}
defTxt(_root);
Ive tried a few combos (_root, _level0, this)
nuttin!
any ideas?
Variable, Multiple Fields
So far I am able to bring up variables from a .txt file, make them appear in text fields, use buttons to display visually 2 choices from 2 buttons ".mp3", or ".wav". However, when I add a third button and make a new field for the choice to appear I just get "_level0.extension" and not the value of the variable EXTENSION
What am I doing wrong?
In the file mp3 and wav buttons are noted, result will appear above center from the buttons. The other field and button is what I am trying to get to display the EXTENSION value.
Text Across Multiple Fields?
I'm working on a virtual book project, in which a text file is read in and displayed page by page. Is there any way for me have a block of text start in one text field and continue in another? It's important for me not to use scroll bars, but for the text to divide into pages (and re-adjust if the font size is changed).
Multiple Scroll Text Fields?
Ok, I'm doing my very first Flash webpage. Everything is going according to plan. I bought a Flash MX book, about building your first flash webpage. And I love it, I'm learning alot from it. I knew Flash before the book, just not about making a webpage.
Anywho, I'm having troubles on the Scroll Bar. I got the scroll bar working, and text in there. The book showed me how. I just want to know how I can use the same scroll bar but at different frames. Here are a couple pictures on what I am talking about.
-
This picture is showing my webpage. As you can see there is the scroll bar, and I have clicked on the letter "A". There is the "A" text I want.
-
Now.
-
Here is the next picture. This is when I click "B". But theres the same text as "A". I don't want that, I want a blank text field for "B", so when I edit it later.
-
Also take notice, I have 2 text fields. One for "A" one for "B". Both are not in the same frame grid. As you can see here...
So to recap, I have a scroll bar text field in the "A" layer, that works fine. I copied the same scroll text bar field and pasted it into the "B" layer, but removed the text, so it was a blank text field. Also, it had the proper spacing. When I click on "A" it goes to the "A" text scroll bar. When I click "B" it stays on the "A" layer scroll text bar field, or it just doesn't move. I'm not sure.
Any help would be grealy appreciated.
Thank You!
Creating A Search For Multiple Fields
Hi there
I am needing to create a search box that will search on multiple fields from a SQL database. This is for a local intranet and I have no idea where to start. I am just a beginner at this and have very basic coding skills. any help would be greatly appreciated.
Creating Multiple Text Fields
I try to create with loop more text fields but i my code no works ;(
Code:
for (i = 0; i < total; i++)
{
var_descr_gall = "descr_gall_" + i;
_root.createTextField (var_descr_gall, i, 0, 0 * i, 200, 20);
var_descr_gall.border = true;
var_descr_gall.text = "aaa";
trace ("var_descr_gall = " +var_descr_gall.text );
}
}
The var_descr_gall.text is undefinied.
Later i need load in this text fields content of XML. Something like that:
Code:
var_descr_gall.text =xmlNode_gal.childNodes[i].childNodes[0].firstChild.nodeValue;
Thanks
Generate Multiple Text Fields
Hey Folks,
I am trying to create a loop that dynamically generates text fields. But I am not having much luck passing my counter to the text field name in order to create them dynamically. Has anyone done this, or would it be better to put a text field in a movie and then duplicate the movie. Any help would be greatly appreciated.
Tasker
Set AntiAliasType For Multiple Text Fields
Hi, can anybody point me in the right direction when it comes to setting antiAliasType="advanced" for all my text fields for a certain font type at a certain size?
I can set it manually for individual text fields, but have a whole website to apply it to.
Thanks.
Embed Characters In Multiple Fields
I'm trying to find an easy way to embed characters into dynamic text fields, rather than manually doing it to over 100 fields.
I've googled a bit, with no luck.
any ideas on something that might help?
Thanks.
Edited: 09/13/2007 at 07:39:28 AM by lucianb
Search Multiple Fields For Match
I have a dataset which filters my XML results according to category. I'm trying to get it to evaluate more than one field, but can't figure out how.
The code below works to filter on the first <category>, but won't touch the second. I've also tried naming them <cat1> and <cat2>, then adding both fields to the sort, and adding a second "return" at the end of the script assigned to cat2, but that doesn't work either - still only searches cat1.
Any help would be appreciated!
Attach Code
******ActionScript*******
//Set up sorts
dataSet.addSort("categorySort", ["category"]);
dataSet.useSort("categorySort");
//Create catListener EventListener
catList.addEventListener("change", catListener);
//Define EventListener Actions
function catListener(evt_obj:Object):Void {
var selItem:Object = evt_obj.target.selectedItem;
if (selItem.name == "All Categories") {
dataSet.filtered = false;
} else {
dataSet.filtered = true;
dataSet.filterFunc = function(item:Object):Boolean {
return (item.category == selItem.name);
}
}
}
*****XML*****
<signlist>
<sign name="Apple">
<category>Common Items</category>
<category>Food</category>
<description>This is how you do this sign...</description>
<sample>I love to eat apples</sample>
<url>apple.jpg</url>
</sign>
<sign name="Orange">
<category>Food</category>
<description>This is an orange</description>
<sample>Oranges are sticky</sample>
<url>orange.jpg</url>
</sign>
</signlist>
Sorting Array With Multiple Fields
Heya,
a quick question: I have an array that gets filled with values from a database and I want to sort things in Flash using the sortOn() function. I'm trying to create an array with a number of fields, like this example from the Help-files:
ActionScript Code:
var my_array:Array = new Array();my_array.push({password: "Bob", age:29});my_array.push({password: "abcd", age:3});my_array.push({password: "barb", age:35});my_array.push({password: "catchy", age:4});
However, I need a bit more fields and if I put all of these in one line, it gets kinda lengthy.
I tried something like
ActionScript Code:
var my_array:Array = new Array();for (i=0; i<10; i++) { my_array.push ( {prop1: "value_1_"+i} ); my_array.push ( {prop2: "value_2_"+i} );}
but this apparently doesn't work. Is there another way of doing this?
Cheers.
SortOn() Multiple Fields With Different Options
Hey,
I did a quick search of the forums but couldn't find much on this issue. I get the feeling this problem is anything but complex, but I can't seem to pull it off.
I have an array that contains search results and looks like this:
array[x].id :Number
array[x].sectionID :Number
array[x].occur :Number
array[x].title :String
etc...
I want to sort it by sectionID ASC and occur DESC (occurances). What I read in the documentation is that I can sort on multiple fields like so:
array.sortOn(["sectionID", "occur"], options);
But I need to specify different options for each fieldName while it seems the function only allows for one set of options. Any idea how I can get this done? Thank in advance.
btw: I'm using Flash MX2004
Creating Multiple Text Fields
I try to create with loop more text fields but i my code no works
Code:
for (i = 0; i < total; i++)
{
var_descr_gall = "descr_gall_" + i;
_root.createTextField (var_descr_gall, i, 0, 0 * i, 200, 20);
var_descr_gall.border = true;
var_descr_gall.text = "aaa";
trace ("var_descr_gall = " +var_descr_gall.text );
}
}
The var_descr_gall.text is undefinied.
Later i need load in this text fields content of XML. Something like that:
Code:
var_descr_gall.text =xmlNode_gal.childNodes[i].childNodes[0].firstChild.nodeValue;
Thanks
Create Multiple Text Fields Using For()
I'm using php (my native language) to populate content in my mc, and being new to AS I'm having trouble creating a script that will, essentially, create a text field for every record displayed via php/mysql. The basic idea of what I was thinking was something along the lines of
Code:
for(i = 0; i < phpRows; i++) {
this.createTextField("myPHPText"+i, 1, x, y, 10,10);
this.myPHPText_txt+i.text = phpVar+i;
}
I've used LoadVars() plenty of times to load static/specific variables into text fields in places where I'm only calling one row of data, but in this instance where I'm pulling multiple rows from a db and my php output would look something like...
phpVar1=somethignsomethingsomething
phpVar2=somethingsoemthingsomething
phpVar3=somethingsomethingsomething
...
then I'm not sure how to create the appropriate code in AS to handle a text field for every php variable. Thanks for looking!
Multiple Dynamic Text Fields
HI,
I have two movie clips: 'mc_gallery' and 'mc_preview'. one dynamic text instance: 'mc_text'
I have a lot of thumbanails in mc_gallery with one mc_text instance in which text changes for each thumbnail button.
Problem: I want another dynamic text filed in mc_preview to change too according to the thumbnails. I have tried naming the instance same and calling it from the buttons in mc_
gallery but its not working. Since the mc_preview is dragable I want the text to stay inside this mc_preview to inform about the preview showing
even if I put the same instance in mc_gallery it doesnt work. how do i do this?
Overflowing Text Into Multiple Fields
Hi, i'm building a site which centers around a book. The pages each have a textfield with a constrained size. What i'm trying to do is have the text load, and then have the text wrap from one field to the next when it reaches the end of the page, and continue on until the end of the text string. So depending on the size of the text string there could be 4, 5 however many pages.
I realize i could just substr() it by 500 characters or so, but tne tricky thing is having the string break on a space character, so that when the text goes from one page to the next it wont end in the middle of a word, and also so that its essentially close to the end of the page when it breaks, like you'd expect in a real book.
Does anyone know of a method to overflow text from one field to the next without breaking words up?
Are there also any methods of counting the character capacity of a textfield based on its static size?
I'm pulling the text blocks out of a database, so now i'm trying to do this with php, but if i could just retrieve the whole string and use an AS method that would be fine too.
thanks,
cc
Sorting Array With Multiple Fields
Heya,
a quick question: I have an array that gets filled with values from a database and I want to sort things in Flash using the sortOn() function. I'm trying to create an array with a number of fields, like this example from the Help-files:
ActionScript Code:
var my_array:Array = new Array();my_array.push({password: "Bob", age:29});my_array.push({password: "abcd", age:3});my_array.push({password: "barb", age:35});my_array.push({password: "catchy", age:4});
However, I need a bit more fields and if I put all of these in one line, it gets kinda lengthy.
I tried something like
ActionScript Code:
var my_array:Array = new Array();for (i=0; i<10; i++) { my_array.push ( {prop1: "value_1_"+i} ); my_array.push ( {prop2: "value_2_"+i} );}
but this apparently doesn't work. Is there another way of doing this?
Cheers.
Creating Multiple Text Fields
I'm drawing a graph in flash, and I need to draw a scale.
Inside a newly created movie clip (using createEmptyMovieClip):
Code:
for(i=0; i<=sizeY; i+=yScale) {
createTextField("mytext"+i,2,0,i,30,15);
["mytext"+i].border = true;
myformat = new TextFormat();
myformat.color = 0xff0000;
myformat.underline = true;
["mytext"+i].text=i;
["mytext"+i].setTextFormat(myformat);
}
The problem seems to lie with ["mytext"+i]... I got that convention from an example on this website, except that it was something like _root ["mytext"+i]. But I do not wish for the text field to be in _root... it has to be in the current movie clip.
Any ideas?
SortOn() Multiple Fields With Different Options
Hey,
I did a quick search of the forums but couldn't find much on this issue. I get the feeling this problem is anything but complex, but I can't seem to pull it off.
I have an array that contains search results and looks like this:
array[x].id :Number
array[x].sectionID :Number
array[x].occur :Number
array[x].title :String
etc...
I want to sort it by sectionID ASC and occur DESC (occurances). What I read in the documentation is that I can sort on multiple fields like so:
array.sortOn(["sectionID", "occur"], options);
But I need to specify different options for each fieldName while it seems the function only allows for one set of options. Any idea how I can get this done? Thank in advance.
btw: I'm using Flash MX2004
Scrolling Multiple Text Fields
I'm using CS3 (ActionScript 2.0). I have a movie that is using external XML to create dynamic text fields. Everything is working great except now the page gets larger than the storyboard and it will not scroll. How should I go about getting the following code to scroll?
// blah blah blah cut out
ap_xml.onLoad = function(sucess) {
if (sucess) {
parseFile(ap_xml);
showArray();
}
};
var numOfColumns:Number = 2;
function showArray(){
for (i=0;i<ap.length;i++) {
pod_x = (i % numOfColumns) * (290 + 10);
if (pod_x == 0) pod_x = 15;
pod_y = Math.floor(i / numOfColumns) * (200 + 10);
if (pod_y == 0) pod_y = 15;
this.createTextField("backdrop"+i, i, pod_x, pod_y, 450, 160);
this["backdrop"+i].background = true;
this["backdrop"+i].backgroundColor = 0xFFCC00;
this["backdrop"+i].border = true;
this["backdrop"+i]._width = 270;
this["backdrop"+i].html = true;
this["backdrop"+i].wordWrap = true;
this["backdrop"+i].multiline = true;
this["backdrop"+i].styleSheet = styles;
txt_title = ap[i].filetitle;
txt_desc = ap[i].filedesc;
txt_button = ap[i].filebutton;
txt_url = ap[i].fileurl;
myText = "<p class='filetitle'>" + txt_title + "</p>";
myText += "<p class='filedesc'>" + txt_desc + "</p>" ;
myText += "<p class='filebutton'><a href='" + txt_url + "'><img src='button.gif'></a></p>" ;
this["backdrop"+i].htmlText = myText;
}
}
Thanks in advance! Bobby
Text Fields, Multiple Frames
had trouble searching for this one, so if anyone knows a thread that addresses this please send me the link.
Bassically, I have a products project with multiple frames of products. I want the user to be able to enter the quantity of each item they want in each from, then on the last frame click a button that will total all the values they entered on the other frames. My questions is, how do I track what is entered on each frame?
Actionscripting Multiple Text Fields
I'm having GREAT difficulty trying to make multiple text feilds execute - or whatever the term is - upon publishing. I want to use multiple (well, two for now) of:
_root.createTextField(instanceName, depth, x, y, width, height);
to write text fields. It works fine when I have only one text field in the Actions - Frame, but, when I put the code for one of these below the code for the other, it won't write two text fields. I know this must be possible, but mine isn't working! <extreme exasperation>
help...
Multiple Dynamic Text Fields W/ 1 Xml Doc
I'm trying to populate 3 dynamic text fields using 1 xml. I am lost on how I thought it should work. Using the carousel as a base I named each one of the text instances
bio1
bio2
bio3
here is what I have so far and the xml...
Code:
<text>
<bio1 content="LimeWire is a peer-to-peer file sharing client for the Gnutella network. It is free software released under the GNU General Public License. Limewire was the first file sharing program to support firewall-to-firewall file transfers, a feature introduced in version 4.2, which was released in November 2004.LimeWire is written in Java and therefore runs on any computer with a Java Virtual Machine installed. To facilitate installation for casual users, installation packages are available for Microsoft Windows, Mac OS X, and in the RPM format for Linux. Support for Mac OS 9 and previous versions has been dropped with LimeWire 4.0.10. The Windows version of the LimeWire installer includes a version of Sun Microsystems' Java installer which will download and install version 1.5 of the Java Runtime Environment if it detects the machine does not have a recent version of Java installed." />
</text>
And then the .as
Code:
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.load("text.xml");
I realize I am probably missing something in my .as or i have my xml configured wrong. any help is appreciated as usual. :roll:
Formatting External Txt
hi there,
i load vars from a txt file into a loadVars object in order to display them in a dynamic textfield. furthermore the txt file is HTML-formatted. everything works out fine as long as i dont use tables.
is there a way to format the text with tables?
as usual every help appreciated
Scrolling In Multiple Text Fields..... Urgent
I have my site on the verge of completion. Except one issue keeps resurecting itself to haunt me.
My news page works fine right now. It loads a dynamic text field. It scroll that text great. But as soon as I put a textfield of any sort (static, dynamic, user input) into any other part of the movie, it refuses to scroll more then one line. Does anyone know why? And more importantly, does anyone know how to fix it?
Thanks for any help you can give
Scrolling Multiple Text Fields At Once Using The MX Scrollbar?
Hi guys,
I have 3 text fields in my movie. They all need to scroll at once in unison with each other (because the information is related).
So when the user drags the scrollbar up and down all three text fields scroll up and down at the same time. All fields are the same height.
How can I do this? Ideally I would like to be able to use the built in Scrollbar component of MX but it only seems to be able to scoll one text field at a time...anybody else done this yet?
Multiple Dynamic Text Fields Problem
I am creating a real estate map in Flash MX. One of the functions of this map is to coordinate recongnized "neighborhoods" with corresponding areas. For example, an area called "Lakeview" which contains the neighborhoods: Wrigleyville, Lakeview, etc. What I am attempting to do is create a button, which is the shape of the area. When the user rolls over that button, I want the "neighborhoods" to be pulled dynamically from a text file, but they all have to appear within the SAME dynamic text field. Here's what I've done...
I have a text file named neighborhoods.txt. In Frame 1, I used the loadVariablesNum to load the file. I also set the variable "neighborhood" to 0. I created a movieclip called neighborhood bar, which contains a dynamic text field whose variable is set to "textfield." The moveclip is named neighborhoodbox.
In the button, I used the following code:
on (rollOver) {
neighborhoodbox.textfield = eval("neighborhood" add "_rogerspark");
}
So what I'm assuming will happen is that when a user rolls over the Rogers Park area, Flash will dynamically pull the associated neighborhoods into the textfield and display them. But it doen'st work. Any ideas?
Write For Loop To Insert Value In2 Multiple Fields
hi, i'm using flash mx.
i've got four mcs, each of them got an answer field in it. how do i write a for loop that appends their values frm an array inside e field?
this is wat i've tried, of cuz it doesn't work.
for(k = 0; k<4; k++) {
("button"+k+1+".answer.text") = ansArr[k];
}
Length Converter And Multiple Input Fields
Ok..this one is a biggie-
I have multiple text boxes that are pixels, inches, feet, meters, miles and millimeters. I understand listeners but for the life of me, can't get this to work.
I need to have all the other textboxes change to specified mathematical equations to convert that length measurement of the one being typed in is. For example, you type "300" in the pixels box, and all the other boxes cange according to what you put, I am guessing a onChanged listener.
All the textbox names are in an array like this:
code: textboxes = new Array();
textboxes[0] = Pixels;
textboxes[1] = Inches;
textboxes[2] = Feet;
textboxes[3] = Miles;
textboxes[4] = Meters;
textboxes[5] = Millimeters;
And I'm having problems getting Flash to recognize that these are instance names of text boxes. I have gotten this as well:
code: for (i=0; i<textboxes.length; i++) {
trace(textboxes[i]._name);
}
Which has worked as well. Then, I get stuck. How can I get Flash to recognize that the focus is on one of these textboxes, then when it is changed, change all the others as well? This would be easy if I had one to change, but the fact of the matter is there are 6 and I can't find a way to get the text to change for any of em. Please help.
Embed Fonts ONCE For Multiple Text Fields
Hello, this is my first post here. I'm kinda new to Flash and I'm running in some problems. I have a contact form with several input text fields. I'd like to make the input text font a fancy one, so I need to embed it to render it antialiased and that it doesn't turns to device font in other machines missing the fancy fonts.
However the only way I've been able to accomplish this is embedding the fonts for *all* the input fields. This means tha for each input field the file grows about 20Kb. This, of course, is not acceptable.
I've read anywhere that embedding the fonts once should work, when adding the text fields with embedded fonts to the stage; well it doesn't. Using font symbols neither, I've created a font symbol and selected it as the font for the fields: it reverts to device font.
I'm using Flash 8 professional. Any suggestion will be very welcome. Thanks and regards,
Alvaro Medina G.
Multiple Dynamic Text Fields In One Movie
hi everyone
i am trying to load eight different dynamic text fields from various parts of my movie onto one screen.
I am collating answers from the kids I teach about a certain topic and am using the dynamic text fields to then line up their answers against the true answer (mine..!!??). So there will be my answer and then theirs in another color.
The first dynamic text field works fine, but the others below this one do not display the any of the information requested from the kids at an earlier part of the website.
Can i use multiple dynamic texts?
Any help would be much appreciated.
Thanks
Auto Rock
Help With Multiple Text Fields (I'll Love You Forever)
Hi. So I suck at ActionScript, I know Java, so it should make sense, but the language seems very buggy to me.
Anyway, here's my issue. I can create one textfield fine:
_root.createTextField("my_txt", this.getNextDepth(), 775, 150, 500, 500);
my_text.text = "text";
works fine, yadda, yadda.
But, as soon as I add another textfield
_root.createTextField("my_txt2", this.getNextDepth(), 100, 150, 500, 500);
my_txt2.text = "something else";
only the second text field shows up--the first one disappears. I don't really know what the deal is, this doesn't make any sense to me.
Any info would be greatly greatly appreciated.
Thanks!
Controlling Multiple Text Fields With One Scrollbar
how do i cetup up one scrollbar for multiple text fields?
Im guessing you nest all the text fields in a movieclip then add the scroller to the movieclip.. any ideas on how to do that? Is there another way? any help would be awesome.
|