Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Dynamic Text Fields Are Blank After Loading Data



This is really bugging me...In my AS I load XML data into an array for titles which will be used later in dynamic text fields. I trace this, all of the titles load fine into the array. I use a for loop to attach a movie which has a dynamic text field inside of it. The movie attaches just fine, in a verticle menu just like I want it. The dynamic text field has the right instance name inside of it. I set the text field instance name to the array, but it didn't show anything in the text field. I knew it was there since it was Selectable and the selection cursor pops up whenever I hover over where it should be. So I create a string variable like so to try and go around whatever is messing it up:
Code:
var item_mc = t_thumbs_mc.attachMovie("theatreThumb","t"+k, t_thumbs_mc.getNextHighestDepth()); item_mc._y = 110 * k; item_mc._x = 0; var play_name:String = t_titles[k]; item_mc.play_txt.text = play_name; trace(item_mc.play_txt.text);
that's a bit taken out of context (it's based on the Squirrels XML tutorial) but it works fine when I trace the t_titles[k] and play_name and everything. when the trace in that code runs, it gives me a list of all the names that are SUPPOSED to be there, but they don't show up when I actually look at the movie. The dynamic field is named properly, not animated in any way, not anti-aliased, using Arial as its font, the color doesn't match the background, all of that stuff I've checked. Would it be easier for me to just dynamically generate the text field itself too instead of having one in the attached movie? I didn't think I would have to since having the dynamic field in the attached movie clip works in the Squirrels XML tutorial.I'd upload the full FLA but it has a dozen other things in it which are working fine.



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 08-19-2006, 09:09 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

[F8] Loading XML Data In Dynamic Text Fields?
Hi all,

I have tried everything possible to get an XML file to load data into dynamic textfields on my site. However, NOTHING has worked and, trust me, I have been at this for a long time. Can anyone suggest any good tutorials for this? Preferably one that discusses both the creation of the XML file and the AS in the .fla? I'm desperate! Thanks

Loading Different XML Data Into Different Text Fields.
I'm new in XML, and i would really appreciate your help on my problem.

So, basically main idea is to load different information, e.g: Name, E-mail, Duties of a team members next to the visual "tables" where are they seated from one XML file. I've mannaged to load information for one member, but can't do it for all the others, only sollution that I found is to make different XML file for each person , but I'm 100% sure there is a possibiltiy to load it via one XML for each member. Maybe I can give an ID to each "table"? Please help!
Here is my XML code:
Code:

<?xml version="1.0"?>

<tables>
   <table>
      <name>Jhon La la</name>
      <comment>qwertyqwertyqwertyqwertyqwerty</comment>
   </table>
   <table>
      <name>Xml bot</name>
      <comment>qwertyqwertyqwertyqwertyqwertyqwerty</comment>
   </table>
</tables>

And here is my AS code:
Code:

