SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    619
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    add flashvars in AS2

    hi all

    I m passing variable/ file name in html/ php like this
    Code:
    <PARAM NAME=FlashVars VALUE="flashvars=all_that.mp3">
    I m NOT using playback component. so i cannot write
    Code:
    player.contentPath = flashvars
    I m creating custom player and want to use flashvars in AS2 in my file and call it dynamically in PHP.

    this is how i m calling the mp3 file

    Code:
    SD = new Sound();
    SD.loadSound("all_that.mp3", true);
    How can i ADD flashvars in actionscript.

    or is their anyother solution or alternative that i can use.


    vineet

  2. #2
    SitePoint Evangelist ferrari_chris's Avatar
    Join Date
    Mar 2008
    Location
    NP, New Zealand
    Posts
    576
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not 100% sure what you mean, but I'll give you two answers.

    If you mean how can you access your FlashVar in AS, then you would just use the name you have given it, "FlashVars", for the name of your MP3.

    So you code might look something like this:

    Code Actionscript:
    SD.loadSound(flashvars, true);

    Or, if you're asking how you can pass in more than one variable, you could try something like this:

    Code HTML4Strict:
    <PARAM NAME=FlashVars VALUE="flashvars=all_that.mp3&secondvar=two&thirdvar=three">

    Hope that helps you.


Bookmarks

Posting Permissions

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