XML / Flash help, please.
- Started
- Last post
- 15 Responses
- Andrew_D
Hi, for some reason I'm not able to bold text in flash when I add tags to it in the XML.
Here's what the XML looks like:
<?xml version="1.0" encoding="UTF-8"?>
<itemContainer><item title = "Tips & tricks" path = "images/features/homescreen1.jpg">
<teaser>Blurb about personalizing your phone and using all the awesome features...</teaser>
<detail>
<itemDetail><![CDATA[Create a device that suits your style by using the personalization features!]]></itemDetail>
<itemDetail><![CDATA[Put applications at your fingertips. Select Go to > Options > Select options and choose the applications you want in the menu.]]></itemDetail>
</detail>
</item>
</itemContainer>and here's the bit of action script calling it into the flash file:
Object.Main = this;
onLoad.moveButtons(0);
function galleryChoice(q) {
tArray = new Array();
titleArray = new Array();detailItems = new Array();
detailArray= new Array();
my_xml = new XML();
for (var j = 0; j<curLength; j++) {
this.th_nav["thmb"+j].removeMovi...
}my_xml.ignoreWhite = true;
my_xml.onLoad = function(loaded) {
if (loaded) {
gallery = this.childNodes[q];curLength = gallery.childNodes.length;
trace(curLength)
_root.totalItemLength = curLength
_root.bigPanel = 0for (var i = 0; i<gallery.childNodes.length; i++) {
tArray.push(gallery);
titleArray.push(gallery.childNod...}
}
delay = setInterval(makeButtons, 50);
};
my_xml.load("xml/XMLtext.xml");
}
function makeButtons() {
tnNr = 0;
clearInterval(delay);
for (var i = 0; i<tArray.length; i++) {
_root.panelHeight = 0
var thb = bt_p.attachMovie("itemBox_mov", "thmb"+i,i, {_y:(i*29)})
thb.featureText.text = titleArray[i];detailItems = gallery.childNodes[i].firstChild...
trace(detailItems)
for (var j = 0; j<detailItems.length; j++) {
detailArray = detailItems
var detailBox_MC = thb.contentBox.attachMovie("deta... "detailBox"+j,j, {_y:_root.panelHeight})
detailBox_MC.featureDetailText.h... = detailArray[j]
detailBox_MC.featureDetailText.s...
detailBox_MC.featureDetailText.a... ="center"_root.panelHeight = _root.panelHeight + detailBox_MC.featureDetailText... + 5
trace("DETAIL"+j+": "+detailArray[j])
trace("this: "+detailBox_MC.featureDetailText...}
_root.bigPanel = 50 + _root.panelHeight
thb.featureNumHigh.text = _root.bigPanel_root.distanceMove = 183
_root.buttonBG_height = 183
_root.thisSelected = 0
moveButtons(0)}
loadButtons();
}Anything jump out at anybody? It's probably something stupid, but I'm not the greatest at flash.
- Andrew_D0
Apparently I was able to bold my text in my post!
- Andrew_D0
Hi, for some reason I'm not able to bold text in flash when I add < strong >tags to it in the XML.
Here's what the XML looks like:
<?xml version="1.0" encoding="UTF-8"?>
<itemContainer>
<item title = "Tips & tricks" path = "images/features/homescreen1.jpg">
<teaser>Blurb about personalizing your phone and using all the awesome features...</teaser>
<detail>
<itemDetail><![CDATA[Create a device that suits your style by using the personalization features!]]></itemDetail>
<itemDetail><![CDATA[Put applications at your fingertips. Select Go to > Options > Select options and choose the applications you want in the menu.]]></itemDetail>
</detail>
</item>
</itemContainer>
and here's the bit of action script calling it into the flash file:
Object.Main = this;
onLoad.moveButtons(0);
function galleryChoice(q) {
tArray = new Array();
titleArray = new Array();
detailItems = new Array();
detailArray= new Array();
my_xml = new XML();
for (var j = 0; j<curLength; j++) {
this.th_nav["thmb"+j].removeMovi...
}
my_xml.ignoreWhite = true;
my_xml.onLoad = function(loaded) {
if (loaded) {
gallery = this.childNodes[q];
curLength = gallery.childNodes.length;
trace(curLength)
_root.totalItemLength = curLength
_root.bigPanel = 0
for (var i = 0; i<gallery.childNodes.length; i++) {
tArray.push(gallery);
titleArray.push(gallery.childNod...
}
}
delay = setInterval(makeButtons, 50);
};
my_xml.load("xml/XMLtext.xml");
}
function makeButtons() {
tnNr = 0;
clearInterval(delay);
for (var i = 0; i<tArray.length; i++) {
_root.panelHeight = 0
var thb = bt_p.attachMovie("itemBox_mov", "thmb"+i,i, {_y:(i*29)})
thb.featureText.text = titleArray[i];
detailItems = gallery.childNodes[i].firstChild...
trace(detailItems)
for (var j = 0; j<detailItems.length; j++) {
detailArray = detailItems
var detailBox_MC = thb.contentBox.attachMovie("deta... "detailBox"+j,j, {_y:_root.panelHeight})
detailBox_MC.featureDetailText.h... = detailArray[j]
detailBox_MC.featureDetailText.s...
detailBox_MC.featureDetailText.a... ="center"
_root.panelHeight = _root.panelHeight + detailBox_MC.featureDetailText... + 5
trace("DETAIL"+j+": "+detailArray[j])
trace("this: "+detailBox_MC.featureDetailText...
}
_root.bigPanel = 50 + _root.panelHeight
thb.featureNumHigh.text = _root.bigPanel
_root.distanceMove = 183
_root.buttonBG_height = 183
_root.thisSelected = 0
moveButtons(0)
}
loadButtons();
}^hopefully this works
- bulletfactory0
i didn't know <strong>bold was an option</strong> on qbn
- damn - didn't work.bulletfactory
- Odd, eh? maybe don't close the tag, cause I didn't.Andrew_D
- rosem0
like <bold>this</bold>?
- bulletfactory0
worth a <strong>shot!
- Andrew_D0
acescence, how should we go about this? How have you done it in the past?
- acescence0
not sure what the correct way is, but i've gotten it to work by using the font tag with face attribute = the name of your bold font
- sixfngers0
one way you can test this is by changing the typeface to _sans. If it shows up correctly then your code is right and its just the typeface that needs to be embedded.
You can always place a empty dynamic text field on the stage with all of the chars for the typeface you are using embedded, then you can use that typeface whenever you need to. Even if it's in another text box.
- Milan0
Try typing 1 regular and 1 bold character into your dynamic textfield, then embed the character sets you need using the "character embedding" button.
If you're creating the textfield with actionscript, you'll need to do it differently.
- Masterramos0
<bold>bold?<bold>
- Andrew_D0
Thanks for the help, everybody and it's quite amusing seeing everyone try to bold their text. I've created a monster!