function loadXML(loaded) {
if (loaded) {
_root.name = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.comments = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
name_txt.text = _root.name;
comment_txt.text = _root.comments;
} else {
  trace("file not loaded!");
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("tables.xml");

Displaying XML Data In Dynamic Text Fields With AS3
Hi Everyone,

I am trying to display XML data into dynamic text fields on my timeline.

So I am working on my personal site, justinbrinkerhoff.info (the swf on there is old, and I'm updating it now). I am working the fla file, and am reading data from an xml file. The problem is, the syntax I am using is not showing the values inside the dynamic text field, and upon exporting the swf.

So here is what I have.

The fla/swf are both named jbDOTinfo
I am working within a keyframe of which I created to show my portfolio; Flash, *ML, PHP, Rails, etc... Well I am working in frame 27, which I created to house the "page" so to speak for my PHP portfolio page.

Within frame 27, I have the main content on one layer, and the embedded actionscript on another layer. Now, on the main layer, the dynamic text field instance name is phpInput. My XML filename is php.xml, located in a child directory named xml (xml/php.xml).

Here is my AS3 syntax:


Code:
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadPHPxml);
xmlLoader.load(new URLRequest("xml/php.xml"));
function LoadPHPxml(e:Event):void {
xmlData = new XML(e.target.data);
parsePortfolioPHP(xmlData);
}

function parsePortfolioPHP(portfolioPhpInput:XML):void
{
trace(portfolioPhpInput.item);

var title = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
// url = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
phpInput.text = title;

}
I can find my way around fairly well with ActionScript, but this is hurting my head. When I export the SWF file, and I navigate my way to frame 27 through the SWF, I get this output:


Code:
TypeError: Error #1010: A term is undefined and has no properties.
at jbDOTinfo_fla::MainTimeline/parsePortfolioPHP()
at jbDOTinfo_fla::MainTimeline/LoadPHPxml()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
I know its something simple, I just cant think what it is. Everything I've tried so far gets me the same or similar results.

If anyone could help clear this up for me, it'd be greatly appreciated.

MX - Dynamic Text Fields Using External File Data
I am new to Flash MX ActionScript. I understand how to create dynamic text fields.
Code:
_root.createTextField("myTextField",0,200,200,200,30);
with (myTextField) {
text = "Dynamic Text";
background = true;
backgroundColor = 0xCCCCCC;
}

myTextFormat = new TextFormat();
with (myTextFormat) {
font = "Arial";
size = "20";
color = 0x000000;
}

myTextField.setTextFormat(myTextFormat);
I also understand the process to load external text from a text file into a text field with a name assigned to the Var: field.
Code:
loadVariablesNum("text.txt",0);
I have been unable to combine the two processes to load external text into a dynamically created text field. I appreciate any assistance.

Sincerely,

LoNeRaVeR

Loading MySQL Data Into Flash Text Fields
Hey, I'm trying to load two fields from a MySQL database into one dynamic text field in Flash.

I use a PHP script to move the data from MySQL to Flash and Flash uses the PHP to load the data.

Heres the PHP script...

<?PHP
//Connects to the database
$link = connNBT();

//Get the stories from the mysql database
$query = "SELECT story, UNIX_TIMESTAMP(date) FROM newsTable ORDER BY date ASC ";
$result = mysql_query ($query)
or die ("Query failed - $query");

$i = 0;
$returnData = "";
while( $myrow = mysql_fetch_row($result) ) {

$story = $myrow[0];
$date = date("F j, Y", $myrow[1]);

$returnData .= "&story" . $i . "=" . $story . "&date" . $i . "=" . $date . "&";
$i++;
}

mysql_close ($link);

$data = "num=$i&" . $returnData;
echo $data;

//Function to connect to database
function connNBT() {
$link = mysql_connect ("localhost", "username", "password")
or die ("Could not connect");

mysql_select_db ("databasename")
or die ("Could not select database");

return $link;
}
?>



...and heres the actionscript I have in the first frame of my Flash movie...


function getStory() {
var myStories = new LoadVars();

myStories.onLoad= setStories;
myStories.load("storyEngine.php",myStories,"POST");
}
function setStories() {
if( this.num != "" ) {
for(var i=0; i<this.num; i++) {

displayNews.htmlText = this["story"+i];


}
}
}



____

Can somebody tell me why Flash isn't loading the MySQL data??

Loading Dynamic Text With A Blank Keyframe
I have set up a dynamic text field (named "btn_txt"), within a movie (btntxt_mc), within a movie (button_mc), within another movie (b1). I want to dynamically load my link text into each button, and it works fine, so long as I place the AS code within any of the first three symbols. Once I place the code in my "b1" movie, or in the "button_mc" movie in anything less than frame 30 (where the "btntxt_mc" enters) it stops loading the dynamic text.

From what I can tell, this is because I do not load my "btntxt_mc" movie clip until frame. When I change it so that it loads right away on frame 1, I am able to load the text from the higher level, "button_mc".

I want to be able to load all my information from the _root of this file so I can eventually run it all from an .xml file and have it distribute to all the different buttons properly.

Can anyone explain what I can do to bypass this annoyance and why this is happening?

PS - I would attach the .fla but I can't find an option to do so

Displaying Tablular Data, Scrolling Multiple Dynamic Text Fields
Hi guys,

I'm trying to figure out the best way to do this, and am not entirely sure so would like your input on what you reckon is the best method to use.

Flash system is for a publishers site, with simple ASP backend used with loadVars etc to load in text. What is wanted is a display of all the titles with release date, author name and range in a scrollable table.

Initially I had thought of doing the following. Create the text fields, apply text, attach scrollbars with 3 invisible, set all scrollbars to have the same scrollPosition. However this seems to be a bit of overkill, and on some of the office macs it seems to use an excessive amount of processor power and slows everything down.

Anyone have any better ideas?

R

XML Loading, Dynamic Buttons, Dynamic Text Fields...
My last thread kind of died, I guess, so here's another one that I hope will get me some help; it has an updated FLA attached and what I think to be some better descriptions of my problems... I know I'm totally indebted to whomever will help, but this is an emergency and I need some timely advice.

so here's the FLA, XML, and some sample images: kirupaTest2.zip

1. I pretty much have the enlarged pictures loading I guess, which was my major problem before, but it doesn't matter because I can't get the code to "know" which of the dynamic thumbnails has been clicked (by "know", I mean return an index value, say 0 through 7 if there are 8 projects, that I can use to access that particular project in the array of 8 projects in the rest of the code)... So if the third movieclip thumbnail were clicked, I'd like "2" to come up somehow... I've tried this code, which is kind of lame, I know, based off of the idea of each of the thumbnail movieclips' names ending in their index number:

ActionScript Code:
//"this" is the button that was pressed; would return a string ending in//thumberMC_<number of whichever movieclip thumb was clicked>var: testString:String = this; //storing how many characters are in the string above...var: stringNumb:Number = testString.length;//using that value to take off the last string (hopefully the number)var: finalString = testString.charAt(stringNumb);


And that didn't work. (The code above was entered around line 71 in the layer "actions"; it's gone now)


2. An even bigger problem is I have some containers being drawn dynamically from height and width values pulled from an XML file. When I test the code that creates the objects using hard-coded values, it works fine; say if I put 481 in for the width and 375 for the height. But if I try to do it (sort of) dynamically like:


ActionScript Code:
var picHeight:Number = projects[5].bigPics[0].picHeightvar picWidth:Number = projects[5].bigPics[0].picWidth


it gets all screwed up; please try it for yourself in the supplied FLA. It's hard to describe what goes wrong; some things are drawn, and others aren't. I think it's because the objects are trying to draw before they have the data to draw with. This can be seen at lines 129 and 130.


3. Lastly, there's a dynamic textfield I'm trying to create that never shows up for some reason. Again, you could see in the FLA (in the "createDrawer" function around line 424).

If I can clarify, please let me know.

Dynamic Loading Text Fields
hi i was just wondering if anyone could help me out with the problem ive hit using text fields.. what i am trying to do is load an external txt file into a textfield which is created by actionscript and that part ive got working fine. the problem i have is i dont know how to add an arrow to scroll down the text or a scrollbar. the second problem i have is with formatting.. is there anyway i can format differant words without the whole lot being formatted example:
this name needs to be bold the description needs to be italics would anyone be able to help me??
thank you

Loading 2 Dynamic Text Fields..
Hi,

This is my problem. On my site i want to load in a couple of dynamic text fields from the same level(_level5) into another .fla also the same level (_level0) my problem is that i cant work out how do to this. I can only get one text field to load into the page at a time. I know that the higher level covers the lower level but i was hoping that 2 text fields loaded into the same level from the same .fla file would work. Anyone know how i can achieve this?

Thanks...

Loading 4 Txt Files Into 4 Different Dynamic Text Fields... How Can This Be Done?
Hello i was wandering how i can load multiple external txt files into multiple dynamic text fields.,.. the code for loading just one is working fine.... but i am new to AS3 and dont know how to do this....

heres my code,

code: var external_txt:TextField = new TextField();
var externalReq:URLRequest = new URLRequest("external.txt")
var externalLoad:URLLoader = new URLLoader();

externalLoad.load(externalReq)

externalLoad.addEventListener(Event.COMPLETE, textReady);

external_txt.x = 600;
external_txt.y = 100;
external_txt.border = false;
external_txt.width = 50;
external_txt.height = 20;

addChild(external_txt);

function textReady(event:Event):void
{
external_txt.text = event.target.data;
}



any ideas? thanks in advance

Only 1(of 2) Text Fields In Custom Component Defined By Variable Is Always Blank-why?
Hi,

I have made a custom component in Flash MX 2004, and all it has right now is two dynamic text fields whose content is defined by a variable, and a link whose url is defined by a variable also.
I enter the values for these variables in the parameters area of the properties window, but when i preview my movie, the only thing that shows correctly (i.e. has text in it) is one of the two text fields...the other is blank.

I have uploaded my fla at this address:

http://www.lucid-life.com/my_component.fla.zip

Is anyone able to see what I'm doing wrong?

It's weird...that one works and the other doesn't.

Thanks..
Cheska

Loading Dynamic Text Fields Using External Files
I'm loading a dynamic text field using an external .txt file on the same folder with the url=htext.txt

When I view the swf file, it works. However if I view the htm page with the swf embedded in the page, the text doesn't show up.

Can anyone tell me why or what did I do wrong?

Thanks,
gw630

Loading Dynamic Text Fields Using External Files
I'm loading a dynamic text field using an external .txt file on the same folder with the url=htext.txt

When I view the swf file, it works. However if I view the htm page with the swf embedded in the page, the text doesn't show up.

Can anyone tell me why or what did I do wrong?

Thanks,
gw630

Problem Loading Variables Into Dynamic Text Fields
Hi everyone. I'm trying to load some text from a .txt file into a dynamic text field (for use as a "news" section of my site) and it isn't working.

I have the dynamic text field named "newstext" and the text file is called "news.txt". It's always in the same directory as my .swf.

In the text file itself, it says:

&thetext=test!


In frame 1 of the layer that newstext, the text field is on, the actionscript is:

loadVariables("news.txt", _root)
newstext.text = _root.thetext

It just doesn't work. I don't understand. Any suggestions would be greatly appreciated, thanks much.

Noah

Help Loading Sorted Array Results Into Dynamic Text Fields
I am trying to load the results of an array and I can't figure it out. Basically what I am doing is sorting a list of 7 numbers from a "test", dropping the lowest 4, and keeping the top 3. I then need to identify the top three by the letter associated to that number, and have the results display in three seperate dynamic text fields.

.nt1 would be the total number of times that "A" was selected, .nt2 would be the total number of times that "B" was selected, etc.

//------here is the code that I am using

var score_array:Array = new Array();
score_array.push({score:_root.nt1, letter:"A"});
score_array.push({score:_root.nt2, letter:"B"});
score_array.push({score:_root.nt3, letter:"C"});
score_array.push({score:_root.nt4, letter:"D"});
score_array.push({score:_root.nt5, letter:"E"});
score_array.push({score:_root.nt6, letter:"F"});
score_array.push({score:_root.nt7, letter:"G"});
score_array.sortOn("score", Array.NUMERIC);
for (i=0; i<score_array.length; i++) {
trace(score_array[i].score+":"+score_array[i].letter);

}
var topThree_array:Array = new Array();
var topThree_array = score_array.splice(4);
for (i=0; i<topThree_array.length; i++) {
trace(topThree_array[i].letter);
}
//--------

when I test the script it works, and the results are accurate and show up in the output panel as exected:

0:E
0:F
2:A
6:D
6:C
6:B
8:G
C
B
G

When I am stumped is how to get the C, B, G to show up in their own text boxes as the sorted top 3 results. This is my first attempt at scripting this advanced...if anyone can help me that would be awesome, if you have a better way of getting the results - let me know - or if you can point me to a resource that will show me how to - that would rock.

Loading Text In Dynamic Text Fields
Using Flash MX.

In FlashMX I created a dynamic text box and typed my variable name in the variable field.

I created a text document...tried in Word and SimpleText...and in the first line typed the variable name followed by an = sign. It looked like this

about =

I guess after that I should type the text I want to be displayed.

On the first frame of the movie I added an action. LoadVariables and I typed the name of the text document in the URL field. It is living in the same place as my flash file.

I guess this is supposed to load the text document which loads a value for a variable which I have used to label my dynamic text element.

I did this following steps in a book called FlashMX Action Script for Designers by Doug Sahlin.

It's not working and I've tried it several times.

Anybody know of an easy way to load a text document into a dynamic text box?

<

-643

Help With Loading Dynamic Data From Text Files
HELLO,

I familar with the process of loading data from text files. My question is this, Does anyone know how to comment out & and ' symbols from text so that flash sees these symbols as text and not as operators that seperate variables?

Hopefully my question makes sense basically i am using the & symbol to seperate variables but I need to actually use the & symbol in some of the data also ' and " symbols don't display either I am assuming the same process to display & can be used for displaying ' and " symbols.

Thanks for your help.

Loading External Data Into Dynamic Text Box [variables]
I am able to load the txt document fine but it stops the text wherever there is the symbol "&" .

Example: Get the new design & web package now.

I t gets cut off at: Get the new design

Is flash reading the " & " symbol as code, and if it is how can i get around it. Is there a tag to put around it to read it as text and not code?

help..


thanks

Loading Dynamic Text On Rollovers & Parsing The Data.
Need Help,
I've been trying to call in text dynamically on rollover.
I just want to use one text document with multiple variables, and have multiple invisible buttons that access different variables in the text document as user rolls over. I did something similar to this in AS2. using LoadVarNum, but things are different in AS3.
I was able to load my TXT doc, but i only want it to show when data is called.
Get the btn's rollover working, but I'm stuck on how to parse out the data for the rollover.

// instantiate the URLLoader class
var loader:URLLoader = new URLLoader();

// Set the URLLoader's dataFormat property to the static constant shown
loader.dataFormat = URLLoaderDataFormat.VARIABLES;

// load the text file, making sure the path itself is an instance of URLRequest
loader.load(new URLRequest("sample.txt"));

//btn. & listener w' rollover
cp_home_txt.addEventListener(MouseEvent.ROLL_OVER, over);
cp_home_txt.addEventListener(MouseEvent.ROLL_OUT, out);

//loading in parsed data text1
loader.addEventListener(Event.COMPLETE, function(evt:Event):void {
content_txt.text = evt.target.data.text1;
}

)
//I put a trace here for now, but i don't know what function should be in place to call data.
function over(evt:MouseEvent):void {
trace("over: " + evt.target.name);
}

function over(evt:MouseEvent):void {
trace("out: " + evt.target.name);
}
I want to eventually use an XML, but TXT docs are what I have now. Can someone out there please help?
Thanks
JD

Issue Loading Data Into Dynamic Text Box On Movie Clip
Hi all,

I am working on a project where names can be dragged and dropped on to a floor plan, for seating arrangements.

My issue is the following:
Unable to load data into the dynamic text boxes of duplicated movie clips, which are scrollable.

My duplicated movie clips are from a movie clip called itemClip which has a dynamic text box with an instance name of itemLabel.

My data is from an xml file and loads perfectly (as I found out from trace).

My movie was working fine , except for being able to scroll the list of peoples names, which is what I am trying to accomplish. I now have the movie clips scrolling, but no data populates the text box.

I am assuming that I have the path wrong somehow and am not sure how to correct it

Here is the code:


Code:

menuXml = new LoadVars();
menuXml = new XML();
menuXml.ignoreWhite = true;
menuXml.onLoad = function() {
menuItem = this.firstChild.childNodes;
for (var i = 0; i<menuItem.length; i++) {

item = _root.main.attachMovie("itemClip", "itemClip"+i, i);
item._x = 280;
item._y = 24*i;

var data = menuItem[i].firstChild.firstChild.nodeValue;
item.itemLabel.text = data;
bottom = main._y+mask_mc._height-main._height-space;
}
};
menuXml.load("lit.xml");



main is the name of a movie clip, into which I load the duplicated movie clips so they are scrollable. There is a whole bunch of other code but I feel the error is here somewhere with me being able to tell the data where to go!

I have only been playing with actionscript and flash for the last month and would appreciate anyone pointing me in the right direction!

Thanks Shaan

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");
};

