XML in dynamic text problem

only to learn XML in flash and I can't understand
Why use this code it returns this:
What & apos; SUP?
a simple file XML in a dynamic text instead box:
What's new?

var x: XML = new XML();
x.ignoreWhite = true;
var cap: Array = new Array();
x.onLoad = function() {}
var tickers: Array = this.firstChild.childNodes;
for (i = 0; i < tickers.length; i ++) {}
Cap.push (tickers, , Sublst.ChildNodes(1).ChildNodes(0));
}
Box.Text = heading;
};
x.Load ("ticker.xml");

Alex

' is the HTML for an apostrophe ('), so the text appears to be encoded as html. You can use this cipher text easily in an active html textfield, this shows the actual letters instead html codes. I think you need to set the text property to "htmlText" TextField, rather than the "text" property

HTH,
blemmo

Tags: Adobe Animate

Similar Questions

  • Creating a hyperlink in AS2 using xml and dynamic text

    Hello

    I want to insert two hyperlinks to my site flash AS2 - one for my e-mail address and one for my domain name. I use an xml file to import the e-mail address and url.

    As in my code, you can see that I'm storing xml data in _root.email and _root.website, and I actually got their display on the Web page (in dynamic text boxes email_txt.text and website_txt.text, respectfully), but how do I actually turn the latter into links?

    getURL (_root.website) works for the url link. You can run whenever you want.

    If you want to make a link in your textfield, html-enable website_txt and use a standard hyperlink: 'link'.

    How you want to send it work depends on the two choices that I mentioned above.

  • Loading, php, xml or dynamic text

    Hello dw experts. I ask for a link tutorial, or you have to point me in a direction I could better learn the method to enable a client remotely, edit and update the text in a control in an html page (without having access to my server). I know, in Flash, I wish a document them xml and (re) set in, say, their own server specific directory, which I know the url.

    I would do the same thing with dw, but I really hope it is just a product of third party I can buy just the front end of this idea for my client to use, and the method to place the end of on my page. Above all, I would like a simple php control or the page (like any blog) where the customer would have to change/add text, press the button send, and text then magically appear in the specific page I created and home on my server. Perhaps sequencially, by publication date.

    I thank very you much for any assistance.

    r

    Sorry - this is a bad link. Try http://www.flyspeck.net.

    --
    Murray - ICQ 71997575
    Adobe Community Expert
    (If you * MUST * write me, don't don't LAUGH when you do!)
    ==================
    http://www.dreamweavermx-templates.com - template Triage!
    http://www.projectseven.com/go - DW FAQs, tutorials & resources
    http://www.dwfaq.com - DW FAQs, tutorials & resources
    http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
    ==================

    "MEPE" wrote in message
    News:eepqpq$KQQ$1@forums. Macromedia.com...
    > Murray, thanks for the tip. However, the link showed an auth error
    > ( http://www.flyspeck.com ). I would like to see, however. Other means to?

  • Someone has problems with the visible property of the fields of dynamic text in html5 canvas?

    Hi, I have problems with text fields dynamic that I placed the Framework 1. I wanted to have a visible property false until after the click of a button. So, I placed a line of code on the layer actions of frame 1 as:

    This.Sum.Visible = false; sum is the dynamic text field

    Even with 5 other text fields.

    Some of the fields appear when I test the movie and others not, but no suppose to appear. The console.log shows no error, and when I investigated console.log as: 'console.log (this.sum.visible)', I get 'false '.

    Any ideas?

    Thank you for your time.

    Yes, the link displays multiple textfields whose visible property works without problems in an animated project of html5.

  • Assign the XML content to dynamic text fields

    Hey there,

    After the search in the forums, I found that I can load files XML and content to animate CC using the XMLHttpRequest, but how do I load content in a specific dynamic text field?

    I found a few answers that confirm that we should use XMLHttpRequest and some users who made it work, but not how. Any help would be much appreciated.

    Below is how I added the request and how the dynamic field has been implemented.

    This.frame_0 = function() {}

    var xhttp = new XMLHttpRequest();

    xhttp.onreadystatechange = function() {}

    If (xhttp.readyState == 4 & & xhttp.status == 200) {}

    myFunction (xhttp);

    }

    };

    xhttp. Open ("GET","profil.xml", true);

    xhttp. Send();

    Function myFunction (xml) {}

    var xmlDoc = xml.responseXML;

    document.getElementsByTagName("nameTextField").innerHTML = / * this part is not correct, but so far I have found no better solution * /.

    xmlDoc.getElementsByTagName ("title") [0] Sublst.ChildNodes(1).ChildNodes(0) [0] .nodeValue;

    }

    }

    And for the text field (created by animate CC):

    this.nameTextField is new syc. Text ("", "53px 'Arial'");
    this.nameTextField.name = "nameTextField";
    this.nameTextField.textAlign = 'center ';
    this.nameTextField.lineHeight = 61;
    this.nameTextField.lineWidth = 388;
    this.nameTextField.setTransform (265,124.4);

    this.timeline.addTween (syc. Tween.get (this.nameTextField). Wait (2));

    I really hope someone can help, I spent hours looking and trying solutions.

    See you soon,.

    Luke

    As already said:

    this.mydynamictextfield.text = "hello I am text in a dynamic text field";
    

    If you need really, really specific, it would be in this case:

    this.mydynamictextfield.text = animals[0];
    
  • Problem of passing a variable to a field of dynamic text in php (Flash 8)

    I am currently working on a flash file, where a person enters
    their score in a box of text entry with an instance name of score, then it
    It converts a percentage and ranks.
    The swf file displays the rank and the percentage in two dynamic text boxes
    with the name of the instances of percent and score.
    This part is for me no problem.
    The main goal is to pass the percent and the partition to a php file called
    grade.php and save the two variables in MySQL.

    After you download the files to a server, I run the swf file and
    It seems that everything works.  But when
    I check the MySQL file, I noticed that a row has been inserted, but no score or
    grade entered.   I can't know
    What is the problem.  If anyone can help
    me with that?

    Here the Actionscript 2.0 code and the php file:

    function findPercent() {}

    percent. Text = (score.text * 100) / 100;

    If (percent.text > = 90) {}

    rank. Text = "A";

    } ElseIf (percent.text < 90 & & percent.text > = 80) {}

    rank. Text = "B";

    other
    If (percent.text < 80 & & percent.text > = 70) {}

    grade.text = 'C ';

    } ElseIf (percent.text < 70 & & percent.text > = 60) {}

    rank. Text = "D";

    } ElseIf (percent.text < 60) {}

    rank. Text = 'F';

    }

    }

    submit_button.onRelease = function() {}

    submitURL = "grade.php";

    Create an instance of the LoadVars object and fill it.

    send_lv = new LoadVars();

    send_lv.score = "percent.text";    (Note: when I used the text of entry as. score.text box, it displays in MySQL)

    send_lv.grade = "grade.text";

    send_lv. Send (submitURL, "POST");

    };

    (grade.php)

    < html >

    < head >

    < title > Grades: add your rank and Score < /title >

    < / head >

    < body >

    Grade display < h2 > < / h2 >

    <? PHP

    require_once ('connectvars.php');

    Connect to the database

    $dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);

    Enter the data in the partition of the POST

    $score = $_POST ['mark'];

    $grade = $_POST ['category'];

    Write the data to the database

    $query = "INSERT INTO transcription (score, rank) VALUES ('$score', '$grade');

    mysqli_query ($DBC, $Query);

    mysqli_close ($DBC);

    ? >

    < hr / >

    < / body >

    < / html >

    If you use such track suggested in the message 4 instructions and the instructions of tracing corresponding to your expectations, the problem will be in your php file.

    I have a problem with your php code, but there is no way (in this forum) to check if your db columns are score and rank and that they have the correct data type.

    p.s. I don't download and fix the files unless I'm hired.  free help I offer only via the adobe forums.

  • View of dynamic text in an xml file

    I'm looking to display dynamic text in an external xml file. When I trace for the variable, all is well in the output window. But the text does not appear in the published movie.

    Here is my current code:

    var myXML:XML;
    var myLoader:URLLoader = new URLLoader();
    myLoader.load (new URLRequest ("AskAnExpert.xml"));
    myLoader.addEventListener (Event.COMPLETE, processXML);
    function processXML(e:Event):void {}
    myXML = new XML (e.target.data);

    var topic1:String = myXML.TOPIC [0]. FIELD_NAME;

    trace (topic1)

    };

    On the screen, I have a dynamic text field with an instance name of the Topic1. When I play the movie, the text does not appear. I tried various options of incorporation of text and using _without, but this does not seem to do the trick either. Help!

    You say you have a textfield with an instance name of the topic1, but in your code, you also declare a variable Topic1 you cast as a string.  The two cannot coexist.  If you really have a textfield named topic1then assign the xml value using textfield...

    Topic1. Text = myXML.TOPIC [0]. FIELD_NAME;

    But do not use a varioable with the same name as the TextField

  • Problem with dynamic text

    Hello, all.

    I'm having trouble with dynamic text not displaying only not on the scene during execution.  When I test the scene, fields of text but loading, but when I test the movie, or run publish a snippet, the text is not there.  Some figures appear unstable in the text fields, but are often completely empty. --J' did ensure that the fonts have been included and I can't understand why this is happening.

    Any ideas or suggestions are greatly appreciated.

    Thank you.

    Try another font which has called to work correctly, such as Arial and see if you still have the problem. Not all fonts can be embedded correctly...

  • Weird problem with dynamic text

    Hello

    I created a dynamic text field - mediaImportName001 (created and it contains the name of a file that I have chosen to import them using a browser (as3 and AIR) button.)

    It works very well - I can import the file, and the name appears in the field.

    I would now like to pass the content of the text field to another text field.  But I'm not content. If I try to find the contents of the textField trace("mediaImportName"+thisNum).text - Flash returns "undefined" (even though I'm him asking to draw once the field has been filled).

    I use the following code to check that the material is really there and named correctly (the code returns the children):

    for (var i: uint = 0; i < this.numChildren; i ++) {}
    trace (this.getChildAt (i) .name + "\t type:" + typeof (this.getChildAt (i)) + "\t" + this.getChildAt (i));
    }

    It returns:

    object: type instance370 [object, form]
    object: type mediaImportName001 [TextField object]
    object: type mediaFiletype001 [TextField object]

    How can I get Flash to give me the text in mediaImportName001?

    It's weird - this.getChildAt (i) .name

    from above gives me...

    mediaImportName001,

    yet

    trace (['mediaImportName' + thisNum] .name);

    returns undefined (thisNum represents an increment I used to name several clips and text fields and in this case trace (thisNum); return 001)

    Any ideas why this happens?

    Thank you

    Shaun

    No logic problem, just a problem with describing the problem (as far as the fix goes) and using the property name (as far as the issue goes).  There is a difference between the creation of a dynamic textfield (a type of textfield) and dynamically a textfield (using code to create).

    In AS3, the name property is a property and it is not the same as the name of the instance that you can assign to an object on the stage.  To target an object using its name property, you must use the getChildByName() method, or alternatively, you can use the variable you used to create it.  You may need to cast as a TextField object as well as to operate...

    trace (TextField (this.getChildByName ("mediaImportName" + thisNum)). (Text);

    which would produce the same result as the use of...

    trace (mediaImportName.Text);

    I don't know how the numbering disperses on "001", but you might find it easier to work with by storing just the instances of an Array by using the media_file_num to set the index where they get.  Then, you would be able to target the textfield to help...

    trace (tfArray [thisNum]. (Text);

  • ScrollPane + problem with dynamic text.

    Hello

    I use the ScrollPane component to display a movieclip that contains text. So far, I went to a few paragraphs, with the text field defined on "Static text"... but as I wrote a few more I noticed that the text box displays only half of my text. So I went to the "dynamic text", which solves the problem of display and get 100% of my text but now I always displayed onstage, even if it is available in the library... strange!

    Could somone help me please?

    Kind regards

    vedtam

    There is no visible scrollpane.

  • Dynamic text called XML - how to create a line break

    I'm the filling of an area of dynamic text with xml elements that I call

    For example, I have two text fields and fill me help

    TextTime.texttest.Text = (bktrlXml.Row, [e.currentTarget.Ivar], .tester);

    TextTime.textName.Text = (bktrlXml.row [e.currentTarget.ivar]. NAME2);

    How do I fill in a dynamic text field using a combination of the two above?  I would also like to put a line break between the two elements.  I tried something like that and could not understand it

    TextTime.texttest.Text = (bktrlXml.Row [e.currentTarget.Ivar] .tester) + "/ n" (bktrlXml.row [e.cur rentTarget.ivar]. NAME2);

    Thanks in advance...

    -j

    Use the back slash, not oblique:

    TextTime.texttest.Text = (bktrlXml.Row [e.currentTarget.Ivar] .tester) + "\n" + (bktrlXml.row [e.cu rrentTarget.ivar]. NAME2);

  • How to load xml data to dynamic text under a button (AS3)

    Hi all

    I created a button and put some dynamic text in it. But I can not dynamically load text from an xml file.
    See the code below:

    var xmlLoader9:URLLoader = new URLLoader();
    xmlLoader9.addEventListener (Event.COMPLETE, showXML99);
    xmlLoader9.load (new URLRequest ("mempops.xml"));

    function loadXML99(e:Event):void
    {
    XML.ignoreWhitespace = true;
    var tree: XML = new XML (e.target.data);
    var i: Number;
    for (i = 0; i < fir.mylist.length (); i ++)
    {
    mybuton1. Box1.dyntext1.AppendText (FIR.memberz [i] .mname. Text());
    myButton1 = button
    Box1 = movie clip
    dyntext1 = dynamic text box
    }
    };

    and the error message:
    1119: access of property may be undefined box1 through a reference with static type flash.display:SimpleButton.

    Thanks for the help

    SimpleButtons have very limited property, so you can't really add content in them that code can talk.  Your best bet will be to create the button as a movieclip.  MovieClip objects can have code addressable bjects placed in them and can also have properties assigned dynamically.

  • Dynamic text from the text file problem

    Go step by step to get my data from MYSQL/php... for now, I'm stuck and cannt even get it from a text file I do worng!

    This is the code I use:

    var myLoader:URLLoader = new URLLoader()

    myLoader.dataFormat = pouvez

    myLoader.load (new URLRequest ("trees.txt"))

    myLoader.addEventListener (Event.COMPLETE, onDataLoad)

    function onDataLoad(evt:Event) {}

    for (var i: uint = 0; i < evt.target.data.cant; i ++) {}

    This ["tcname_" + i] .text = evt.target.data ["tcname_" + i]

    }

    }

    My trees.txt file contains the following:

    Plum = tcname_0 & tcname_1 = olive

    I made this as well:

    & tcname_0 = Asian plum & tcname_1 = Amazon lily &

    I have already created a few instances of dynamic text from tcname_0 up to tcname_5

    I tried with having the text in dynamic text or leave it empt anyway... nothing is read from the text file, what I am doing wrong?

    In your trees.text file, you neglected to include the variable of cant, so the loop has an undefined value to life...

    Plum = tcname_0 & tcname_1 = olive & cant = 2

  • Problems with the formatting of the dynamic text box

    I'm under the questions with the help of HTML formatting for a dynamic text field. I know these are weird and I can't understand how to get the formatting right.

    I have on my scene a dynamic text called «content_txt' inside a movie clip instance «content_mc» box When he enters the frame, I just broke down the "content_mc" of the alpha of 0 to 100 with a scenario animation. So that this works, I have to incorporate the police in my text field 'content_txt '. However, the only way I get get the HTML formatting to work is if I do not embed fonts.

    The dynamic text field is configured to render as HTML. In my layer actions, I put the text:

    this.content_mc.content_txt.htmlText = "<b>Hello world,</b> it is me again."

    In summary:

    1. If I do not embed fonts, the alpha fade does not work but HTML formatting doesn't.

    2. If I incorporate police, the alpha fade works but HTML formatting does not work.

    How to solve this? It's driving me crazy!

    then you're not g-d instructions.

    You should have two textfields.  the one on the boards that you started with and that incorporates your normal font (not bold).  and a slide that takes the same family of fonts with license "BOLD".  Repeat the test.

  • problem by turning the dynamic text field

    Hi all

    In an application, I created a dynamic text field and then try to shoot with the _rotation method but it became invisible. Please respond if anyone knows something about this.

    If you do not see your text, you're not embed fonts.

    When you use actionscript to embed a font, you must have the fonts in your library with a connection id, create a textformat instance and assign the property and finally give the textformat to your textfield.  for example

    _root.createTextField ("txt", _root.getNextHighestDepth (), 50,50,50, 50);
    _root.txt.embedFonts = true;
    _root.txt.text = "Hello";
    _root.txt._rotation = 20;

    var tfor:TextFormat = new TextFormat();

    Tfor.font = "yourfontslinkageid";   // <- linkage="" id="" of="" font="" in="" your="">

    _root.txt.setTextFormat (Tfor);

Maybe you are looking for

  • What about fixed bugs in Mail?

    Mail was behaving badly since El Capitan installed. Breaks down frequently When you reply to an existing thread, I get an empty email, then cannot be accessed, or closed. I have to reboot to clear it. Boring. Has it been fixed in the update?

  • Impossible to update 10.11.5

    I wanted to upgrade to the latest version of Configurator2. However, although the update appears in App Store, when I try to install it I get a message saying I need to update 10.11.4 10.11.5 first. So far so good. However, when I tried to upgrade to

  • Satellite M30x-165: OpenGL in the graphics driver is old

    Hello I have a Satellite M30x-165.I downloaded and installed the latest drivers from the page Web of Toshiba. When I check the version of the OpenGl driver it says that the version is 1.5.4454. Recently, I heard that this version is very old and may

  • Align several bays in value

    I have a number of files, and each file contains two columns: X 1, Y1; X 2, Y2; X 3, Y3; etc. These files are curves Bell just shaped where the peaks reach X different values (in other words, the peaks are shifted). I will generate a file with X 1, Y

  • MSE is considered "optional" update by Windows Update?

    Windows Update is deemed updates of Microsoft Security Essentials definitions as "optional". AV defs are, IMO, critical - why Windows Update is not agree with me?