dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: LoadMovie + Dynamic Text Problem HELP!

  1. #1
    Junior Member
    Join Date
    Jan 2007
    Posts
    1

    LoadMovie + Dynamic Text Problem HELP!

    Ok,

    This is on Flash MX

    I am working on an online TV show that displays my sports simulations. My Main SWF is a TV that has a basic menu. We will call this moviea. When a channel is selected, that channel is loaded as a separate swf file we wil call movieb.

    MovieB is loaded into a movieclip with instancename "screen";.

    Now in movie b, i start to give the weather forcast and want to display some random variables for temperature, wind etc. So I have dynamic text boxes. Because i want to fade them in and out, that is saved in a local movie clip in Movie B. I have given this movieclip instance name weatheroverlay.

    Now i have tried accessing the variable by every name and its mother and i cnat seem to get the blasted text boxes to display. According to the debugger the values have been saved(see below), but they just arent showing up. Among the names ive tried are:

    _root.screen.weatheroverlay.temp=
    _root.screen.weatheroverlay.temp.text=
    _root.screen.weatheroverlay.temp.value=
    _level0.screen.weatheroverlay.temp=
    _level0.screen.weatheroverlay.temp.text=
    _level0.screen.weatheroverlay.temp.value=
    _level0.weatheroverlay.temp=
    _level0.weatheroverlay.temp.text=
    _level0.weatheroverlay.temp.value=
    _level1.weatheroverlay.temp=
    _level1.weatheroverlay.temp.text=
    _level1.weatheroverlay.temp.value=

    Ive checked all the obv stuff like my text color being the right color etc... The text box has the variable name temp.

    When i set them to the following, the show up in the debugger:

    var temp = random(40)+40;
    _level0.screen.weatheroverlay.temp=_root.screen.te mp+" F";


    This is what the debugger shows:

    Variable _level0.screen.weatheroverlay.temp = "70 F"
    Variable _level0.screen.weatheroverlay.precip = "60%"
    Edit Text: Target="_level0.screen.weatheroverlay.temp"
    variable = "temp",
    text = "70 F",
    htmlText = "70 F",
    html = false, textWidth = 93, textHeight = 27, maxChars = null,
    borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false,
    background = false, wordWrap = false, password = false, multiline = false,
    selectable = true, scroll = 1, hscroll = 0, maxscroll = 1,
    maxhscroll = 0, bottomScroll = 1,
    type = "dynamic",
    embedFonts = false, restrict = null, length = 4, tabIndex = undefined,
    autoSize = "none",
    condenseWhite = false

    But alas no text, any help would be greatly appreciated.

    I will note i have the SWFs in different directories, ive heard rumors that could be a no no, but im not going to jarble them all up until i hear otherwise, and everything but the dynamic text works great.

    Rob

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    Read Text Fields - don’t use Var and understanding target paths.

    But notice that you can only assign text after the external movie finishes loading and the text field exists.
    When you do something like:
    code:

    trace (_level0.weatheroverlay.my_txt );


    this can't be undefined.
    Last edited by nunomira; 03-07-2007 at 08:57 AM.

  3. #3
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    Moved from the Scripting & Backend to the ActionScript forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center