Not To Send Dynamic Fields With Mailform Data. Howto?
I'm not great in actionscripting...

Got a preloader with dynamic fields (loaded, total, percent) in my mailform.swf loaded in target into main movie.

Clicking on "Send" of my mail form, dynamic fields are sent too to the cgi script (and it obviously triggers an error page).

On the "Actions" layer of the preloader, on frame (after the preloading loop) I tried to set:

var total = ""
var loaded = ""
var percentage = ""

but... it sends them with null value.

On the "visual" layer of the preloader, on frame 3 I put a keyframe and deleted my preload mc

I even put blank keyframes on frame 4 of both layer of the preloader
but still...

Please.. let me understand...

P.S. I'm sorry I posted this message on F5 General Help too. It was a mistake.

XML Data To Text Fields
Hi,

I'm trying to display a single record out of an XML database into dynamic fields in my MovieClip. I need to be able return a single record based on the current time. Attached is a sample of my XML data.

I was wondering if this could be acheived with a DataSet filterFunction? If it is possible, what code would I need to include?

Finally, do I need to pass my full DataSet to an array or do I need to filter first & then pass to an array?

Thankyou.

Elton Bernardson.










Attach Code

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gigs>
<gig>
<date>23/06/2007</date>
<title>IBM Dealers Conference</title>
<displayStart>09:00</displayStart>
<displayFinish>13:00</displayFinish>
<displayTimes>10:00 am - 12:30 pm</displayTimes>
<logoPath>D:
oot_pathlogosibm_01.jpg</logoPath>
</gig>
</gigs>

