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




Dynamic Text Box Dont Display All Data



I load long string (news text) from xml to dynamic texbox.

Besause string is too looooong dynamic text box dont show all data.

How can i know wich data is visible, so that the rest of it could load in another dynamic text box. Text box must be fixed size.

thx



FlashKit > Flash Help > Flash ActionScript
Posted on: 12-29-2004, 12:55 PM


View Complete Forum Thread with Replies

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

Display Data Into A Dynamic Text Field
Some characters (ñÑáéíóú..etc) do not display correctly in flash mx, the dynamic text (html format) displays an square instead of the character when i read from an external file or when i try to display data from my db (php/mysql)...why is this happening in flash mx?? with flash 5 all the characters appear correctly...!!! ???

Dynamic Text Array To Display Data From XML File
Hello

I'm new in the forum,i want to make a photo gallery which loads images, thumbnails and description from XML file , no problem with that http://www.kirupa.com/forum/showthread.php?t=242767
i made the Gallery in one column, want to add dynamic text field beside each thumbnail in order to display description
i used this code, but i didn't work


Code:
this.createTextField(my_txt[i], 1, 100, 100, 300, 100);
my_txt[i].multiline = true;
my_txt[i].wordWrap = true;
var my_fmt:TextFormat = new TextFormat();
my_fmt.color = 0xFF0000;
my_fmt.underline = true;
my_txt[i].text = description[i];
my_txt[i].setTextFormat(my_fmt);
can anyone help me to find a tutorial to do so ?
Thanks!

[F8] Button And Text Dont Display On Site For Some Users
Hi There,

I have designed our web site solely in flash and we have found that ceratin customers cant see the buttons or text on our web site.

www.omega-completion.com

It would appear that their browsers arent automatically updating their flash player to the latest version.

Can i add html test in my index page to force the browser to download the latest flash player before loading the site????

Cheers

Easiest Way To Display Dynamic Data?
Hi all,

What is the easiest way to display dynamic data (text) in a structure similar to an HTML table (in function, not necessarily in appearance) within a Flash movie? Using Flash MX 2004.

Many thanks,
~C~

Enduser Upload Of Dynamic Data For .swf Display
I'm looking at a project in which some of the images, text and maybe video will be loaded dynamically off the server. The owner will be periodically uploading more and more of all of these items. When he does, they should be available for display in the interface of the .swf. It may require talking to a database or getting the assets from a directory structure with text files or whatever. I'm fine with programming that aspect of things.

My question pertains to how some of you would have the owner of the site upload his data. A ftp client or database front end is too user unfriendly for him. He's suggested a blog because it would be easy for him to use. I haven't worked that much with them, but I'm concerned that it might be too restrictive and configuring it to my needs could be more trouble than it's worth.

I could build a html form that talks to PHP on the server and upload and store data that way.

Maybe there's a CMS system out there that could handle this easily and make my work easier.

I've done plenty of reading data off of servers, but not much in the way of user front ends in this particular way. Any thoughts on this? Which method would you work with that's not so time consuming to set up and still easy for endusers to use?

Dynamic Combobox Data Display Issue -
All,

I am a newbie in AS world.

