A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: setMedia not accepting loadVariables

  1. #1
    Member
    Join Date
    Feb 2004
    Posts
    45

    setMedia not accepting loadVariables

    I do a loadVariables into my frame and to make sure it is working (variables pulled form txt file) I have a couple dynamic text boxes showing the variables.

    It is working.

    loadVariables("file location", this)

    I try to put one of the variables into my setMedia like so:

    fplayer.setMedia(fileurl, "FLV", true);

    I know fileurl has a url in it, as a dynamic text box is showing me it. For some reason the setMedia does not show anything. When I copy and paste the file URL into the setMedia property, the video player works.

    Why is it not accepting the variable?

    Thanks
    Ryan
    Again, thanks for all the help I recieve

  2. #2
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    loadVariables is depercated and you should use loadVars instead
    ~calmchess~

  3. #3
    Member
    Join Date
    Feb 2004
    Posts
    45
    tried loadVars instead of loadVariables, got an error while publishing and then none of the variables showed in the dynamic txt.

    Ryan
    Again, thanks for all the help I recieve

  4. #4
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    well lets see the code ...are you loading the variables in the ondata event?
    ~calmchess~

  5. #5
    Member
    Join Date
    Feb 2004
    Posts
    45
    here you go

    Code:
    var vidid = _root.tid;
    this.LoadVars.load("http://www.site.com/fvar.php?tid="+ vidid +"");
    loadMovie("http://www.traileraddict.com/content/disney/daninreallife.jpg", "mcover");
    var afile = fileurl;
    fplayer.setMedia(fileurl, "FLV", true);
    fplayer.totalTime = duration;
    Thanks
    Ryan

    *I don't get the LoadVars error anymore, I forgot to cap the L
    Again, thanks for all the help I recieve

  6. #6
    Member
    Join Date
    Feb 2004
    Posts
    45
    wait, I think I got it now
    Again, thanks for all the help I recieve

  7. #7
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    you need to google loadVars thats not enough code or you can search this forum for loadVars there are a ton of posts on the subject
    ~calmchess~

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