Filter XML Data For Text Fields.
Hi,

I'm trying to display a single record out of an XML database into dynamic fields in my MovieClip. I need to be able return a single record based on the current time. Attached is a sample of my XML data.

I was wondering if this could be acheived with a DataSet filterFunction? If it is possible, what code would I need to include?

Finally, do I need to pass my full DataSet to an array or do I need to filter first & then pass to an array?

Thankyou.

Elton Bernardson.










Attach Code

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gigs>
<gig>
<date>23/06/2007</date>
<title>IBM Dealers Conference</title>
<displayStart>09:00</displayStart>
<displayFinish>13:00</displayFinish>
<displayTimes>10:00 am - 12:30 pm</displayTimes>
<logoPath>D:
oot_pathlogosibm_01.jpg</logoPath>
</gig>
</gigs>

Filter XML Data For Text Fields.
Hi,

I'm trying to display a single record out of an XML database into dynamic fields in my MovieClip. I need to be able return a single record based on the current time. Attached is a sample of my XML data.

I was wondering if this could be acheived with a DataSet filterFunction? If it is possible, what code would I need to include?

Finally, do I need to pass my full DataSet to an array or do I need to filter first & then pass to an array?

Thankyou.

Elton Bernardson.









Attach Code

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gigs>
<gig>
<date>23/06/2007</date>
<title>IBM Dealers Conference</title>
<displayStart>09:00</displayStart>
<displayFinish>13:00</displayFinish>
<displayTimes>10:00 am - 12:30 pm</displayTimes>
<logoPath>D:
oot_pathlogosibm_01.jpg</logoPath>
</gig>
</gigs>

