A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Substituting a variable name for an instance to work in Flash 5

  1. #1
    Junior Member
    Join Date
    Apr 2002
    Posts
    16

    Substituting a variable name for an instance to work in Flash 5

    Hello!
    I am updating a Flash 5 file and when I export I get this error:
    WARNING: This movie uses features that are not supported in the Flash 5 player
    Symbol=Symbol 20, Layer=Layer 1, Frame=1: Flash MX Text Field Instance Name

    I've seen that Flash 5 doesn't support the instance name. I've tried to name the variable instead but can't get it right. Any idea how i would update this code if I made the variable name "Text_label"?

    obj.label_txt.text = node.firstChild;

    Thanks for any help.
    Viner1

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Well Flash 5 doesn't support a textfield's instance name, but supports movie clip instance names...

    Clear the textfield's instance name and set a variable name in the textfield's VAR box, my_var for example...

    my_var = node.firstChild;

  3. #3
    Junior Member
    Join Date
    Apr 2002
    Posts
    16

    I forgot to mention

    I forgot to mention that the text box is used to pull dynamic text from an XML file. I changed the name of the variable like you said and then the code. It's not working. Do I need to do something different b/c it's a dynamic text field?

    (I'm trying to update someone else's file)

    Thanks for the help.

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Well I'm not at all familiar with XML, so can't really say...

    But you could first check if by setting some value to the my_var variable, to see if it does show up...

    my_var = "oldnewbie";

    Now another thing to check would be where this textfield is... Is it on the main timeline, or nested in some clips...

  5. #5
    Junior Member
    Join Date
    Apr 2002
    Posts
    16

    Not Sure

    I'm not sure where i put:
    "my_var = "oldnewbie";" to test the code.

    the variable name is in a movie clip and that symbol is used several times in another movie clip. I'm pretty sure the xml file isn't effecting this. I'm unsure if just by naming the variable it works the same as naming the instance.

    thanks for the help. this is way over my head. i was just trying to make a simple adjustment and then this occured.

    thanks.

  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Well if you used...On the first frame of your movie...

    _level0.my_var = "oldnewbie";

    And then changed the my_var to _level0.my_var in the VAR box, it should appear...

  7. #7
    Junior Member
    Join Date
    Apr 2002
    Posts
    16

    It shows up in publish preview but not when

    It shows up in publish preview but not when I export it to flash 5.
    Thanks again.

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