Hey all…
I have two SWFs: one has 37 buttons, each button instance navigates through an XML document displaying location specific information onRollover. onPress, the XML node references (image[3], etc…) are sent using localConnection to the second SWF…
All that works fine and dandy, but i am trying to load JPG’s into a holder on the second SWF (from thumbnailPath*). They load; but the proportions are somehow getting changed… shrinking the .JPG with what seems to be arbitrary proportions. If you are familiar with the Kirupa Slideshow tutorial, the JPG images are being loaded into the MC instance ‘picture’, which is masked to a rectangular shape layer. I am not setting any dimension or placement properties dynamically.
I have loaded JPGs into holders this way many times and have never encountered a scaling problem… I guess this is a kind of “old-school” way of loading .jpgs, but i am not confident about creating an empty MC, passing the XML path and loading the .JPG (of all different dimensions, this will ultimately be a CMS app)
Any hints, suggestions or information would be much appreciated. Thanks a lot everybody!
// Begin AS
var xmlReceivePath = (“xml_mapinfo3.xml”);
/////////////////////////////////////
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
ownerRec = [];
interestRec = [];
townRec = [];
establishedRec = [];
acreageRec = [];
shorelineRec = [];
thumbnailRec = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
ownerRec* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
interestRec* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
townRec* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
establishedRec* = xmlNode.childNodes*.childNodes[3].firstChild.nodeValue;
acreageRec* = xmlNode.childNodes*.childNodes[4].firstChild.nodeValue;
shorelineRec* = xmlNode.childNodes*.childNodes[5].firstChild.nodeValue;
thumbnailRec* = xmlNode.childNodes*.childNodes[6].firstChild.nodeValue;
}
} else {
content = “file not loaded!”;
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(this.xmlReceivePath);
/////////////////////////////////////
stop();
var receiver:LocalConnection = new LocalConnection();
_root.onEnterFrame = function() {
receiver.doAction = function(loaded:Boolean, locationVal:Number, OwnerRecVal:String, InterestRecVal:String, TownRecVal:String, EstablishedRecVal:String, AcreageRecVal:String, ShorelineRecVal:String, ThumbnailRecVal:String) {
delete _root.onEnterFrame;
if (loaded) {
result_txt.text = OwnerRecVal;
owner_txt.text = OwnerRecVal;
interest_txt.text = InterestRecVal;
town_txt.text = TownRecVal;
established_txt.text = EstablishedRecVal;
acreage_txt.text = AcreageRecVal;
shoreline_txt.text = ShorelineRecVal;
picture.loadMovie (ThumbnailRecVal, “GET”);
purchasedLbl_txt.text = “PURCHASED:”;
acreageLbl_txt.text = “ACREAGE:”;
shorelineLbl_txt.text = “SHORELINE:”;
_root.gotoAndPlay(2);
}
};
receiver.connect(“parentConnection”);
};