-
Senior Member
[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."
-
Can't Re-Member
ummm.. no files attached....
-
Senior Member
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."
-
Senior Member
"My boss sits and watches TV in a hot dog suit and I think he might be a moron."
-
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?
-
Senior Member
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."
-
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?
-
Senior Member
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."
-
btw, i like the menu...it's smooth
-
Senior Member
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."
-
Senior Member
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."
-
Can't Re-Member
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.
-
Senior Member
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."
-
Can't Re-Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|