Dynamic Loading A Video Clip In A Blank MC
Hello everyone,

For the last 2 weeks I been trying to dynamic load a video clip into a blank movieclip.

My movies is setup up like this:

I have 3 videos with three button and one blank movieclip call myVideo. If I click on anyone of the button I want the video for the button to run in the MC. I don't want to load it as a SWF because I want to control the video ActionScript.

Any ideals on how I should start it, any tutorial or codes?

Help

Dynamic Text... Why Are You Always Blank?
below is the code i'm using for a preloader...
everything works great except the dynamic text
instead of showing the percentage, it's just being blank... which is weird because i've used this preloader before annnnd the trace is working properly

any help much appreciated!


ActionScript Code:
stop();
_global.myRootTwo = this;
import mx.transitions.Tween;
import mx.transitions.easing.*;
myRootTwo.container.loadMovie("waltek_v11.swf");
myRootTwo.container._alpha = 0;
myRootTwo.preloader.bar.destx = 0;
//
myRootTwo.preloader.bar.onEnterFrame = function() {
    total = myRootTwo.container.getBytesTotal();
    loadedBytes = myRootTwo.container.getBytesLoaded();
    percent = (int(loadedBytes/total)*100);
    //
    //***************************
    //HERE's MY PROBLEM
    myRootTwo.preloader.loadText.loaderText = percent+"%";
    trace(myRootTwo.preloader.loadText.loaderText);
    //
    //***************************
    if (this._x>=199.5) {
        var alphaChange:Tween = new Tween(myRootTwo.container, "_alpha", Regular.easeOut, 0, 100, .5, true);
        myRootTwo.preloader._visible = false;
        delete this.onEnterFrame;
    }
    else {
        this.destx = 2*percent;
        this.mlx = (this.destx-this._x)/5;
        this._x += this.mlx;
        //
        myRootTwo.preloader.loadText._x = this._x;
    }
};

Problems With Number Data Type In Text Fields
Hiya!

I'm working on a mathematical application but I have a questions I can't answer myself.

I have numbers in different textfields but when I perform addition on them to put the result in another textfield the numbers are just concatenated. Ex:

tres = uno_txt.text + dos_txt.text;
tres_txt.text = tres;

gives 9090 if uno and dos have 90, 90

