Dynamic text feild

works when exporting and publishing but when i "put" the file
on my dreamweaver site it wont show up online. why is this
happening and what should i do to fix it.
this is the code i used according to a flash book with step
by step sorrta stuff...
thanks in advance

well, one should use SWFObject js to embed rather than the
standard <embed> and/or <object> tags, but the
embedding method wouldn't cause the problem. the OP is making a
loadVariablesNum call from Flash, to a plain text file, which
wouldn't have anything to do with the embedding in the HTML.
preferably, one should use LoadVars anyway, where you could
use some event handlers, but it's likely, as kglad stated, that the
call is being made previous to the init of the swf, that the file
is not present or in the wrong directory.

Similar Messages

  • Dynamic Text Feild with Dynamic Scroll Bar

    I have a Dynamic Text Feild with a dynamic Scroll bar.
    It loads a simple ASCI text file with some html formating.
    but I still can not manage to get the text to format.
    The biggest problem with the format is a big space between
    paragraphs.
    I am not sure why but I think the Frame must need a var to
    render to html.
    Can anybody help please?

    My text had the following, similar but no parsing string.
    I guess
    yourstring.split("\n\r").join("\r").split("\r\n").join("\r");
    takes out the carrage returns or <br>?
    I notice the one I had just say's String.
    I assume that would be the text that is the string?
    Thank you for sharing your knowledge of this.
    var my_lv:LoadVars = new LoadVars();
    my_lv.onData = function(src:String) {
    if (src != undefined) {
    myTxtFeild.text = src;
    } else {
    myTxtFile.text = "Error loading text.";
    my_lv.load("CadnetPage1_html.txt");

  • What's the code for applying CSS to an XML file, in a dynamic text feild

    Hi all,
    Very simply put, just like in the title.
    If you have a CSS ready, an XML file that already appears
    inside a dynamic text field, what AS2 code would you use to connect
    the CSS so it applies to the XML file which is now unstyled?
    thanks!!!

    ...sorry for thaking a while to get back to you. I pluged the
    code you provided and the exported flash does not deplay the text.
    instead it says "undefined" which to me means something in the xml
    files is work, which is strage since I tested the xml file in a
    browser and it works find. so i am providing both the AS code
    (below) and the xml and css file (attached). my hope is that you
    can direct me to what the problem is.
    THANK YOU AGAING FOR ALL YOU HELP!!!
    AS code:
    Scrolling Text XML by Digital Science |
    www.digitalscience.za.org
    /////////////Load XML Data/////////////
    function loadXML(loaded) {
    if (loaded) {
    xmlNode = this.firstChild;
    header = [];
    txt = [];
    total = xmlNode.childNodes.length;
    for (i=0; i<total; i++) {
    header
    = xmlNode.childNodes.childNodes[0].firstChild.nodeValue;
    txt
    = xmlNode.childNodes.childNodes[1].firstChild.nodeValue;
    gotoAndStop(11);
    } else {
    errorMsg.text = "Error loading XML";
    xmlData = new XML();
    xmlData.ignoreWhite = true;
    xmlData.onLoad = loadXML;
    xmlData.load("member_content_test.xml");
    stop();
    import TextField.StyleSheet;
    var ss:StyleSheet = new StyleSheet();
    ss.onLoad = function() {
    txt_mc.styleSheet=this; // where yourTF is your textfield
    ss.load("jokes.css"); // where yourSS.css is your css file.

  • Dynamic text not displaying when publishing for flash 8

    This dynamic text works fine when the movie is published for
    flash 7, but when i export for the flash 8 player it seems to be
    invisible. Is there any obvious reason for this happenning?
    thanks
    jon

    Ok, thanks, looks like you've pointed me in the right
    direction. I havent fixed it yet though. Heres where i am at:
    eval(theTarget+".buttonPrime").tex.embedFonts = false;
    now i can see my text. of course its using a default font.
    var my_fmt:TextFormat = new TextFormat();
    my_fmt.font = "arial14b";
    eval(theTarget+".buttonPrime").tex.embedFonts = true;
    eval(theTarget+".buttonPrime").tex.text = "wasssup?";
    eval(theTarget+".buttonPrime").tex.setTextFormat = my_fmt;
    this isnt working. I have added a font object to the library
    and linked it for actionscript using the monkier "arial14b".
    however my text is quite invisible. i have checcked, 'export in
    first frame' for the font object i even tried it with this
    deselected. i have deselected the embed font option on the text
    feild itself. that doesnt work either (unless i dont try to set the
    text format, so long as i accept a default font, its fine).
    so err, help?
    confused
    jon
    ps further to this is have discovered more about this strange
    behaviour. i can set the text to a different string, provided i do
    not try to embed the font in any way. if i set the font to embed, i
    can have the text display with the correct font, until i change the
    text. then it dissappears. also i cannot seem to affect properties
    like font size by means of my TextFormat object. the textFormat
    object also does not seem to affect the font of the text.
    in short, when exporting for flash 8, i cannot seem to
    successfully embed fonts for dynamic text. the only thigs i have
    gotten to work are: static text (or a dynamic text feild with
    unchanged text) with an embedded font, or dynamic text with a
    default font.

  • Dynamic text problem in flash cs5

    Hi guys,
    im building a flash website and the first page has dynamic text fields that load text via xml, that all works fine. But when i create a dynamic text field  further up the time line for the second page ( i use the same code all at the fist frame of the timeline) and nothing loads. if i have an instance of the text on the first page at the start of the time line it will load on the next page (further up the time line). Ii have stop  and click to go and play in the code to break up the pages.
    I am a little lost, as i normally use static text.
    any help would be greatly appreciated.
    cheers

    Ah found out myself the hard way that i need to put the text feild inside its own symbol!
    only took me all morning

  • 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.

  • Dynamic Text Field is not displaying foreign characters... HELP!

    I have a dynamic text field that is not displaying foreign characters properly. They appear as boxes.
    Here's what I've tried.
    Under properties for the text field, I clicked on the embed characters button. In there, I pasted all the special characters I would need and clicked okay. Shouldn't this be enough for the text to display properly? What am I missing? Please help...

    More info: I'm noticing that in the actual dynamic text field in my .FLA file, if I type a foreign character like é, it pops up as a block. My family font is set to New Caledonia... is it possible that New Caledonia doesn't have those particular glyphs? The thing that doesn't make sense to me though is, last year when I made this card, it worked fine with New Caledonia... Any help is greatly appreciated!!

  • EDGE and HTML dynamic text in a "box" with scroll bar

    I'm new to EDGE, a win7pro master collection cs5.5 suite owner. I'm mainly in the Film/Video post production field (mostly AE, PPro, Pshop, IA) but have been branching into web design the last couple of years.  I use Dreamweaver, Fireworks, Flash. While I'm a expert user with all the Film/video apps, I would say I only have intermediate ability with the web apps. While I understand a lot of programing logic bulding blocks I'm not a coder.
    So since we're told "flash is dead",  my interest in Edge is to try to do some of the things that I can currently do in flash in  EDGE. I was excited when Edge first came out but lost interest when it became obvious that Adobe was not going to offer Edge and Muse to "suite owners" but only in their force feeding of the "Cloud". Better known as the "golden goose" for adobe stockholders and a never ending perpetual hole in the pocket for users. Anyway....
    I spent the last couple of days doing some of the tuts and messing with the UI. It's matured a lot since I was here last.
    I've been working on a flash site for a sports team where one of the pages is a player profile page where college recuriters and other interested parties can view recuriting relavent info/stats about players. This is how it works. While on the "Team" page a users clicks on  a button labled "Player Profiles" . (Animation) A "page" flies in and unfurls from the upper right corner (3d page flips effect created in AE played by flash as a frame SEQ). Once it lands filling most of the center of the screen there is a bright flash. As the brightness fades we see the "page" is a bordered box with a BG image of a ball field(End). (Animation) from behind the border in fly small pictures (player head shots with name and jersey number). They stream in and form a circle like a wagon train and the team logo zooms up from infinity to the center of the circle(End). As the user mouses over a player's pic it zooms up a little and gets brighter (like mouseover image nav thumbs for a image slider). If the user clicks on a player's head shot it flips over and scales up to become a text box with a scrollbar. The content of the box is a mix of images, static and dynamic text fields populated from data in an "player info data base" XML file, and some hyperlinks. It's all kept updated dynamicaly with current stats, info and images from the XML file. There is also a "PDF" button that allows the user to open/save/print a PDF of the player's profile (the PDF's are static files for now but the choice of which pdf to retrive is dynamicaly supplied via the XML file.
    So.... Is Edge now able to do something like this?  Would it need to be a collection of small animations? could these be "assembled" and connected as an asset in dreamweaver ?
    I thought I would approach this from the end (ie click on an image and display a box with dynamic TEXT fileds. ) since that is the most important part, ie displaying the dynamicaly updated profile info.  Sooooo....
    Can Edge display a scrolling text box with Images, static text, and html dynamic text in it??
    Joel

    The code is in composition ready. Click the filled {}

  • How to use same dynamic text, multiple times in a Movie

    FLASH CS5.5
    How can a dynamic text field be used multiple times, on any
    frame, in any new layer during a Movie?
    ~~
    A number of unique dynamic text fields are being used.
    The intent is to use them each, many times during a Movie.
    (i.e. a users first name)
    They are successfully being "ExternalInterfaced" from a PDF form field.
    (the SWF is displayed within the PDF as a RMA)
    This all works well, IF I only use one instance of the dynamic text field.
    (one use of each unique text field)
    If I try and use that same dynamic text field, again, in a new layer, later in the SWF,
    all of that said, duplicate dynamic text fields do not display.
    ~~
    Stumped!!!
    Thanks in advance for your advice / comments!
    D-

    Thanks Ned,
    I always welcome learning something new.
    I did not know creating a new keyframe,
    creates a new instance.
    Yes, I had used the same dynamic text field instance name in
    numerous, new layers (great observation).
    With the objective to display the User's name throughout
    the timeline (on and off)...
    I'll attempt to paraphrase your solution;
    Use a single layer to display the dynamic text field.
    Extend this layer's timeline throughout the movie, or end use of the dynamic text field.
    Help with this one ??
    Set the visible properties to true or false as need through out the timeline.
    ( Does require an AS3 ? )
    I'll give that a try.....
    ~~
    Side of effect of using the above solution;
    The SWF in it's attempted state, uses the dynamic text field instance, in
    different places, different text sizes, on the stage, throughout the Movie.
    (i.e. the User's first name appears in different sentences...)
    Per the solution above,
    I believe I will be limited to One location, one format setting.
    Is this assumption correct?
    I can make this work from a display / Movie point of view.
    However, your first VAR concept, noted above, might be
    worth exploring should more flexibility be required.
    Thanks for making the time to coach...
    D-

  • How do I make dynamic text look static while the HMTL tagging is enabled?

    Hi all,
    I am using flash 8 with AS 2.0.
    I have a dynamic text field where I am setting it's text value through a variable. Now, I need this dynamic text field content to look like static font on runtime. I tried embedding the text field but that makes my file so heavy and most importantly, it disables the HTML tagging on the text field.
    Please suggest me on how to make a dynamic text field content look static on runtime while the HTML tagging is enabled and working fine.
    Thanks.

    I am sorry. But the attachment was not intended for what you
    thought my friend.
    It was there so that there are no confusions for what I mean by look of dynamic and static text fields.

  • How do I embed multiple font outlines in dynamic text field

    Can anyone tell me how I can embed multiple font outlines in
    Flash MX so I can get smooth text in a dynamic
    text frame? I want to use Regular, bold and italic in various
    parts of the text.
    I was using the Character button in the properties manager
    and tried to include all Characters. That does not work.
    In the Properties manager I can choose Bold and/or Italic.
    But it becomes a universal setting that overrides my HTML tags in
    my external txt file that I am importing. I dont want all my text
    to be bold.
    If I dont select them in the properties, however, Flash will
    not embed the font that it needs.
    Is there a different way to embed fonts other than under the
    Character Tab?
    I tried to import fonts to the library, but can not select
    them.
    Your help would really be appreciated.
    Sincerely,
    ggaarde

    ggaarde wrote:
    > Thanks Urami
    > Tried your method and it does not work for me.
    > I put 3 dynamic text fields in the first frame of the
    movie. Set them up to
    > where one is regular, one is bold and one is italic
    Helvetica.
    Weird, it works for me on first go, always had in fact :)
    Show you an example, try to compare to your file see if you
    missed anything accidentally.
    http://flashfugitive.com/stuff/font/text.swf
    text file
    http://flashfugitive.com/stuff/font/text.txt
    fla
    http://flashfugitive.com/stuff/font/text.fla
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Is there a way to list all the file names (automatically) in a folder to dynamic text box?

    Hi,
    I would like to know whether FLASH AS3 has some option to get all the files names from a folder specified and show it in a dynamic text box? Whenever some new files added to this folder it should update the list accordingly.
    Thanks for any information in this regard.

    Not particularly experienced in this field myself, but I've found its just easier to implement an XML file which lists the contents of the folder. It just means that when you upload a new file you have to add it to the list in the xml file also. No real hardship once you figure out the mechanics of it

  • Text jumps after embedding font in dynamic text field!

    Hi
    this is driving me mad
    Im using a standard font (Gotham rounded) within a dynamic text field. As soon as I embed the numerals within this text field the text lowers within the text field.  Double clicking the field then renders the text higher up!  It seems that the height it shows when I double click is the height it compiles at.
    The other strange and annoying thing is that my colleague working on the same project is using the exact same font and same file but this doesnt happen to him and so the font redners out differently when he compiles!
    Could anybody please help me sort this problem out as its reeeeally annoying
    many thanks!
    Nick

    nobody any ideas?!

  • How can I load a .TXT file into a dynamic text box?

    I am sure that many people know how to load a .txt file into
    a dynamic text box. But I do not. I want to be able to reference a
    txt file from the server into the text box. So that when I change
    the text file it changes in the flash movie without even editing
    the flash file itself. Thank you.

    http://www.oman3d.com/tutorials/flash/loading_external_text_bc/
    I think this is the simplest way to go :)

  • 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