My data is ';' separated. So I am able to get the data display in the form of "IBM;Microsoft;Symantec" in one row (where actually combobox should display "IBM", then 'Microsoft" then "Symantec" -- in 3 rows).

I am using following code for attaching data to combobox and display it.

NOTe: I am using query result (salesforce api call).. I ALREADY TRIED TAKING DATA IN ARRAY INSTEAD OF ARRAY COLLECTION (WITH SPLIT OF ';' but failed. so dont know how to do it.. CODE SAMPLE WOULD BE APPRECIATED AS I HAVE ALREADY SPENT 2-3 DAYS ON THIS

apex.query("Select Competitor__c from Competitor_Info__c where NAME = 'AUTOSYS'", new AsyncResponder(function (qr:QueryResult):void
{
// simple example of maping query results into a data provider
if(qr != null && qr.records != null && qr.records.length>0)
{
ResultList = new ArrayCollection(qr.records.source);
comboBox.dataProvider = ResultList;
comboBox.labelField = "Competitor__c";
}
},initQueryRetrieveFault)
);


PLEASE HELP... CODE SAMPLE WOULD BE APPRECIATED...

Thx for your time and effort.
Shiri

Dynamic Text Dont Show HELP
Hello. Got a seriouse problem going on.
I have a flash movie (M1) with an empty MC where I load another movie (M2) . On the loaded movie (M2) I have a dynamic textfield where a .txt file is dynamic loaded. When I test the movie M2 everything works as it should. But when I test M1 and the m2 load , the text does not appear. I can scroll with my scroll bar component though , but I dont see the text. I am sure my text has different color than the background.
What could be wrong?

Please help a poor guy out.

Dynamic Text And Scroll Bar Component Dont Work Together
I cant seem to get dynamic text(loaded from a .txt file)and a scroll bar component to live in harmony. I can get both to work independently from eachother. Anyone know the fix?

Dynamic Text + Mask + Mc Button Dont Work
I have in this layer position the following

--------
mc button
--------

--------
dynamic text which i set as a mask
--------

--------
pattern that i want the text to loook like
--------

now the mask is set property and looks good but where the mask is my MC button is not registering a hit . the buttonMode = true is set on the mc button and the hand dissapears when its around the mask..

FONTs are embedded.

Load Movies And Dynamic Text Fields Dont Wanna WORK
Hi there!
I have a movie with a main navigation.
This main navigation loads a swf when clicked, which brings up another sub-menu. When each sub-menu item is clicked, each loads a new swf file with dynamic text contained in them.
PROBLEM: The first text does not unload when the other buttons are clicked!!
I have attached the files so that you can get a clearler picture of what I'm saying. These targets and load movies are really messing me around!!!

Thanks....

[CS3] Won't Display Right In Firefox, Dont See Embed
http://********christodoit.com need to figure out how to get the flashg to display correctly in firefox and safari, I know it has something to do with teh embed vs. object feature but am confused, ideas? Please

Dont Display The Right Side Menu
How can I get this, is a JavaScript or a ActionScrip ??

OOOOO

Since Im allready here...

How can I get a flash movie to resize in , like...

if a resize the IE, i want that the movie also ajust to the size of the IE...

You know what I mean ??


thanks Ya'll...

Gifs Dont Display Properly In Flash
Ive been messing around in flash with some pixel art (GIF) and noticed the SWF had the images misplaced.

Here is how it looked like in Flash MX.


but when I published it was like this.


Here is the .swf file so you can see whats wrong.
http://www.julestm.net/1/dudemaker.html

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

Display Problem Of Static Text And Dynamic Text
When editing fla file, these two text look same, but when I press ctrl+enter to export a swf file, they look different.

3x

Dynamic Text File Doesn't Display All Of The Text HELP
Hi everyone, I have a flash site that I created for a church, and on the homepage my client wanted to have a section called Announcements, where she could easily update the text from that section. To accomplish this, I went to the Kirupa tutorials for dynamic text files in Flash.

I used the XML (or was it PHP) code, pasted it in my Flash movie, opened up Notepad to create my text file, and began inserting paragraphs of text in the Notepad. I attached a scrollbar to the dynamic text file since I wanted to see all of the paragraphs. Scrolled down to the bottom, and then quite surprisingly the rest of the paragraphs were cut off!

The website I'm working on is www.jonesumc.org, and the Announcements section and scrollbar are on the bottom left side of the homepage. The paragraph cut off was originally supposed to say:

FINANCIAL LITERACY BOOT CAMP The Financial Literacy Boot Camp for ages 5 - 18 will be held July 10th - 14th here at Jones. Applications are available today! Three levels offered, Elementary, Jr. High & High School. Our mission to “Expose & Empower” our children & youth to positive financial tools. Volunteers are needed for the week. See Hilary Byrde for more details.

Instead, the scrollbar and textbox cuts the paragraph to the word "Jr. High"
Does anyone know what the problem is?

This is the code inside Flash that allows the text file to communicate with the dynamic text box:

Code:
loadText = new LoadVars();
loadText.load("announcement1.txt");
loadText.onLoad = function() {
announce1.text = this.announce1;
};
The dynamic text box has an instance name of announce1, and the Var is labeled: announce1
The dynamic text box doesn't have any actionscript applied to it. The line type of this box is also Multiline, and the text wraps inside the box.

Inside Notepad, at the very beginning I was told to type "announce1="
Immediately after the equal sign, I could write any kind of text I wanted to. Instead of hitting the ENTER key I pressed the SPACEBAR key several times until I created a new line of text.

As for the code, that's it! There wasn't really anything complicated with the code and putting things together. In order to fully understand my problem I recommend taking a look at kirupa's tutorial for dynamic text. Thanks for your help!

Any Ideas On Why My Popup Windows Dont Display In Netscape?
Hey everyone.

I have put some javascript on a button in my movie to open a popup window. It seems to work fine in explorer, but when clicking the same button in netscape, nothing happens.
This is the code I am using on the button:

javascript:window.open('http://www.enter your url here.com','name of the window','width=570,height=650,top='+((screen.heigh t/2)-(NaN))+',left='+((screen.width/2)-(NaN))+',toolbar=no,scrollbars=no,resizable=no,men ubar=no,status=no,directories=no,location=no');%20 void(0);

If anyone has any ideas that would be great. I am confused as to why it would not work in netscape.

cheers

gavin

Dynamic Text Won't Display
I just started using ASP with flash. I've gotten numbers in a Access table back into flash, but can't get text to display in a dynamic text box. I'm looping to give it plenty of time to load, but still won't work. Here's the ASP code which works for numbers.

<%@LANGUAGE="VBSCRIPT" %>
<%
Option Explicit

Dim Conn, fldName, fldEmail, fldMessage, fldDate, fldAddress, fldPhone, fldVillage, strsql, strname, stremail, strmessage, strdate, strphone, straddress, strvillage

Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open("contactus")
strsql="SELECT fldName, fldAddress, fldEmail, fldPhone, fldVillage, fldMessage, fldDate FROM tblGuestBook"
Set rsRecords = Conn.Execute(strsql)
strname = rsRecords("fldName")
straddress = rsRecords("fldAddress")
stremail = rsRecords("fldEmail")
strphone = rsRecords("fldPhone")
strvillage = rsRecords("fldVillage")
strmessage = rsRecords("fldMessage")
strdate = rsRecords("fldDate")


response.write"&fldName" & "=" & strname

response.write"&fldAddress" & "=" & straddress

response.write"&fldEmail" & "=" & stremail

response.write"&fldPhone" & "=" & strphone

response.write"&fldVillage" & "=" & strvillage

response.write"&fldMessage" & "=" & strmessage

response.write"&fldDate" & "=" & strdate

response.flush

Why won't a dynamic text box with a variable name fldName display the value in my Access table? I've tried so much I feel it may be something simple like there is a difference between numbers and strings in the code which I'm unaware of. By the way in Flash I'm looping around
loadVariables ("search.asp", "", "POST"); with an if statement of if fldName = Joe goto next frame.


Thanks

Can't Get Dynamic Text To Display
I have 4 instances of a smart clip on the same timeline with different names. The one variable being set is the location of the text file I'm importing text from. 4 simple buttons are used to navigate the site. The buttons send the curser, if you will, to the frame that has the appropriate instance of the clip. The clip is a container for a scrolling text box. The dynamic text field is named "text" and the one variable being set in each of the text files is named "text". The output window shows this:

Level #0:
Variable _level0.$version = "WIN 5,0,30,0"
Variable _level0.text = "start • This is some sample text. • end"
Movie Clip: Target="_level0.instance1.SkillsBox"
Variable _level0.instance1.SkillsBox.textFile = "html/skills.txt"

This is the statement to load the text:

loadVariablesNum(eval ("textFile"), 0);

VERY new to Flash so any help is appreciated. Thanks in advance!

Dynamic Text Display Bug?
I'm reading a .txt file to populate a dynamic text field in my Flash MX program. An example of the text I'm pulling in is:

&Menu=Line1
Line2
Line3
Line4
Line5 . . . and so on.

For appearance I've entered a -7 for Line Spacing in the Format Options box. This vertical spacing looks good when I test my movie.

The problem comes when I run the .swf file from my UNIX based ISP. The text displays but is compressed in the vertical (lines laying over each other).

Has anyone else noticed a similar problem or have a solution? Thanks for any help!

Dynamic Text Won't Display.
For some reason when I view my web page www.angelfire.com/creep/booger at my school, it won't display any of the text, but as you might be able to see it works everywhere else! Does anyone know what the deal is?

Dynamic Text Won't Display
Anyone have any guess as to why this is happening:
I have a dynamic text field with the font set to _sans.
I'm using the text to display preload progress. Works fine locally but the text won't show up when the site is on the web server.
I've checked everything over and over...
the text field has a variable name, etc. etc.

What's weird is that it works when I test it using "show streaming" but it doesn't work live.

Dynamic Text Display
Hi,

Wanna display value of variable through external text file. Its omitting + sign while displaying text.

Any solution ?

How To Display In A Dynamic Text Box
myXML = new XML();
myXML.ignoreWhite = true;
function parseXML(success) {
if (success) {
baseNode = this.firstChild;
myLength = baseNode.childNodes.length;
var i = 0;
myContent = new Array();
while (i < myLength) {
contentPush = new Array();
myYear = baseNode.childNodes[i].childNodes[0].firstChild.nodeValue;

contentPush["myYear"] = myYear;

myContent.push(contentPush);
delete contentPush;
i++;
}
}
}
myXML.onLoad = parseXML;
myXML.load("timeline.xml");

In the above code I can trace the "myYear" values, I want to display those values in a dynamic text box in the stage, I tried with "mytextbox.text=myYear;" but it shows undefined, how to do this
need help


thanks
ravi

'€' And '+' Won't Display In Dynamic Text Box
Hi, I'm using the actionscript below to retrieve text into a dynamic text box. I've also embedded a font that the dynamic text boxes are set to display entitled 'Codex LT' by adding it to my Library and changing the Linkage Properties to 'Export for ActionScript' and 'Export in first frame'.

All of this works brilliantly - the text is retrieved and is displayed as Codex LT even on computers that don't have the font installed. The only problem is that the dynamic text box refuses to display certain characters such as '+' and '€', even though it does display other similar characters such as '=' and '$'. Codex LT (see link) definitely does include the '+' and '€' characters. I even tried replacing Codex LT with Arial and the problem still remained.

I tried adding more glyphs via the Embed option in the dynamic text box's properties box but it has zero effect. I tried adding all the Latin characters, then I tried to add the '+' character via the 'Include these characters:' option and then I tried the 'All (39477) glyphs' option but after each attempt I published my movie and the '+' character failed to appear. I originally embedded the Codex LT font by importing it into my library and changing the 'Linkage properties', as when I tried to embed the font via the Embed option in the properties panel it didn't seem to embed the font at all.

Do you know how I can fix this?

Many thanks,

Leo


Code:
path = "http://www.stpatrickscommunity.org/admin/text/landline.php"; // this should retrieve the text '+ 353 (0) 71 9620175'
lv = new LoadVars();
lv.onLoad = function(){
str = unescape(this);
str = str.split("=&onLoad=[type Function]").join("");
landline.html = true; // landline is instance name of textfield
landline.htmlText = str;
};
lv.load(path);

How To Display In A Dynamic Text Box
myXML = new XML();
myXML.ignoreWhite = true;
function parseXML(success) {
if (success) {
baseNode = this.firstChild;
myLength = baseNode.childNodes.length;
var i = 0;
myContent = new Array();
while (i < myLength) {
contentPush = new Array();
myYear = baseNode.childNodes[i].childNodes[0].firstChild.nodeValue;

myContent.push(contentPush);
delete contentPush;
i++;
}
}
}
myXML.onLoad = parseXML;
myXML.load("timeline.xml");

I have a code above, I can trace "myYear" values, I want to display those values in a dynamic text box on the stage... how to do that?? need help

Dynamic Text Display On An SWF
I have a SWF that displays a stock ticker's price.

The price and ID of that stock are inside a MYSQL table. Now, I pass the SWF a flashvar of the stock's ID and I want the dynamic text to display the corresponding price.

I know how to pull the price into the actionscript via xml. But displaying the text is done how?

I've seen examples where they display data in a list like:

List_variable.dataProvider = data_provider;

Where data_provider is an array you populate from the xml.

But is there a way to do this with a single object? A list component is a bit inefficient for this, it's just the only example code I can find.

What component would you use and are there example codes to simply place dynamic text on it?

Thanks a bunch

Display Dynamic Text From ID?
I have an XML file setup to display the ID and text, and different text is associated with each ID. My problem is I can't figure out how to adjust my actionscript to allow me to designate the ID (in the code) and have it display the text associated with that ID in the movie/textfield.

Here's what my XML file looks like:


Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<ROOT>
<news ID="1" URL="IndexPic01.jpg" >
<body><![CDATA[Some text in here... yada yada yada bla bla bla]]></body>
</news>
<news ID="2" URL="IndexPic02.jpg" >
<body><![CDATA[More text in here... yada yada yada bla bla bla]]></body>
</news>
<news ID="3" URL="IndexPic03.jpg" >
<body><![CDATA[Some more text in here... yada yada yada bla bla bla]]></body>
</news>
<news ID="4" URL="IndexPic04.jpg" >
<body><![CDATA[Yet more text in here... yada yada yada bla bla bla]]></body>
</news>
</ROOT>
And here's the actionscript I've pasted together that I'm trying to use. This is displaying text in the dynamic textbox...but it's always from the last entry (which is the 4th) and I don't know how to make it use the others manually.


Code:
theNews = new XML();
theNews.ignoreWhite = true;

theNews.load('admin/IndexImage/xml.php'+"?cK="+random(9999)+1);
function Article( ID, body){
this.ID = ID;
this.body = body;
};

Article.prototype.putOut = function(bodytxt){

if (this.body == undefined){
this.body = "Loading...";
}

movieTxt.bodytxt.htmlText = this.body;

};
function articleOut(xml){
_global.numArts = xml.firstChild.childNodes.length-1;
info = xml.firstChild.childNodes[at].attributes;
body = xml.firstChild.childNodes[at].firstChild.firstChild.nodeValue;
// trace(body);
body = body.split("
").join("
");
body = body.split("<strong>").join("<b>");
body = body.split("</strong>").join("</b>");
body = body.split("<em>").join("<i>");
body = body.split("</em>").join("</i>");
body = body.split("</p>").join("</p><br>");
body = body.split('size="3"').join('size="12"');
body = body.split('size="4"').join('size="13"');
body = body.split('size="5"').join('size="14"');
body = body.split('size="6"').join('size="15"');
body = body.split('size="7"').join('size="16"');
body = body.split("<div").join("<p");
body = body.split("</div>").join("</p>");
body = body.split("&middot;").join("·");
body = body.split("&hellip;").join("…");
body = body.split("&ldquo;").join(""");
body = body.split("&rdquo;").join(""");
body = body.split("&rsquo;").join("'");
body = body.split("&ndash;").join("-");
body = body.split("&bdquo;").join(""");
// trace(body);
currArticle = new Article(info.ID, body);
currArticle.putOut("bodytxt");
delete currArticle;
delete info;
}
trace(_root._width);
theNews.onLoad = function(){
articleOut(this);
at = numArts;
articleOut(this);
}
articleOut(theNews);

Dynamic Text Won't Display
I don't know if this is a bug. I have a movie that contains a dynamic text. When I run it, the text displays fine. But when the said movie is run through another movie clip (using loadMovie), the dynamic text won't display. Any ideas why? Thank you.





























Edited: 10/24/2006 at 12:29:50 AM by dongzky

Can't Display Dynamic Text
I do the same thing as it is shown in the tutorial but still the dynamic text area is empty when I run the page.
I will write the things step by step so you may tell me about the problem
I open my flash5
I create a new empty text area
I switch to dynamic text
Single line is sleceted
I select HTML and Border/Bg
I enter test as a variable name
Then I select the text area and convert it to a movie clip symbol
Then I right click on the symbol and click actions
I add the actions and the line looks like this
onClipEvent (load) {
loadVariables ("http://localhost/test.php", "this", "GET");
}
Then I create the php file which looks exactly like this
<?php
$x = "abc";
print $x;
print "test=$x";
?>
Then I click publish in flash, it generates the files and when I goto http://localhost/test.html I see the text area I created but it is empty.
I am nearly going mad I couldn't find what is wrong, someone pls help me

Thanks

Dynamic Text Display
Another problem by me, I'm trying to display external text via CSS in the Impact font but for some reason everytime I preview my .fla file the Impact text looks horrible. I put some Impact text static on the page and it looked find and when I changed that to Dynamic that altered itself to the horrible text! Why is it doing this?

Frustration or what!

Lewn

Dynamic Text Display
Hey I have this problem with dynamic text... this code is located inside 2movie clips...

scene1 -> MovieHolder -> MovieAboutText

Whenever i "Test scene" and im inside the MovieAboutText the dynamic text is located from the www.address... and displayed in the dynamic text box (Works Fine)
however...
Unfortuately whenever I click "Test Movie" the dynamic text fails to load... im not sure why this would work while you are inside the actual movie but not 2levels about...
Here is my dynamic text code within the MovieAboutText:

var format = new TextField.StyleSheet();
var path = "http://www.asmithphotography.co.uk/a...style_main.css";
format.load(path);
format.onLoad = function(success) {

if (success) {
inText.styleSheet = format;
myLoadVar = new LoadVars ();
myLoadVar.load("http://www.asmithphotography.co.uk/a...aphy_about.txt")
myLoadVar.onLoad = function (success){
if (success == true) {
inText.variable = "asmithphotography_textdata"
inText.htmlText= myLoadVar.asmithphotography_textdata;
loadText.onLoad = function() {
inText.text = this.asmithphotography_textdata;
}
}
}
} else {
inText.text = "Error loading CSS file!";
}
};

Thanks for looking...

Display Object From Child Class ? Sound But No Video. I Dont Get It...
So I have a main package with a main class, then it breaks down into children from there (I think thats how you explain it). I am trying to stream a video and get it on the stage. I know my issue is with adding the display object but I dont get it - I have too many forum posts / books open but I just cant seem to get it. How do I get it to display when compiled? I can hear the sound but cant see it.

Main Package:

package core {

import flash.display.*;

public class SecretSolutions extends MovieClip {

var secretsXMLFile = "../xml/secrets.xml";

public function SecretSolutions() {

var secretsXML = new GlobalXML;

var secretsVideo = new GlobalVideo;

secretsVideo.showVideo();

secretsXML.importXML(secretsXMLFile);
}
}
}


Global Video Package

package core {

import flash.display.*;
import flash.net.*;
import flash.events.*;
import flash.media.*;

internal class GlobalVideo extends MovieClip {

public function showVideo () {


var video:Video = new Video(320,240);

addChild(video);

var nc:NetConnection = new NetConnection();

nc.connect(null);

var ns:NetStream = new NetStream(nc);

ns.addEventListener(NetStatusEvent.NET_STATUS, onStatusEvent);

function onStatusEvent(stat:Object):void{

trace(stat.info.code);
}

var meta:Object = new Object();

meta.onMetaData = function(meta:Object){

trace(meta.duration);
}

ns.client = meta;

video.attachNetStream(ns);

ns.play("video_001.flv");

}
}
}


Thanks in advance and for any insight - Im new to AS3

How To Get Commas To Display In Dynamic Text > 999?
Just starting with actionscript, so I've just got basic code here.
reps, shows, and unitcost are variables for input text,
pressing button performs calculation to yield result into dynamic text variable annualcost...
However, how do you get the commas to display on numbers greater than 999?

The code on my calculate button reads:
-----------
on (release) {
annualcost = reps*shows*unitcost*12;
}
-----------

Thanks.

Display Value Of Array In Dynamic Text Box?
i have an array setup like so:

var mp3 = new Array();
mp3[0] = "myMP3";

when i try to set the variable in a dynamic text box to:
_root.mp3[0] nothing displays

is this possible?

if i do:
var text = "hello";

then set dynamic text box variable to _root.text it works fine and displays hello

please help

Dynamic Text Doesn't Display
hello,

i'm trying to load an external txt file into a dynamic text field inside a moiveclip. this works fine when i test the scene.

but when i place this movieclip on the stage and test the movie again on the main timeline. the text doesn't display.

is anyone can help me to solve this problem? or, it will really help if you have any sample file that can share with me.

thx!

Help With Dynamic Text Field Display
hi all,

i have a movie clip within my main timeline that is controlled by three buttons. each click on one of these three buttons, executes a script that loads data from an external text file into the above mentioned movie clip. the text loads correctly but my problem is this:

let's say the buttons are called "button one", "button two" and so on. if you click "button one" the appropriate text is loaded and displayed in the dynamic text field in the movie clip. however, if you click "button two" or "button three" it also loads the text but it appears ON TOP OF the text that was previously loaded in to the dynamic text field INSTEAD of replacing that previously loaded text.

how do I get the dynamically loaded text to appear in the text box and not have the previously loaded text still displayed? any help much appreciated.

thanks in advance,
cj

Dynamic Text Won't Display In External Swf
Hi,

I've been searching all over these and other forums for an answer to this question but can't find an answer that works.

I am loading an swf into an MC within another MC which will scroll which is in my Main movie.

Problem is that the dynamically loaded text (which shows fine in the original swf) won't show when loaded into all these other swfs.

Any ideas? I've tried embedding fonts (didn't work).

Your help is gretaly appreciated.

Jman

Dynamic Text Won't Display In External Swf
Hi there,

I posted this thread to newbies but haven't received much response. I thought maybe you guys would be more suited to help.

I've been searching all over these and other forums for an answer to this question but can't find an answer that works.

I am loading an swf into an MC within another MC which will scroll which is in my Main movie.

The swf that these boxes are in is duplicated several times in the it's parent movie and are scrollable from that movie. I would like to be able to load variables from several different text files for each duplicated movie.

Problem is that the dynamically loaded text (which shows fine in the original swf) won't show when loaded into all these other swfs.

I guess all I need to know is why dynamic text will show if it's on the main stage of a movie but not if it is then loaded as an external swf into a MC in the main movie.

If it helps I have uploaded the fla with the dynamic text boxes that needs to be loaded into the MC in the main movie.

Hope you guys can help.

Cheers,
Jman

Dynamic Random Display Text?
I was wondering if you could give this nub on how to read text from a file and display a random line. Id like to add a little random quote thing to some of my flash content but id also like it to read the text from a file.

So say your file is blah.txt, inside containing

Code:
Random Message Line 1
Random Message Line 2
Random Message Line 3
Random Message Line 4
Random Message Line 5
How could i go abouts doing that? the file would be in the same directory as the .swf file. Thanks for any pointers!

Desperate - Dynamic Text Display
I have a flash 4 movie that displays dynamic text in a button. It works sometimes, but sometimes it doesn't does anyone have any idea why it will work on some browsers and not others?

Display Number In Dynamic Text Box
Hey everyone,

I'm trying to display a total value in a dynamic text box but keep getting the value of NaN displayed.
Here is my code:

var totalScore:Number;
var No:Array = new Array(35);
for(var i = 0; i < 35; i++){
No[i] = 0;
}
for(var i = 0; i < 35; i++){
totalScore += No[i];
}
totalVal = totalScore;
trace(totalVal);

any help would be much appreciated

DoomedLung

[F8] Add Prices And Display In Dynamic Text Box
Hey,

I have a combobox and radio buttons with specific prices that I want attached depending on the choice the user makes. I'm having trouble getting the application to add the total of the selections and display the total in a dynamic textbox.

I am trying to use global variables. I set them to a certain value depending on what is selected. At the end I set add them up in the variable total and set that equal to the text box named totalPrice.

Right now the value of the global variables is not being returned from their functions.

Any suggestions for how to do this correctly? I have a link to the fla in a zip file. Below is the code if you'd rather just look at that.

Thanks!

Code:
//combo box
//create new listener to check for a change in combobox
objComboListener = new Object();
objComboListener.change = function(eventObj){
//create variable to get comboboxes label and check to see if it's "Please Select"
//get the data value of selected item and set global variable to a price
var number=sizeBox.getSelectedItem().data;
if(number==0){
_global.collarSize = 0;
return _global.collarSize;
} else if (number==1){
_global.collarSize = 10.00;
return _global.collarSize;
} else if (number==2){
_global.collarSize = 15.00;
return _global.collarSize;
} else if (number==3){
_global.collarSize = 20.00;
return _global.collarSize;
}
}
//call the change function
sizeBox.addEventListener("change", objComboListener);



//personalize yes or no

//create a new listening object and create a function for it
personListener = new Object();
personListener.click = function (evt){
//get the label for an item and set variables to a price
person = evt.target.selection.label;
if (person=="Side") {
_global.side = 7.00;
_global.center=0;
return _global.center;
return _global.side;
}else if (person=="Center") {
_global.side=0;
_global.center = 8.00;
return _global.center;
return _global.side;
}else {
_global.side=10;
_global.center=0;
return _global.center;
return _global.side;
}
}
//call the personalize function
Personalize.addEventListener("click", personListener);

//add the global variables and put them into total
_global.total = _global.collarSize + _global.center + _global.side;

//display results in dynamic text box next to "Price:"
price.totalPrice.text=_global.total;

[CS3] Display Integer In Dynamic Text Box
Very new to this, just been playing around with as3 trying to get a basic idea,

i have placed a dynamic text box on the stage and called it number_txt

have added this actionscript,

var x:int = 5;
number_txt.text = x;

with the thought that this would place a 5 in the text box but all i get is

"1067: Implicit coercion of a value of type int to an unrelated type String."

I realise that this is very very basic but what have i done wrong??

Display Number In Dynamic Text Box
Hey everyone,

I'm trying to display a total value in a dynamic text box but keep getting the value of NaN displayed.

Here is my code:

var totalScore:Number;
var No:Array = new Array(35);
for(var i = 0; i < 35; i++){
No[i] = 0;
}
for(var i = 0; i < 35; i++){
totalScore += No[i];
}
totalVal = totalScore;
trace(totalVal);

any help would be much appreciated

DoomedLung

Display Filename In Dynamic Text
Hey everyone. I need to find a way to display the file name of a _parent swf file in the dynamic text object of an embeded swf. Basically, I've created a feedback form in a seperate swf file that I embed into a parent swf file. I need the form to capture the filename of the parent swf before the form submits its data. Does anyone know of variable that will allow you to find out what the filename of an swf is? Any help is greatly appreciated. Thanks in advance.

[AS2] How To Display Array Value In Dynamic Text Box
Hey guys, Is it possible to display array values in a dynamic text box -- All created in As2? My problem is I need a dynamic text box that will load On button press, at the bottom left hand corner of images of various size. I got the positioning part down...but I cant seem to make it display what I have stored in an array -- namely 'text' from an xml attribute. is there a way to do this?
This is the text field in a movieclip. I acknowledge that the names are very dumb.

Code:
this.createEmptyMovieClip("wassup", this.getNextHighestDepth());

wassup.createEmptyMovieClip("buttonBkg", wassup.getNextHighestDepth());

wassup.buttonBkg.lineStyle(0, 0x000000, 0, true, "none", "square", "round");
wassup.buttonBkg.lineTo(120, 0);
wassup.buttonBkg.lineTo(120, 30);
wassup.buttonBkg.lineTo(0, 30);
wassup.buttonBkg.lineTo(0, 0);
wassup.buttonBkg.endFill();
wassup.buttonBkg.alpha(0);

var myFormat:TextFormat = new TextFormat();
myFormat.align = "center";
myFormat.font = "my_font";
myFormat.size = 16;
myFormat.color = 0x000000;

wassup.createTextField("closer", wassup.getNextHighestDepth(), 0, 5, wassup._width, 24);

//this is where I'm getting tripped up -- What do I point to? And where does wassup.closer.text go?
wassup.closer.text = "";
wassup.closer.embedFonts = true;
wassup.closer.selectable = false;
wassup.closer.antiAliasType = "advanced";
wassup.closer.setTextFormat(myFormat);
wassup.closer.autoSize = true;
this is the On Press function of a calendar template I got at FlashComponents. (yeah, boo me)
but really i just want to point out that the 'what' array is what I want...I 'push' it below the xml parsing. Ignore the 'area.txt' stuff as it is from the template and I'm afraid to get rid of it.


Code:
function didyoupressme(n:Number){
var currentSelected;
var movieClip:MovieClip = createEmptyMovieClip("movieClip", 0);
var where = new Array();
var what = new Array();
var linkname = new Array();
for (i=0;i<my_xml.firstChild.childNodes.length;i++){
if (my_xml.firstChild.childNodes[i].attributes.number == curentYear)
for (j=0;j<my_xml.firstChild.childNodes[i].childNodes.length;j++){
if (my_xml.firstChild.childNodes[i].childNodes[j].attributes.number== curentMonth)
for (k=0;k<my_xml.firstChild.childNodes[i].childNodes[j].childNodes.length;k++)
if (my_xml.firstChild.childNodes[i].childNodes[j].childNodes[k].attributes.number==n)
for (q=0;q<my_xml.firstChild.childNodes[i].childNodes[j].childNodes[k].childNodes.length;q++){
if ((my_xml.firstChild.childNodes[i].childNodes[j].childNodes[k].childNodes[q].attributes.txt!=undefined)
and (my_xml.firstChild.childNodes[i].childNodes[j].childNodes[k].childNodes[q].attributes.lnk!=undefined))
if (informationTextFont)
area.txt.htmlText+="<b><font color='"+informationTextLinkColor+"' size='"+informationTextSize+"'face='"+informationTextFont+"'><a href='"+my_xml.firstChild.childNodes[i].childNodes[j].childNodes[k].childNodes[q].attributes.lnk+"'>"+my_xml.firstChild.childNodes[i].childNodes[j].childNodes[k].childNodes[q].attributes.txt+"</a></font></b>";

else
area.txt.htmlText+="<font color='"+informationTextLinkColor+"' size='"+informationTextSize+"'face='"+informationTextFont+"'><a href='"+my_xml.firstChild.childNodes[i].childNodes[j].childNodes[k].childNodes[q].attributes.lnk+"'>"+my_xml.firstChild.childNodes[i].childNodes[j].childNodes[k].childNodes[q].attributes.txt+"</a></font>";
else if (my_xml.firstChild.childNodes[i].childNodes[j].childNodes[k].childNodes[q].attributes.txt!=undefined)
if (informationTextBold)
area.txt.htmlText+="<b><font color='"+informationTextColor+"' size='"+informationTextSize+"' face='"+informationTextFont+"'>"+my_xml.firstChild.childNodes[i].childNodes[j].childNodes[k].childNodes[q].attributes.txt+"</font></b>";
else
area.txt.htmlText+="<font color='"+informationTextColor+"' size='"+informationTextSize+"' face='"+informationTextFont+"'>"+my_xml.firstChild.childNodes[i].childNodes[j].childNodes[k].childNodes[q].attributes.txt+"</font>";
if (my_xml.firstChild.childNodes[i].childNodes[j].childNodes[k].childNodes[q].attributes.pic!=undefined){
ok=true;


var url = new String;
url = my_xml.firstChild.childNodes[i].childNodes[j].childNodes[k].childNodes[q].attributes.pic;
//trace (url);
var blurb = new String;
blurb = my_xml.firstChild.childNodes[i].childNodes[j].childNodes[k].childNodes[q].attributes.txt;
//trace (blurb);
var going = new String;
going = my_xml.firstChild.childNodes[i].childNodes[j].childNodes[k].childNodes[q].attributes.lnk;
//trace (going);
where.push(url);

what.push(blurb);
linkname.push(going);

var listenerObj:Object = new Object();
listenerObj.onLoadInit = function (target_mc:MovieClip):Void {
target_mc._x = (Stage.width / 2 - target_mc._width) / 2 + 850;
target_mc._y = (Stage.height / 2 - target_mc._height) / 2 + 175;
//trace("dimensions" +target_mc._width + target_mc._height);
var myDropShadowFilter = new DropShadowFilter (16,45,0x000000,.15,15,15,1.5,1,false,false,false);
target_mc.filters = [myDropShadowFilter];
var tw:Tween = new Tween(movieClip,"_alpha",Strong.easeIn,0,85,1,true);

myButton1._x = ((Stage.width / 2 - target_mc._width) / 2 + 850) + target_mc._width - 95;
myButton1._y = ((Stage.height / 2 - target_mc._height) / 2 + 175) + target_mc._height + 10;
wassup._x = ((Stage.width / 2 - target_mc._width) / 2 + 850) + target_mc._width - 95;
wassup._y = ((Stage.height / 2 - target_mc._height) / 2 + 175) + target_mc._height + 10;

currentSelected = "movieClip";

}

var movieClipLoader:MovieClipLoader = new MovieClipLoader();
movieClipLoader.addListener(listenerObj);
movieClipLoader.loadClip(url, movieClip);
myButton1.onRelease = function() {

getURL(going);

}
}
}
}
}
}
So basically as this stands -- I can load in the text field and position it where I want to. I stored information in an array that I can trace as valid. I just need to get that array text into the text field. Whether this is possible, or whether this is the best way -- very good questions which I can't seem to find answers to.

Please Help.

Help With Dynamic Text Field Display
hi all,

i have a movie clip within my main timeline that is controlled by three buttons. each click on one of these three buttons, executes a script that loads data from an external text file into the above mentioned movie clip. the text loads correctly but my problem is this:

let's say the buttons are called "button one", "button two" and so on. if you click "button one" the appropriate text is loaded and displayed in the dynamic text field in the movie clip. however, if you click "button two" or "button three" it also loads the text but it appears ON TOP OF the text that was previously loaded in to the dynamic text field INSTEAD of replacing that previously loaded text.

how do I get the dynamically loaded text to appear in the text box and not have the previously loaded text still displayed? any help much appreciated.

thanks in advance,
cj

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