played around with the var whatever:Number = alot on all the variables but to no avail. Also trid referring to the textfield data both as textfield variables and as the textfields text properties.

What can I do?

Emailing Data Found In Input Text Fields
Hi,
I have a simple form that users fill in various "input" text fields like "Name", "Email", etc... now all I want is when the click on the "send" button, it should automatically send an e-mail to "info@...".

I got it to enter the proper recipient email address and subject but there's not content. What am I missing?

Thanks,
Phalconheart









Attach Code

var url:String = "mailto:info@myclients.com";
var request:URLRequest = new URLRequest (url);
var variables:URLVariables = new URLVariables();
variables.subject = "Booking Request";
variables.recipient = "info@myclients.com";

function sendForm(event:MouseEvent):void{
variables.item = itemChoice.text;
variables.citychoice = var_cityChoice.text;
variables.appt_time = var_timeChoice.text;
variables.client_name = var_clientName.text;
variables.address = var_clientCity.text;
variables.cellphone = var_clientCellPhone.text;
variables.email = var_clientEmail.text;
variables.ref1 = var_clientRef01.text;
variables.ref2 = var_clientRef02.text;
variables.handle = var_clientHandle.text;
variables.findUs = var_clientFoundUs.text;
variables.comments = var_clientComment.text;
url = URLRequestMethod.POST;
request.data = variables;
navigateToURL(request);
}

this.btn_sendInfo.addEventListener(MouseEvent.CLICK, sendForm);

Dynamic Text OK On HD, Blank Online
Hi all,

I've spent the last 6 months working on my first Flash project. I've made heavy use of dynamically loaded text.

The text window is in a root level 'menu' swf. The menu options load a new swf which in turn populates a text field back in the menu swf, got it?

Right, now, this all works great on my local PC. Last night, I ftp'd all the files to my host (www.theglobe.com). The non text portions of the swf's work ok.

None of the text displays! What's up people?
The directory structure online is the same as on my PC. The ftp prog I used showed file permissions as 777 (wide open).

I think I'm gonna' cry...

Blank Window In Dynamic Text Box
hi
I have a dynamic textbox that is filled usin an external textfile. The box has HTML checked so that i can include links and alike in the text file, i have it linking to urls fine, but i cannot work out how i can get a url to open in a new blank window, as Iit seems only certain tags are accepted inside of dynamic text boxes.

is this correct? if not how can i do this?


cheers

3quid

Cafe Townsend // Using External Text Data To Fill Fields
Hey guys,

I am new to Flash and I have started to play around with text parsing and I have run into a problem. I am trying to using the Cafe Towsend sample then include an external text file to fill the description information. I keep getting a Undefined message. Any assistance would be greatly appreciated. EDIT: I just realized that if I apply one of the variables from the loaded text file to this section


Quote:




menu_mc.title_txt.text = this._parent["image"+currImage+"title"];
menu_mc.description_txt.text = this._parent["image"+currImage+"desc"];




that particular variable works. So I guess the real question is How do I cycle through all the variables depending on what image is being view?

Heres my actionscript code

Code:
//Load Text File
loadText = new LoadVars();
loadText.load("description.txt");
loadText.onLoad = function() {
image0T = this.image0T;
image0D = this.image0D;
image1T = this.image1T;
image1D = this.image1D;
image2T = this.image2T;
image2D = this.image2D;
image3T = this.image3T;
image3D = this.image3D;
};
//the following 4 sections contain the data
//for each menu item
/* 0 */
var image0title:String = image0T;
var image0desc:String = image0D;
var image0uri:String = "image0.jpg";
/* 1 */
var image1title:String = image1T;
var image1desc:String = image1D;
var image1uri:String = "image1.jpg";
/* 2 */
var image2title:String = image2T;
var image2desc:String = image2D;
var image2uri:String = "image2.jpg";
/* 3 */
var image3title:String = image3T;
var image3desc:String = image3D;
var image3uri:String = "image3.jpg";

var currImage:Number = 0;
var totalImages:Number = 4;

menu_mc.title_txt.text = this["image"+currImage+"title"];
menu_mc.description_txt.text = this["image"+currImage+"desc"];

for (var i:Number = 0; i<totalImages; i++) {
slideShow_mc.slides_mc["holder"+i].loadMovie(this["image"+(i)+"uri"], slideShow_mc.slides_mc.getNextHighestDepth());
}

slideShow_mc.slides_mc["holder4"].loadMovie(this["image0uri"], slideShow_mc.slides_mc.getNextHighestDepth());

// function for the Next button
function nextMenuItem(eventObj:Object) {
slideShow_mc.gotoAndPlay("slide"+(currImage));
if ((currImage+1)>=totalImages) {
currImage = 0;
} else {
currImage++;
}
menu_mc.title_txt.text = this._parent["image"+currImage+"title"];
menu_mc.description_txt.text = this._parent["image"+currImage+"desc"];
}

// add the event listener for the Next button
next_btn.addEventListener("click", nextMenuItem);
and finally heres what my text file looks like

Code:
&image0T=this is the title for 1&
&image0D=this is the description for 1&
&image1T=this is the title for 2&
&image1D=this is the description for 2&
&image2T=this is the title for 3&
&image2D=this is the description for 3&
&image3T=this is the title for 4&
&image3D=this is the description for 4&

