# Help: Regarding Custom Flash Layouts for Myspace

**URL:** <https://forum.kirupa.com/t/help-regarding-custom-flash-layouts-for-myspace/249999>\
**Category:** Uncategorized\
**Created:** [January 24, 2008, 12:12pm UTC](https://forum.kirupa.com/t/help-regarding-custom-flash-layouts-for-myspace/249999 "2008-01-24T12:12:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PDidee](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/pdidee/32/3438_2.png) [@PDidee](https://forum.kirupa.com/u/PDidee)\
**Post date:** [January 24, 2008, 12:12pm UTC](https://forum.kirupa.com/t/help-regarding-custom-flash-layouts-for-myspace/249999/1 "2008-01-24T12:12:18Z")

</div>

So I have a client who wants a custom flash layout for myspace. That part is easy enough but my limited knowledge of AS & XML is what I need help on. I’ve looked at this site [www.lovemyflash.com](http://www.lovemyflash.com), and how they seem to be able to call to the XML within the user’s profile on my space. From what I can see this is gathered first from the pre-loader that then loads the layout. The AS on the pre-loader is:

function loadXML(loaded)  
{  
if (loaded)  
{  
xmlNode = this.firstChild;  
id = xmlNode.childNodes[0].childNodes[0].nodeValue;  
fullname = unescape(xmlNode.childNodes[1].childNodes[0].nodeValue);  
address = xmlNode.childNodes[2].childNodes[0].nodeValue;  
profilephoto = xmlNode.childNodes[3].childNodes[0].nodeValue;  
headline = unescape(xmlNode.childNodes[4].childNodes[0].nodeValue);  
lastlogin = xmlNode.childNodes[5].childNodes[0].nodeValue;  
gender = xmlNode.childNodes[6].childNodes[0].nodeValue;  
age = xmlNode.childNodes[7].childNodes[0].nodeValue;  
town = unescape(xmlNode.childNodes[8].childNodes[0].nodeValue);  
country = unescape(xmlNode.childNodes[9].childNodes[0].nodeValue);  
interests = unescape(xmlNode.childNodes[10].childNodes[0].nodeValue);  
music = unescape(xmlNode.childNodes[11].childNodes[0].nodeValue);  
films = unescape(xmlNode.childNodes[12].childNodes[0].nodeValue);  
television = unescape(xmlNode.childNodes[13].childNodes[0].nodeValue);  
books = unescape(xmlNode.childNodes[14].childNodes[0].nodeValue);  
heroes = unescape(xmlNode.childNodes[15].childNodes[0].nodeValue);  
aboutme = unescape(xmlNode.childNodes[16].childNodes[0].nodeValue);  
whotomeet = unescape(xmlNode.childNodes[17].childNodes[0].nodeValue);  
mystatus = xmlNode.childNodes[18].childNodes[0].nodeValue;  
herefor = xmlNode.childNodes[19].childNodes[0].nodeValue;  
myorientation = xmlNode.childNodes[20].childNodes[0].nodeValue;  
hometown = unescape(xmlNode.childNodes[21].childNodes[0].nodeValue);  
bodytype = xmlNode.childNodes[22].childNodes[0].nodeValue;  
ethnicity = xmlNode.childNodes[23].childNodes[0].nodeValue;  
religion = xmlNode.childNodes[24].childNodes[0].nodeValue;  
zodiacsign = xmlNode.childNodes[25].childNodes[0].nodeValue;  
smokedrink = xmlNode.childNodes[26].childNodes[0].nodeValue;  
children = xmlNode.childNodes[27].childNodes[0].nodeValue;  
education = xmlNode.childNodes[28].childNodes[0].nodeValue;  
occupation = unescape(xmlNode.childNodes[29].childNodes[0].nodeValue);  
income = xmlNode.childNodes[30].childNodes[0].nodeValue;  
layout = xmlNode.childNodes[31].childNodes[0].nodeValue;  
isPhotobucket = xmlNode.childNodes[32].childNodes[0].nodeValue;  
isPrivate = xmlNode.childNodes[33].childNodes[0].nodeValue;  
layout\_title = xmlNode.childNodes[34].childNodes[0].nodeValue;  
if (isPrivate == 1)  
{  
privateMC.\_visible = true;  
}

```
    if (id == "undefined") 
    {
        id = "-";
    }

    if (fullname == "undefined") 
    {
        fullname = "-";
    }

    if (address == "undefined") 
    {
        address = "-";
    }

    if (headline == "undefined") 
    {
        headline = "-";
    }

    if (lastlogin == "undefined") 
    {
        lastlogin = "-";
    }

    if (gender == "undefined") 
    {
        gender = "-";
    }

    if (age == "undefined") 
    {
        age = "-";
    }

    if (town == "undefined") 
    {
        town = "-";
    }

    if (country == "undefined") 
    {
        country = "-";
    }

    if (interests == "undefined") 
    {
        interests = "-";
    }

    if (music == "undefined") 
    {
        music = "-";
    }

    if (films == "undefined") 
    {
        films = "-";
    }

    if (television == "undefined") 
    {
        television = "--";
    }

    if (books == "undefined") 
    {
        books = "";
    }

    if (heroes == "undefined") 
    {
        heroes = "-";
    }

    if (aboutme == "undefined") 
    {
        aboutme = "-";
    }

    if (whotomeet == "undefined") 
    {
        whotomeet = "-";
    }

    if (mystatus == "undefined") 
    {
        mystatus = "-";
    }

    if (herefor == "undefined") 
    {
        herefor = "-";
    }

    if (myorientation == "undefined") 
    {
        myorientation = "-";
    }

    if (hometown == "undefined") 
    {
        hometown = "-";
    }

    if (bodytype == "undefined") 
    {
        bodytype = "-";
    }

    if (ethnicity == "undefined") 
    {
        ethnicity = "-";
    }

    if (religion == "undefined") 
    {
        religion = "-";
    }

    if (zodiacsign == "undefined") 
    {
        zodiacsign = "-";
    }

    if (smokedrink == "undefined") 
    {
        smokedrink = "-";
    }

    if (children == "undefined") 
    {
        children = "-";
    }

    if (education == "undefined") 
    {
        education = "-";
    }

    if (occupation == "undefined") 
    {
        occupation = "-";
    }

    if (income == "undefined") 
    {
        income = "-";
    }

    if (isPhotobucket == 1) 
    {
        url = "";
    }
    else 
    {
        url = "http://www.lovemyflash.com/layouts/";
    }

    if (isPrivate == 0) 
    {
        loadMovie(url + layout, _root.layoutMC);
        var __reg4 = {publisherId: "p-cakSZvYqGmoRI", videoId: _root.layoutID, title: layout_title, videoUrl: url + layout, embedUrl: "http://www.myspace.com/" + _root.myurl};
        var __reg3 = new Quantcast(__reg4);
        __reg3.played();
    }

}

```

}

System.security.allowDomain(“[http://www.lovemyflash.com](http://www.lovemyflash.com)”, “[http://layouts1.lovemyflash.com](http://layouts1.lovemyflash.com)”, “[http://i219.photobucket.com/albums/cc146/lovemyflash2/](http://i219.photobucket.com/albums/cc146/lovemyflash2/)”);  
Stage.align = “TL”;  
Stage.scaleMode = “noScale”;  
\_quality = “BEST”;  
privateMC.\_visible = false;  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.contentType = “text/xml”;  
xmlData.onLoad = loadXML;  
xmlData.load(“[http://layouts1.lovemyflash.com/includes/getXML.php?myurl=](http://layouts1.lovemyflash.com/includes/getXML.php?myurl=)” + \_root.myurl + “&layoutID=” + \_root.layoutID + “&themeID=” + \_root.themeID + “&cacheKiller=” + (new Date()).getTime());  
onEnterFrame = function ()  
{  
LB = layoutMC.getBytesLoaded();  
TB = layoutMC.getBytesTotal();  
PC = LB / TB \* 100;  
loaderbar.setbar(PC);  
if (TB \> 4 && PC == 100)  
{  
delete onEnterFrame;  
gotoAndPlay(1);  
}

}  
;  
stop();

And this is the action script on the last frame of one of the layouts:  
function over()  
{  
this.gotoAndPlay(“over”);  
}

function out()  
{  
this.gotoAndPlay(“out”);  
}

loadMovie(\_root.profilephoto, \_root.layoutMC.mc\_profilephoto);  
\_root.layoutMC.mc\_profilephoto.\_y = \_root.layoutMC.mc\_profilephoto.height / 2;  
\_root.layoutMC.mc\_profilephoto.\_x = \_root.layoutMC.mc\_profilephoto.width / 2;  
sizeListener = new Object();  
sizeListener.onResize = function ()  
{  
\_root.layoutMC.mc\_profilephoto.\_y = \_root.layoutMC.mc\_profilephoto.height / 2;  
\_root.layoutMC.mc\_profilephoto.\_x = \_root.layoutMC.mc\_profilephoto.width / 2;  
}  
;  
loadMovie(\_root.UserPhotoOne, \_root.layoutMC.mc\_photoone);  
\_root.layoutMC.mc\_photoone.\_y = \_root.layoutMC.mc\_photoone.height / 2;  
\_root.layoutMC.mc\_photoone.\_x = \_root.layoutMC.mc\_photoone.width / 2;  
sizeListener = new Object();  
sizeListener.onResize = function ()  
{  
\_root.layoutMC.mc\_photoone.\_y = \_root.layoutMC.mc\_photoone.height / 2;  
\_root.layoutMC.mc\_photoone.\_x = \_root.layoutMC.mc\_photoone.width / 2;  
}  
;  
loadMovie(\_root.UserPhotoTwo, \_root.layoutMC.mc\_phototwo);  
\_root.layoutMC.mc\_phototwo.\_y = \_root.layoutMC.mc\_phototwo.height / 2;  
\_root.layoutMC.mc\_phototwo.\_x = \_root.layoutMC.mc\_phototwo.width / 2;  
sizeListener = new Object();  
sizeListener.onResize = function ()  
{  
\_root.layoutMC.mc\_phototwo.\_y = \_root.layoutMC.mc\_phototwo.height / 2;  
\_root.layoutMC.mc\_phototwo.\_x = \_root.layoutMC.mc\_phototwo.width / 2;  
}  
;  
loadMovie(\_root.UserPhotoThr, \_root.layoutMC.mc\_photothr);  
\_root.layoutMC.mc\_photothr.\_y = \_root.layoutMC.mc\_photothr.height / 2;  
\_root.layoutMC.mc\_photothr.\_x = \_root.layoutMC.mc\_photothr.width / 2;  
sizeListener = new Object();  
sizeListener.onResize = function ()  
{  
\_root.layoutMC.mc\_photothr.\_y = \_root.layoutMC.mc\_photothr.height / 2;  
\_root.layoutMC.mc\_photothr.\_x = \_root.layoutMC.mc\_photothr.width / 2;  
}  
;  
But1.onRollOver = over;  
But1.onRollOut = out;  
But2.onRollOver = over;  
But2.onRollOut = out;  
But3.onRollOver = over;  
But3.onRollOut = out;  
But4.onRollOver = over;  
But4.onRollOut = out;  
But5.onRollOver = over;  
But5.onRollOut = out;  
But6.onRollOver = over;  
But6.onRollOut = out;  
But7.onRollOver = over;  
But7.onRollOut = out;  
But8.onRollOver = over;  
But8.onRollOut = out;  
HoldNameMC.holdtxt.htmlText = \_root.aboutme;  
HoldNameMC.holdname.htmlText = “About Me”;  
But1.onRelease = function ()  
{  
HoldNameMC.holdtxt.htmlText = \_root.aboutme;  
HoldNameMC.holdname.htmlText = “About Me”;  
HoldNameMC.holdnum.htmlText = “01”;  
DataMaskMC.gotoAndPlay(1);  
}  
;  
But2.onRelease = function ()  
{  
HoldNameMC.holdtxt.htmlText = \_root.interests;  
HoldNameMC.holdname.htmlText = “General”;  
HoldNameMC.holdnum.htmlText = “02”;  
DataMaskMC.gotoAndPlay(1);  
}  
;  
But3.onRelease = function ()  
{  
HoldNameMC.holdtxt.htmlText = \_root.music;  
HoldNameMC.holdname.htmlText = “Music”;  
HoldNameMC.holdnum.htmlText = “03”;  
DataMaskMC.gotoAndPlay(1);  
}  
;  
But4.onRelease = function ()  
{  
HoldNameMC.holdtxt.htmlText = \_root.films;  
HoldNameMC.holdname.htmlText = “Films”;  
HoldNameMC.holdnum.htmlText = “04”;  
DataMaskMC.gotoAndPlay(1);  
}  
;  
But5.onRelease = function ()  
{  
HoldNameMC.holdtxt.htmlText = \_root.television;  
HoldNameMC.holdname.htmlText = “TV”;  
HoldNameMC.holdnum.htmlText = “07”;  
DataMaskMC.gotoAndPlay(1);  
}  
;  
But6.onRelease = function ()  
{  
HoldNameMC.holdtxt.htmlText = \_root.books;  
HoldNameMC.holdname.htmlText = “Books”;  
HoldNameMC.holdnum.htmlText = “05”;  
DataMaskMC.gotoAndPlay(1);  
}  
;  
But7.onRelease = function ()  
{  
HoldNameMC.holdtxt.htmlText = \_root.heroes;  
HoldNameMC.holdname.htmlText = “Heroes”;  
HoldNameMC.holdnum.htmlText = “06”;  
DataMaskMC.gotoAndPlay(1);  
}  
;  
But8.onRelease = function ()  
{  
HoldNameMC.holdtxt.htmlText = \_root.whotomeet;  
HoldNameMC.holdname.htmlText = “Who To Meet”;  
HoldNameMC.holdnum.htmlText = “07”;  
DataMaskMC.gotoAndPlay(1);  
}  
;  
FullNameText.autoSize = true;  
FullNameText.html = true;  
var format = new TextFormat();  
format.letterSpacing = -1;  
FullNameText.setTextFormat(format);  
GreenBarMC.\_x = FullNameText.\_x + FullNameText.\_width + 5;  
headlinetxt.html = true;  
headlinetxt.autoSize = “right”;  
var format = new TextFormat();  
format.letterSpacing = -1;  
headlinetxt.setTextFormat(format);  
OverBlackMC.\_x = 670 - headlinetxt.\_width;  
BaseMC;  
var color = new Color(“BaseMC”);  
color.setRGB(\_root.ColorVR1);  
stop();

Is there a way to modify this so can build and host my own layout on my FTP? But preforms the same functionality?

Thanks for any and all help.  
🍺
