A Flash Developer Resource Site

Results 1 to 14 of 14

Thread: [MX04] Calling in text into dynamic textfield from xml file

Hybrid View

  1. #1
    Senior Member Bobby Hill's Avatar
    Join Date
    Feb 2004
    Posts
    243

    [MX04] Calling in text into dynamic textfield from xml file

    I have been trying to call in text from a xml file to place this text into a dynamic textfield, but I can't seem to get it to display in the textfield. I have included the zipped file below. Thanks,

    -edit-

    Oops!

    Here's the file. I wasn't able to include images because of the file size limitations.
    Last edited by Bobby Hill; 07-04-2006 at 06:29 AM.
    "My boss sits and watches TV in a hot dog suit and I think he might be a moron."

  2. #2
    Can't Re-Member madzigian's Avatar
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    2,662
    ummm.. no files attached....
    Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
    OS X 10.3.9 || Flash MX04 Pro
    | del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |

  3. #3
    Senior Member Bobby Hill's Avatar
    Join Date
    Feb 2004
    Posts
    243
    The file should be now attached.
    "My boss sits and watches TV in a hot dog suit and I think he might be a moron."

  4. #4
    Senior Member Bobby Hill's Avatar
    Join Date
    Feb 2004
    Posts
    243
    bump;
    "My boss sits and watches TV in a hot dog suit and I think he might be a moron."

  5. #5
    will i ever get it?
    Join Date
    Feb 2004
    Posts
    707
    hi bobby hill...i looked at the files....the menu loads, and menu.xml is the only xml file i am finding in the zip...is the dynamic text field you refer to the fields in the menu buttons?

  6. #6
    Senior Member Bobby Hill's Avatar
    Join Date
    Feb 2004
    Posts
    243
    The dynamic textfield is going to be on the second frame of the main timeline; it is not part of the menu. You will also need the about.txt too in the zip file.
    Last edited by Bobby Hill; 07-04-2006 at 08:22 AM.
    "My boss sits and watches TV in a hot dog suit and I think he might be a moron."

  7. #7
    will i ever get it?
    Join Date
    Feb 2004
    Posts
    707
    if it is the large text field (bottom left corner) i noticed it does not have an instance name....is that the field in question?

  8. #8
    Senior Member Bobby Hill's Avatar
    Join Date
    Feb 2004
    Posts
    243
    Yep, that is the field in question.
    "My boss sits and watches TV in a hot dog suit and I think he might be a moron."

  9. #9
    will i ever get it?
    Join Date
    Feb 2004
    Posts
    707
    btw, i like the menu...it's smooth

  10. #10
    Senior Member Bobby Hill's Avatar
    Join Date
    Feb 2004
    Posts
    243
    Yeah, it is smooth. I just can't get it to publish to version 7 for some reason?
    "My boss sits and watches TV in a hot dog suit and I think he might be a moron."

  11. #11
    Senior Member Bobby Hill's Avatar
    Join Date
    Feb 2004
    Posts
    243
    Does anyone know where I am going wrong with this?
    "My boss sits and watches TV in a hot dog suit and I think he might be a moron."

  12. #12
    Can't Re-Member madzigian's Avatar
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    2,662
    well.. part of the problem i see is here:
    Code:
    function textDisplay(displayText) {
    		description = new loadVar();
    		// THIS SHOULD BE 
    		var description = new LoadVars();
    		// ALSO... what is displayText??...  i can't find a reference to a file
    		description.load(displayText);
    		description.onLoad = function(success) {
    			if (success) {
    				// trace(success);
    				// You also can't use a variable name in your text field
    				// if you are using LoadVars()  you need to give your TF an
    				// instance name such as desc_txt.
    				// but the your text file MUST start with &displayText= to work here...
    				desc = this.displayText;
    			}
    		};
    	}
    That's just at first glance... i'll keep looking at it. But check your syntax for other errors like loadVar() - LoadVars()

    Also... the textDisplay(displayText) function is never called!! you have to run it if you want it to execute. but you need to provide a .txt file for it to load.
    Last edited by madzigian; 07-04-2006 at 10:30 AM.
    Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
    OS X 10.3.9 || Flash MX04 Pro
    | del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |

  13. #13
    Senior Member Bobby Hill's Avatar
    Join Date
    Feb 2004
    Posts
    243
    I want it to load the text files that are referenced in the xml file. Inother words when the button is pressed the picture comes in and description of the picture comes into the dynamic text field. I think this particular function need to be removed from the AS.
    "My boss sits and watches TV in a hot dog suit and I think he might be a moron."

  14. #14
    Can't Re-Member madzigian's Avatar
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    2,662
    i tried tracing everywhere that 'description' came up and this was the result:
    Code:
    undefined --> i.attributes.description
    txt/about --> k.attributes.description
    txt/about --> k.attributes.description
    txt/about --> k.attributes.description
    undefined --> i.attributes.description
    undefined --> k.attributes.description
    undefined --> k.attributes.description
    undefined --> k.attributes.description
    undefined --> i.attributes.description
    undefined --> menuObj["desc"+Present_item].description
    undefined --> menuObj["desc"+Present_item].description
    undefined --> menuObj["desc"+Present_item].description
    So it's not reading the data right...



    The way that this was built is SOOOO much different than the way i write code, so i can't really help you.. the fact that it's all in an onClipEvent() makes it more confusing.
    Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
    OS X 10.3.9 || Flash MX04 Pro
    | del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |

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