Dynamic Text Field Appearing Blank
I am writing a script to dynamically build a store by pulling items and infomation from a DB into flash. All the data is correctly put into this function below. My problem is, the photo is loaded correctly using the

this["item" add i].img.loadMovie(photo);

code. However the price and aname dynamic txt fields dont display the text passed to them. Cant figure out why, they where working earlier. Why would they not be working? Is there a certain level that a clip can't use dynamic txt? Thanks.

Code:
function addStoreItem(item, description, photo, price, numberinstock, available, shipping, size, weight, paypalcode){
size = item.length;
for(i=0;i<size;i++){
if(i != 0){
duplicateMovieClip(item0, "item" add i, i);
this["item" add i]._x = i * 200;
}else{
}
//THESE BELOW ARE NOT LOADING ............................

this["item" add i].price.text = price[i];
this["item" add i].aname.text = item[i];

//THESE ABOVE ARE NOT LOADING.............................


if(photo[i] == Null){
photo = "http://www.andyottomusic.com/swf/logo3.swf";
}else{
photo = "http://www.andyottomusic.com/images/" add photo[i];
}
this["item" add i].img.loadMovie(photo);
if(photo == "http://www.andyottomusic.com/swf/logo3.swf"){
this["item" add i].phototxt.text = "false";
this["item" add i].img._y = 30;
}
} //foor loop end
} //end function

Detecting Blank Fields
Hey whats up users I am using Flash MX 2004...

I am having problems with detecting blank fields in flash. I want to do this. I setted up one input text box and I named the variable subject. then I made a little button. Then I made another second frame where that will say "Thank you for sending the message"Afterwards in the send button I inserted the following code...

on (release) {
if (subject eq ""){
stop();
} else {
gotoAndStop(2);
}
}

But even if the subject textfield is blank, once I click on the button it still goes to the second frame when its not suppose to do that. If the input textfield is blank then nothing should happen thats why the stop(); function is there but once the field is not blank then the user should be forwarded to the second frame. Im confused. I hope someone replies.

My Dynamic Text Field Is Blank When I Embed Font
Why's my dynamic text field blank when I embed the font chosen?

The text field loads text from an external .txt file with html codes.

There's no problem when I mark "No charaters" but when "All" or "Only" is marked the text field is blank?!?!?

I've tried to remove the html codes from the external file, but it makes no difference!

Radiobuttons Show Up As Blank Fields
I'm having more problems with Flash . I'm very frustrated because I can get these radiobuttons to work in a new movie, but just not in my current movie!

If I go and create a new flash document with a radio button, it'll work just fine. If I insert a radio button ANYWHERE in the project I'm working on, it'll show up as a blank field when the movie is compiled. I don't understand this at all. Is there any explanation for something like this?

[cs3] Flash/php Form - Blank Fields
Hey people, I just created a website in flash and added a contact form to it...problem is every time I test it I receive an email with blank fields.

HERE IS THE CODE OF MY FLASH BUTTON:

on (release) {
if ((name != NULL) && (email != NULL) && (subject != NULL) && (message != NULL)) {
stop ();
} else {
loadVariablesNum ("form.php", 0, "POST");
gotoAndStop (7);
}
}

AND THIS IS THE PHP CODE:
<body>
<?

$to = "silvia.mele@yahoo.ca";
$msg = "Name: $name

";
$msg .= "Email: $email

";
$msg .= "Subject: $subject

";
$msg .= "Message: $message

";

