Quote
TypeError: Error #1006: SetXML is not a function.
at oil_barrels_fla::MainTimeline/frame1()
at oil_barrels_fla::MainTimeline/frame1()
Here is the only actionscript that deals with the XML (it is embedded):
Here is the XML and the call:
var myXML:XML = <Countdown
Type="Custom"
StartNum= {-i['totalBarrels']}
Increment="0.0012"
Delay="1"
UseDate={i['xmldate']}
EndFunction="Super"
Fullscreen="false"
Width="185"
Height="200"
Format="6 . 4"
TimeZone="user"
PlaySound="false"
FlipBackColor="#ffffff"
FlipTextColor="#6a1717"
FlipTextSize="70"
TextColor="#cccccc"
TextSize="15"
TextAlign="center"
ShowShadow="false"
/>
countdown_mc.SetXML(myXML);
Here is all of the actionscript on that frame:
//Get barrel amount from parameters
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
for (barrelamount in paramObj) {
barrelamount = paramObj[barrelamount];
}
var barrelamount; //Instantiate barrel amount
if(barrelamount == '' || barrelamount == null)
{
barrelamount = 620000;
}
var i:Array = new Array();
i['today'] = new Date();
i['xmldate'] = i['today'].fullYear + "/01/01 00:00";
i['tdyInSec'] = i['today'].getTime()/1000; // Milleseconds / 1000 to get seconds
var tdyInSecNum:Number = Math.round(Math.abs(i['tdyInSec']));
i['strtYr'] = new Date(2011, 05, 01);
i['strtYrInSec'] = i['strtYr'].getTime()/1000; // Milleseconds / 1000 to get seconds
var strtYrInSecNum:Number = Math.round(Math.abs(i['strtYrInSec']));
i['diffSec'] = tdyInSecNum - strtYrInSecNum;
i['barrels2Subtract'] = Math.round(Math.abs(i['diffSec'] * .0012));
i['totalBarrels'] = barrelamount - i['barrels2Subtract'];
var myXML:XML = <Countdown
Type="Custom"
StartNum= {-i['totalBarrels']}
Increment="0.0012"
Delay="1"
UseDate={i['xmldate']}
EndFunction="Super"
Fullscreen="false"
Width="185"
Height="200"
Format="6 . 4"
TimeZone="user"
PlaySound="false"
FlipBackColor="#ffffff"
FlipTextColor="#6a1717"
FlipTextSize="70"
TextColor="#cccccc"
TextSize="15"
TextAlign="center"
ShowShadow="false"
/>
countdown_mc.SetXML(myXML);
Please help, thanks!

New Topic/Question
Reply



MultiQuote



|