Simple dynamic text issue

For some reason I can't get the % symbol to append to the end
of the dynamic text output. I've tried every variation of the code
I can think of. The percentage in numbers shows fine, I'm ammending
someone else's movie so it's not done the way I would normally do
it.
The attached code is the basic code before my modifications.
Thanks

Then there is something else going on. Except for the space
between mText_txt and .text, that should work.

Similar Messages

  • Simple dynamic text line break question

    I have a simple file that loads text dynamically inside a symbol.. How do I put line breaks in? My code is below. If I leave the text as is it skips a line inbetween.
    (actionscript in flash file)
    loadVariables("pacific.txt", "_root.pacific");
    txt file
    data=CANADIAN PACIFIC DISTRICT
    Steve Foster
    [email protected]
    1-877-850-2664
    Cell: 250-667-4827
    thanks,
    Frank

    NOT
    /n
    use:
    \n

  • Simple Dynamic Text

    A system I use has a simple api for pulling data from it. I need to be able to alter Text in my flash file with data retrieved from an API call. Does anyone have a link handy to a tutorial on how to do this.
    Thanks,
    Tim

    use a dynamic textfield and assign your new text using the textfield's text property:
    your_tf.text = "new text";
    to load data, use the loadvars class:
    var receiveLV:LoadVars=new LoadVars();
    var sendLV:LoadVars=new LoadVars();
    receiveLV.onData=function(src){
    your_tf.text = src;
    sendLV.sendAndLoad("yourfeed.yourfeedsfiletype",receiveLV,"POST");

  • Issue with visibiliy of dynamic text and hyperlinks

    Hi everyone,
    It's been a while since I've build a Flash site and a I'm finding a out a lot has changed.
    I'm building a simple site with some pictures, text and the 5 last posts from Twitter.
    This last one is not working out that well.
    First of all:
    The outputed data from Twitter is displayed into a dynamic text field which is working fine when I test the movie in Flash, but as soon as I upload it to my server the text is not visible.
    Flash already told me that I need to enclose my font in the movie (that's new for me) and I did that using the button in the properties windows.
    But it still won't work.
    I recreated the Twitter reader in a empty document to isolate it from my website during the troubleshooting.
    Here's the AS I'm using:
    var loadXML:XML = new XML();
        loadXML.ignoreWhite = true;
        loadXML.onLoad = processXML;
        loadXML.load("twitter.php"); //used when swf in placed on server
        loadXML.load("");
        function processXML(loaded:Boolean)
            if(loaded)
                var node = this.firstChild;
                tweet_1.text = node.childNodes[0].childNodes[2].firstChild;
                tweet_2.text = node.childNodes[1].childNodes[2].firstChild;
                tweet_3.text = node.childNodes[2].childNodes[2].firstChild;
                tweet_4.text = node.childNodes[3].childNodes[2].firstChild;
                var follower_count = node.childNodes[9].childNodes[11].childNodes[9].firstChild;// Creates variable
                trace(follower_count); //loads variable into output
                follower_count_txt.text = follower_count;// show follower count in text box
            else
                error_txt.text = "Error loading XML file";
                        for (i=0; i<follower_count; i++)
                            _root.attachMovie("tweep_mc", "tweep"+i+"_mc", i);
                            _root["tweep"+i+"_mc"]._x = 150 + random(500);
                            _root["tweep"+i+"_mc"]._y = 150 + random(500);
                            trace(i);
                        trace(i);
        follow_btn.onRelease = function()
            getURL("");
    facebook_btn.onRelease = function()
            getURL("");
    stop();
    Right here you can see the output of it on the server.
    The second issue:
    The items posted to Twitter will simply always contain pictures which Twitter posts as hyperlinks.
    Is there a way to make those hyperlinks function in my dynamic text field?
    Hope you guys can help me out!
    Thanks in advance!!
    Karim

    Ok.. After some resarch I find out the guy who created this made use of the Twitter API.. Since I don't know how to do that and
    can't find straight answers that's not an option for me...
    Althought...
    What I forgot to mention in the first post:
    This is what the beginning of actionscript is actually looking like right now and why it is working offline:
    var loadXML:XML = new XML();
        loadXML.ignoreWhite = true;
        loadXML.onLoad = processXML;
        loadXML.load("http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=karimbizid2");
    I'm getting the data direct from the Twitter server.
    This procedure does'nt neceserly need a PHP file to store the XML, right?
    I'm guessing it's just a visual issue why the text isn't showing.
    Karim

  • Adobe form -- Issue in Displaying Dynamic text along with Static text

    Hi All,
    I am having an issue when i am displaying a dynamic text along with static text in adobeforms.
    The dynamic text is slightly coming down and not aligned with the static text. i can see half row it is coming down.
    how to align both texts to be printed in same format.
    Request all of your expert advices in achieving this .
    Thank you in advance.
    Thanks&Regards,
    Phani Miriyaila.

    Hi,
    Select both dynamic and static text in the layout. Goto Object palette -> Layout. Give values to X,Y coordinates and Height & Width. Anchor properly and specify margins as well.
    Select both dynamic and static text in the layout. Right click on it and goto palettes -> Paragraph. It gives you the text alignment options. Align the text and give similar font and size.
    Thanks & Regards,
    Sanoosh

  • Dynamic Text line spacing issue

    Hi, in my Flash movie (CS3) I want all text to be selectable.
    When I select 'static' and 'selectable', I have the following issues:
    - Some of the text does not fit into the available (scrolling required to see the end of text)
    - This is larger than when in Flash.
    When I use 'dynamic' text, I have the following issues:
    - The line spacing displays different in the exported swf than it does in Flash (line spacing is much greater in the swf)
    - I am a designer so the appearance / positioning of the text is crucial
    Is this common?
    Is there any way to make the text in Flash and swf appear consistent?
    Many thanks

    First of all, maybe you don't know it, but static text can't be made selectable even in theory. Therefore what you're seeing when you click "Selectable" option, is a dynamic text. As for line spacing, I don't see any difference between Flash CS4 and resulting SWF. The only strange thing I've found is the necessarity to enlarge the bounding rectangle when I change the text type from static to dynamic. Otherwise bottom line of text just disappears. It looks like a bug. Also I don't see "Autosize" option being working here in CS4. I doubleclick on bottom right corner of the text block, small square is transformed into a diamond, and bounding rect is "autosized" around the text block. But the bottom text line disappears just as I deselect the text object. All it looks some stange...

  • Flash 7 dynamic text box IE issues

    Hi all,
    I am having issues with IE V.6.0.3790.0 not loading dynamic
    text into text boxes inside a Flash 7 SWF on a remote desktop. Does
    anyone know of any compatability issues with dynamic text boxes and
    IE? The file loads properly into Safari on my MAC, and I have the
    latest Flash Plugin installed. Could it be a Plugin issue, rather
    than a IE issue? The reason I am asking is I have a site launched
    and many people cannot see the pages that pull in Dynamic text. I
    am trying to either get to the bottom of it and provide a fix, or
    at least come up with some answers!

    quote:
    Originally posted by:
    AnandMX
    use embedFonts=true
    coz it seems that your fonts are not embedded thats y it is
    not visible there.
    Thanks - but why would the fonts be visible in Safari and
    Firefox, for example, and not in that version of IE?

  • Dynamic text boxes, font size issues

    I have created a dynamic text box and an input text box.
    I have produced code that replicates whatever is typed in the
    input box to display in the dynamic box along with a date and time
    stamp once a button is clicked.
    This all works fine, except for the sizes of the fonts. for
    both boxes, i selected font size 10 . The input box is fine,
    however the dynamic box text is huge.
    When i make the dynamic text font smaller, it fits in fine,
    but the input text that is inserted into the dynamic text box comes
    in too big. If i make the input text box font smaller it is
    unreadable when typing it in.
    any soultion to how to make my font consistent. I am assumin
    the problem is because both the text boxes are different sizes,
    however i don't know how to resolve the issue.
    Any help is much appreciated.

    var today_date:Date = new Date();
    var date_str:String =
    (today_date.getDate()+"/"+(today_date.getMonth()+1)+"/"+today_date.getFullYear());
    var my_date:Date = new Date();
    var boat = ""
    btn_send.onPress = function() {
    var today_date:Date = new Date();
    var date_str:String =
    (today_date.getDate()+"/"+(today_date.getMonth()+1)+"/"+today_date.getFullYear());
    var my_date:Date = new Date();
    date_txt = date_str + " " + my_date.getHours() + ":" +
    my_date.getMinutes() + ":" + my_date.getSeconds() + " " + boat;
    the text appears in the dynamic box it just is a mish mash of
    font sizes!!!

  • Issues with dynamic text box formatting

    I'm running into issues with using HTML formatting for a dymanic text field. I know these are quirky and I cannot figure out how to get the formatting proper.
    I have on my stage a dynamic text box called "content_txt" inside of a movie clip instance "content_mc". When it enters the frame, I fade the "content_mc" from alpha 0 to 100 using a timeline animation. In order for this to work, I have to embed the font in my "content_txt" text field. However, the only way I get get the HTML formatting to work is if I do not embed the font.
    The dymanic text field is set to render as HTML. In my actions layer, I set the text:
    this.content_mc.content_txt.htmlText = "<b>Hello world,</b> it is me again."
    In summary:
    1. If I do not embed the font, the alpha fade does not work but the HTML formatting does.
    2. If I embed the font, the alpha fade works but the HTML formatting does not.
    How do I resolve this? It's driving me nuts!

    How do you embed just one style?
    I've tried typing three words in the text field and formatting each (regular, bold, italic) but the text field just defaults to whichever format is first.
    Also, I tried embeding the whole character list and did not have success.

  • Issue passing values to text symbols in Dynamic text PDF forms

    Hello Everyone,
    I am facing a problem related to Dynamic texts in Adobe PDF forms (Text node of type include text). I am able to pass the dynamic values to the Text node properties but i am not able to pass the values to Text symbols inside the Text node. When tested it says the field not found. I have the same structure and field in the CONTEXT as that of the text symbol. The problem i see is because in PDF the field names have $record.(fieldname) ?
    Please share your thoughts if anyone has faced similar problem or know how to handle it.
    Thanks a million in advance,
    Chandu

    Open the report up in the Designer and Click on Edit, Subreport Links. Likely what you can do is use Shared Variables to pass values from the main report to the subreport.
    You need to do this in the report first. If you are using RAS then you can at runtime. If RAS is not available to you then no way in code.
    See these samples:
    Root Page
    http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessIntelligence%28BusinessObjects%29+Home
    Enterprise Samples (including managed and unmanaged ras)
    http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessObjectsSDKSampleApplications
    Non-Enterprise Samples
    http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsSDKSampleApplications
    Exporting Samples (RAS)
    http://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples#NETRASSDKSamples-Exporting%2FPrinting
    Also refer to the DSK help files for the Engine or RAS and search on the subreportcontroller.
    If you are using RAS I'll move your post to the SDK forum.
    Thank you
    Don

  • Dynamic Text Formting issue

    I have two dynamic text fields the give the apearance of
    wrapping text around a photo. The text has been set up to load each
    text field and appear to smoothly wrap and look like one continued
    display. It work on the computer I am created it on...When loaded
    on other computers either some of the content in the first field is
    lost or the first field end sooner than is expected giving a choppy
    look. I cannot use one field and set it up as html (That would be
    to easy...clients never want easy).
    Is there some way to assure that every computer displays the
    text the same way???

    You probably need to include the instance name of the movie
    clip in your code.
    instancenameofyourmovieclip.loadVariables("content.txt",0);

  • FONT issue in flash with Dynamic text

    I dont even know how to start this thread... I am having a
    serious problem with fonts on the flash movie I am Making/
    Modifiying. The Font that is being used is "standard 07_53" and I
    have been trying to understand how flash works with the fonts but
    somethings are just making me scratch my head. First off :
    - I tried using both the anti-alias for readability and the
    anti-alias for animation... the anti-alias for animation seems to
    creat sharper text in most cases.. + I am embedding all charachters
    when I do that (I know this makes my file way too big, but I am
    trying to figure out where I am going wrong)
    - Q1 : I found out changing the position of where my text box
    is on the document changes how clear the text is in the final
    puplication. Now That I have not even the simlest idea why... does
    anyone know?
    - Q2 : The justify problem... whenever I use Justify my text
    is all messed up... I even tried to change the font to Arial for
    example and it still makes some of the text a bit blurry (well it
    is blurry enough that I can notice it right away).. why does this
    happen?? and is there any kind of solution to this problem?? I
    definatly want my text justified
    - Q3 : Do I and why, have to embed the font in each text box,
    wouldnt one embeding be enough if using the same font in all the
    other text boxes?
    - Q4: Why do I see the text differently on different
    computers.. and this realy is in relation to Q1.. on my monitor all
    looks good on the published document, yet on other monitors and
    computers it looks completely fussy untill I change the position of
    that text box.
    -Q5: are there any sites that go in depth about Fonts and
    dynamic text and how they end up rendering in flash?
    you can see my problem with justified text at :
    http://www.alwayscoffee.com/mirror/flash/
    then click on COMPANY and then look at the text under "ABOUT
    US"
    by the way I am using flash 8 and publishing (flash settings
    of:) flash player 8 - action script 2.0 - compress movie option
    CHECKED - and jpeg quality 80
    I apriciate all the help I can get.
    Layth

    Hi,
    as you I don't even know where to start, as it is (as you
    have noticed) quite a complex thing. If you are still interssted in
    the subject, drop me a line, and I try to answer some of your
    questions.
    markusma
    _remove_thieu@macDOTcom

  • Problm in dynamic text field when i view it in IE

    Hi
    i have used dynamic text field for UI Lebels, text is comming
    from xml file.i have TextFormat as well .
    when i publish and see out put in swf file it is looking good
    and all the text in the same place where i have placed it. but if i
    see it in IE browser.
    all text is moved littile bit as well as its not taking
    formating of the text .. means if i have used Arial bold 10 .. but
    is not showing bold ...
    can any body help on this issue

    It is a very simple to solve issue:
    There is a line break in your CSS code on the main page in the background image url.
    Current Firefox versions do not like that.
    <code>body {
    background:#000000 url("http://lh4.ggpht.com/_fKjKe5YUrXg/SjKITFBNaxI/AAAAAAAADWI/u5ohtFDhVc0/black-%20lighter.jpg
    background-position: down-left;
    background-attachment: fixed;
    background-repeat: no-repeat;
    margin:0;
    color:#E895CC;
    font: x-small "Trebuchet MS", Trebuchet, Verdana, Sans-serif;
    font-size/* */:/**/small;
    font-size: /**/small;
    text-align: center;
    </code>
    This should fix it:
    <code>body {
    background:#000000 url("http://lh4.ggpht.com/_fKjKe5YUrXg/SjKITFBNaxI/AAAAAAAADWI/u5ohtFDhVc0/black-%20lighter.jpg");
    background-position: down-left;
    background-attachment: fixed;
    background-repeat: no-repeat;
    margin:0;
    color:#E895CC;
    font: x-small "Trebuchet MS", Trebuchet, Verdana, Sans-serif;
    font-size/* */:/**/small;
    font-size: /**/small;
    text-align: center;
    </code>

  • Displaying the result of a calculation in a dynamic text box

    Hi folks,
    I'm having a very minor issue here (operator error, I'm sure ). With the help of some folks here, I've created a series of calculations, and I've got that part down. Now, I just need it to show up in the movie.
    I've created the dynamic text box in Flash (CS3), but when I hit test, it won't show up.
    After all the calculations, I should have a figure that I call totalmoney. My dynamic text box is called total. The user doesn't need to hit anything for it to appear. It just appears as part of the movie.
    Here's my code:
    stop();
    var startDate:Date = new Date(2010,0,12);  // use your  startyear, startmonth, startdate in the new Date() parameters.
    var  currentDate:Date = new Date();  // assuming user's clock is correct and in your  timezone.  else use server date/time.
    var numberOfSeconds:Number =  (currentDate.getTime()-startDate.getTime())/1000;
    var interest:Number =  (numberOfSeconds*0.74356);
    var totalmoney:Number =  (interest+15,000,000);
    function displaytotal(evt:TextEvent):void {
         total.text = "totalmoney";
    Any thoughts?
    Thanks!
    Napo

    You didn't have to bury any of the calculations in the function--leaving it as you had it is better.  They could remain where they a=werew, and you'll probably find you want them outside it if you have other plans for using them.  If left inside, they only have scope inside.  In the programming world, it's good to think of functions as things that do one thing and one thing only (though it isn't often practiced that way)--it's called modular design.
    When you place an event as an argument for a function, it typically means that there is an event listener that initiates the call to the function.  If you work with buttons you'll see what I mean.  But if the plan is to create your own call to a function when you desire it as such, not have it driven by an event listener, then you don't need to pass any event to it, though you may pass some other type of variable to it if need be.
    For instance, what you have now will call the function without an argument because the function has the value built into its code....
    displaytotal();
    But you could also make the function a little more generic and set it up to recieve the value instead as an argument...
    function displaytotal(amt:Number):void {
         total.text = String(amt); // an earlier error of mine
    displaytotal(totalmoney);
    That would make your function a little more useful.  Now it could be used to display other Number variables as well.
    // my earlier error was that a textfield displays text, so you need to convert the Number value to s String.
    Hope I'm not confusing you.

  • Linking a class to a dynamic text field to load XML data.

    Hi,
    I'm quite new to ActionScript and would be grateful for any help here.
    I want to load text into a dynamic text field (called 'about_tab') using  a class depending on the language selected (by clicking on a flag icon)  by the user.
    I managed to get this to work when the ActionScript was written directly  in the timeline, but am having problems with doing the same thing via a  class.
    This is my class file:
    package
    import flash.display.SimpleButton;
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import flash.net.URLRequest;
    import flash.net.URLLoader;
    import flash.events.Event;
    public class ChangeLang extends SimpleButton
    public function ChangeLang()
    addEventListener(MouseEvent.CLICK, switchLang);
    trace("ChangeLang class working");
    public function switchLang(event:MouseEvent):void
    var lang = event.target.name;
    var req:URLRequest = new  URLRequest("languages/"+lang+".xml");
    var loader:URLLoader = new URLLoader();
    var substance:XML;
    function xmlLoaded(event:Event):void
    trace("function xmlLoaded is running");
    substance = new XML(loader.data);
    about_tab.text =  substance.about_lbl;
    loader.addEventListener(Event.COMPLETE, xmlLoaded);
    loader.load(req);
    Here's one of my XML files (the other is the same except "About" is  written in German):
    <substance>
    <about_lbl>About</about_lbl>
    </substance>
    When I run it, it returns my trace statements that the class ChangeLang  and the function xmlLoaded are running, but no text appears in the  dynamic text field (I should/want to see the word 'About'). I get this  error message:
    1120: Access of undefined property about_tab
    The problem, I'm guessing, is in the part in red in my code. I think I need to target the text field in the display list by creating a  reference to it. If so, could someonw point out how I do this, or perhaps a tutorial that would help. I've tried adding the word stage (i.e.,stage.about_tab.text =  substance.about_lbl; ) but it still doesn't connect. I guess there's something really simple I'm missing, so I  apologize if this comes across as a stupid question
    Thanks for any help.

    Hello flashrocket!
    I'm also new to AS3 and I've just started using external classes and I think I know what you should do to put your code to work.
    Instead of using the text field you created inside your flash file, why don't you use the "TextField" class to create an instance of this object? It's the exact same thing as when you create and instantiate a new text field inside Flash.
    First, import flash.text.*; (includes classes like TextField, TextFieldAutoSize, TextFormat, TextFormatAlign, etc)
    Than you just have to create a var like
    public var about_tab : TextField;
    or
    public var about_tab : TextField = new TextField();
    then, to adjust the properties of this tab you use dotsyntax as if it where on your stage like:
    about_tab.x = 50; about_tab.alpha = .5; etc...
    you can even create a function to "config your textField"
              private function createAndConfigTextField() : void {
                   about_tab = new TextField(); //you only need this line if you
              // only typed something like "public var about_tab:TextField;
              // if instead you used "public var about_tab:TextField = new TextField(); outside
              // this function, just skip this first line because you already have an instance of
              // text field named "about_tab"...
                            about_tab.autoSize = TextFieldAutoSize.CENTER;
                   about_tab.background = true;
                   about_tab.border = true;
                   var aboutTextFormat : TextFormat = new TextFormat();
                   format.font = "Arial";
                   format.color = 0x000000;
                   format.size = 11;
                   format.bold = true;
                   format.align = TextFormatAlign.CENTER;
                   about_tab.defaultTextFormat = aboutTextFormat;
                   addChild(about_tab);
    This is just an example of what you can do... I hope you get it... let me know if you have any doubt...

Maybe you are looking for

  • How do i rotate an image in keynote?

    Im trying to rotate an image in keynote bc im making a collage and i dont want all my images straight up and down. Does anyone know how to do that?

  • My speakers are not playing sound. Also no sound when I plug in headphones.

    This just started happening today. I bought this computer less than a month ago. I haven't dropped it, spilled anything on it or done anything damaging to it. All of a sudden no sound came through when I tried playing music. I checked EVERYTHING and

  • Help in finding Partition_name, no. of rows in each partition

    hello all, Please help me in finding out Partition_name, no. of rows in each partition, max_value in each partition. for a paritioned table Please help on this. Edited by: user577981 on Jan 2, 2009 9:13 PM

  • Error Setting up Xcelcius 2008 trial

    Hi, I have downloaded a trial version of Xcelsius 2008 from: http://www.sdn.sap.com/irj/uac/library-bi#section11 http://downloads.businessobjects.com/akdlm/xcelsius/Xcelsius_Engage_30day_trial.zip When the setup is run the following error occurs: u20

  • EUR to USD

    Hi can anybody please advise on this Please advise in due time what needs to be set up so that US 10 will bill in USD to BAG starting in FY09. is it sufficient that new POs are placed in USD? can existing POs be translated to USD from Euro? Raju