PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
php vars & attachmovie, help!!
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: php vars & attachmovie, help!!

  1. #1
    Junior Member
    Join Date
    Jul 2003
    Posts
    6

    Angry 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!
    www.sammysstudio.co.uk

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    Shouldn't it be
    Actionscript Code:
    myData.onLoad = function(){
                ref["Petname"].htmlText = "<b>"+this["Name"]+"</b>"
                ref["BG"].htmlText = "<b>"+this["BG"]+"</b>"
                ref["Colour"].attachMovie(this["Colour"],"bg",0)
           
        }

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center