php vars & attachmovie, help!!
Hi there i am new to Flash/action script and i am trying to create a avatar using flash from a sql database.
the php page is set up and the variables work, however i want to use attachmovie to show certain symbols depending on the database information.
php outputs this...
(Name=Augustus&Colour=Test&BG=bg4)
the problem i am having is i cant get attachmovie to work. the symbol is set up in the library and i have used linkage to get the id, but it dosnt work.
i know the php is working as the top two lines which use htmltext show the correct information. its just the attach movie i cannot get to work.
please help!
here is the action script:
PHP Code:
myData = new LoadVars()
myData.load("petavatar.php")
myData.ref = this
//Fetch data
myData.onLoad = function(){
this.ref["Petname"].htmlText = "<b>"+this["Name"]+"</b>"
this.ref["BG"].htmlText = "<b>"+this["BG"]+"</b>"
this.ref["Colour"].attachMovie(this["Colour"],"bg",0)
}
that it SHOULD do is load a symbol with the id "Test" (which is the variable int he php code.)
this has bugged me for hours now so i any help would be so so brilliant!