Not signed in (Sign In)

Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorkerwint
    • CommentTimeMar 15th 2007 edited
     
    hi,

    i was actually recommended to SWFObject by a forum mate from another forum but im not quite sure of how to go about doing what he told me... here's what he said:
    I recommend using swfOBject (http://blog.deconcept.com/swfobject/) to embed your swf, and you can also then use it to pass variables to your flash movie. There's a lot of documentation about using flashVars with swfObject, so do some reading and it should be pretty straightforward.


    For example, you could add a variable to your swfObject called "category". You could then link to the page with something like this:


    http://www.testingpage.com/index.html?category=services


    Then, in your swf, you can have something like this:




    ActionScript Code:

    if (category != undefined) {

    getURL(category + ".html", "containerFrame");

    }



    my reply to him was :
    hi,

    i have added the variable (not sure if it's the correct way to do it though) by :var category=deconcept.SWFObject; in the swfobject.js... was wondering where do i define the category section... (as in where do i define which page belongs to services, etc.)




    would really appreciate some help here to enlighten me on this.

    THANKS!
    • CommentAuthorkerwint
    • CommentTimeMar 17th 2007
     
    anyone?
    • CommentAuthorGeoff
    • CommentTimeMar 20th 2007
     
    if you want to pass the var category into the swf, you just have to do:

    so.addVariable("category", getQueryParamValue("category"));

    in your embed code. you don't need to change the swfobject.js ever.
    • CommentAuthorkerwint
    • CommentTimeMar 20th 2007
     
    hey thanks! but was just wondering, how do i define the different type of categories then?

    do i:

    so.addVariable("category", "services");

    so that i can input different kinds of categories?


    ??
    thanks!
    • CommentAuthorGeoff
    • CommentTimeMar 26th 2007
     
    sure you can put anything you want in there.
    • CommentAuthorkerwint
    • CommentTimeMar 28th 2007
     
    but is so.addVariable("category", "services"); the correct way to define it?

    thanks!
    • CommentAuthorGeoff
    • CommentTimeMar 28th 2007
     
    sure, that would set a variable called 'category' with a value of 'services' on your root timeline when your swf starts.