mail($to, $subject, $msg, "From: .WE-ART.COMMENT.
Reply-To: $email
");

?>

What am I doing wrong? I am quite new with PHP and don't understand it very well. THANKS!!!

Form Validation (1 Of 2 Fields Blank)
Hi
i'm trying to set up my form so that if both the email and phone number are blank, it will kick them to the error message, but if one of them is filled out it will be ok. Currently, if either is blank it sends them to the error mesage.
i am using this code.

Code:

on (release) {
   if (form.name_txt.text == "")
   {
   gotoAndPlay(2);
   }
   if (form.email_txt.text == "")
   {
   gotoAndPlay(2);
   }
   if (form.phone_txt.text == "")
   {
   gotoAndPlay(2);
   }
   if (form.date_txt.text == "")
   {
   gotoAndPlay(2);
   }
   if (form.location_txt.text == "")
   {
   gotoAndPlay(2);
   }
   else
   {
   form.loadVariables("form.php", "POST");
   loadMovie ("thank-you.swf", 8);
   }
}

Thanks

XML Data Displayer, Help Adding Multiple Data Fields Relating To XML
I recently used the Displaying XML Data tutorial, but cant seem to figure out how to add more dynamic text fields and populate them with more <person> and <comment> attributes.

Here is my code:

function loadXML(loaded) {
if (loaded) {
_root.inventor = this.firstChild.childNodes[2].childNodes[0].firstChild.nodeValue;
_root.comments = this.firstChild.childNodes[2].childNodes[1].firstChild.nodeValue;
name_txt.text = _root.inventor;
comment_txt.text = _root.comments;
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("inventors.xml");

and xml:

<?xml version="1.0"?>

<inventors>
<person>
<name>Thomas Edison</name>
<comment>Inventor of many things such as the incandescent lightbulb.</comment>
</person>
<person>
<name>Doug Engelbart</name>
<comment>Invented the mouse at the Stanford Research Institute</comment>
</person>
<name>Patrick</name>
<comment>did this xml file</comment>

</person>
</inventors>

I am trying to display Patrick - and did this xml file.

Could you please help me figure out what I am doing wrong here?

Dynamic HTML Text Fields Do Not Display Formatted Text?
Flashkit.com,

In Flash MX I am developing a lot of movies using dynamically populated html text fields. When the user does not have a font I used on their machine swapping happens on all dynamic and input fields. Only static fields display the corrent font. I make sure the text field properties are embedding the fonts. Still all of the dynamic html text fields do not display the formatted text. I have .fla samples I can email to anyone.

I have tried these macromedia solutions with NO success:

http://www.macromedia.com/support/fl...t_outlines.htm

http://www.macromedia.com/support/fl...namic_text.htm

http://www.macromedia.com/support/fl...haredfonts.htm

Does anyone have a working sample .fla they can send me?

-Jimmy

Dynamic HTML Text Fields Do Not Display Formatted Text?
Flashkit.com,

In Flash MX I am developing a lot of movies using dynamically populated html text fields. When the user does not have a font I used on their machine swapping happens on all dynamic and input fields. Only static fields display the corrent font. I make sure the text field properties are embedding the fonts. Still all of the dynamic html text fields do not display the formatted text. I have .fla samples I can email to anyone.

I have tried these macromedia solutions with NO success:

http://www.macromedia.com/support/fl...t_outlines.htm

http://www.macromedia.com/support/fl...namic_text.htm

http://www.macromedia.com/support/fl...haredfonts.htm

Does anyone have a working sample .fla they can send me?

-Jimmy

CSS In Dynamic Text Fields - Font-family Causes Text To Disappear
Hi,

I've set up my dynamic text field, and I can apply other CSS properties
successfully, but when it comes to the font-family property, the text
within the class just disapears.

Does anyone have any idea why this is happening? The problem occurs
even when selecting standard fonts such as arial.

Thanks,

Dylan James

Dynamic Text Fields In A Dynamic Menu
Anyone can advise how to give names(i.e home,service...) for textfields in a dynamic drop down menu instead of getting the original sequence (ie. text0,text1,text2) or button1,button2,etc...Help please

Dynamic X_ Propert For Dynamic Text Fields
Hello there.

I want to generate a dynamic text field in action scrip, but I want the length to dynamically adjust to suite the load of the external txt file. So when I change the text I won't have to adjust my text fields or action script.

Can this be done and if so, how would I go about doing it?

Thank you,

RSB

Creating Dynamic Text Fields Within Dynamic Mc
Im using this xml "data.xml":

HTML Code:
<XML>
<salesreps>
<rep>
<firstname value="Jon"/>
<lastname value="Doe"/>
<phone value="(555)999-9999"/>
<email value="jondoe@yahoo.com"/>
<description value="Description for Jon Doe."/>
<photo value="../LandAm/images/wes.bmp"/>
</rep>
<rep>
<firstname value="Jane"/>
<lastname value="Doe"/>
<phone value="(555)555-5555"/>
<email value="janedoe@yahoo.com"/>
<description value="Description for Jane Doe."/>
<photo value="../LandAm/images/robin.jpg"/>
</rep>
<rep>
<firstname value="adfkljasdfl;kj"/>
<lastname value="l;kajglaskdj"/>
<phone value="kdfjgls;dkjg"/>
<email value="dfgkljsdlg;"/>
<description value="kjdgfl;asdkgnl;sakdnglkj"/>
<photo value="../LandAm/images/nophoto.jpg"/>
</rep>
</salesreps>
</XML>
I want to generate a mc for each rep with 6 text fields containg the 6 values for eash rep. So for this xml there would be 3 mc's with 6 text fields in each. This is one of my first times really diving in to xml parsing in Flash.

I just need a push in the right direction. Thank you for you time!

Loading Text Into Mulitple Fields From A Single Text File
Hi there. I am trying, and failing(so no soucre) to make text load dynamically into multiple fields.

I am trying essentially to load text using only one text document- into several fields. This is so I can run a very primitive cms system in flash. (all the fields need to call different portions of the text.

If anyone understands what I mean and how it could be done, it would be great

Dynamic Text Fields
Hi there.....

Uhrm.....i just made a new site in Flash MX (look at it at www.dokuritsu.nl).....but.....i used some dynamic text fields. Now that isn't a problem, only i dont want ppl to copy paste the text.

1. Is there a posible way in Flash to disable this?
2. Is there a way to disable the right mouse click or as on some sites if you push the right mouse button fill in some own text?

Sorry for my bad english.

Thx ya all !

}_EsAD_{ AmunRa
the Netherlands

Dynamic Text Fields
I have scolling dynamic text fields, I size them to what I want. When I save the fla with MX the fields automaticly get resized to how much text is there, thus make the field nonscollable. How to I prevent this.
- Thanks for you help

Copyright © 2005-08 www.BigResource.com, All rights reserved