How do I get a Skin working in SWFObject?

75 views
Skip to first unread message

David Zhu

unread,
Aug 9, 2011, 3:14:14 PM8/9/11
to swfo...@googlegroups.com
Hello,

I'm completely new to SWFobject, I've done basic flash before, but I pretty much know nothing.

I used Flash 8 to make a skin.

Now the question is, how do I get it to work in a webpage? I've tried this:

        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="640" height="360" id="flashVideo">
                    <param name="movie" value="VIDEO.swf" />
                    <param name="play" value="true" />
                    <param name="loop" value="true" />
                    <param name="menu" value="true" />
                    <param name="wmode" value="opaque" />
                    <param name="flashvars" value="skinName={{store direct_url=ClearOverPlayMute.swf'}}" />
                    <!--[if !IE]>-->
                    <object type="application/x-shockwave-flash" data="VIDEO.swf'}}" width="640" height="360" >
                    <param name="play" value="true" />
                    <param name="loop" value="true" />
                    <param name="menu" value="true" />
                    <param name="wmode" value="opaque" />
                    <param name="flashvars" value="skinName={{store direct_url='ClearOverPlayMute.swf'}}" />
                    <!--<![endif]-->

                        <a href="http://www.adobe.com/go/getflashplayer">
                            <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
                        </a>
                    <!--[if !IE]>-->

                    </object>
                    <!--<![endif]-->
                   
        </object>


Am I doing something wrong? The video shows, but the skin does not show.

However, if I open up the .swf directly in my browser, then the skin does work.

Any ideas? Thank you!

Aran Rhee

unread,
Aug 9, 2011, 6:03:08 PM8/9/11
to swfo...@googlegroups.com
Well, the passing of the flashvars doesn't look quite correct:

Usually flashvars are passed as name/value pairs like so:

<param name="flashvars" value="foo=bar&amp;somename=somevar" />

Your flashvars have:
- a space in them (flash variables cannot have spaces)
- been wrapped in two object notiation curly brackets

Basically, how is your swf expecting the variables on the root timeline (as that is waht flashvars end up as) ?


*** note - if you view the swf directly in the browser and you see the skin, then it is not using flashvars anyhow - It means that it is loading the skin based on a value set inside the swf. What code do you have inside your swf to load the skin? ***


Cheers,
Aran




--
You received this message because you are subscribed to the Google Groups "SWFObject" group.
To view this discussion on the web visit https://groups.google.com/d/msg/swfobject/-/Au-AibSKzsEJ.
To post to this group, send email to swfo...@googlegroups.com.
To unsubscribe from this group, send email to swfobject+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/swfobject?hl=en.

David Zhu

unread,
Aug 9, 2011, 6:37:22 PM8/9/11
to swfo...@googlegroups.com
Thank you Aran for the reply

Oh, so flashvars is not needed in my case?

What I did was import a .flv video into Flash 8. I picked the default option for importing. It prompted me to pick a skin, so I did. Then I exported, and it the skins shows fine if only the .swf is loaded in the browser. However, it does not work with swfobject embedded in a webpage.

I didn't write additional code. I just clicked away :)

Do you have any idea why this is happening? Normally, how would I make a skin like mine show?

It's interesting too, because I set in Flash to autorewind true, and autostart true, however, even if I open the swf by itself, it just ends and never goes back.

I appreciate your help so far, thank you!


Sam Sherlock

unread,
Aug 9, 2011, 6:43:11 PM8/9/11
to swfo...@googlegroups.com

Some video skins require addiyional files to be uploaded for it to work.

If you view the page with something that shows urls requested you may get all the info you need.

Firefox firebug for example.

- S

> --
> You received this message because you are subscribed to the Google Groups "SWFObject" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/swfobject/-/J0U3TcBtGbgJ.

Aran Rhee

unread,
Aug 9, 2011, 6:46:06 PM8/9/11
to swfo...@googlegroups.com
Hi David

Flashvars are used to pass information "from the outside" to your swf. They are only required if you want the behavior of the swf to change in some way based on the values of the variables passed.

Generally if you just used the Flash wizard to choose a skin etc, then as Sam said, you jsut need to place this skin .swf in the same folder as your main swf.

Do you have a link to your page showing the behavior? (this is the easiest way people can help)

Cheers,
Aran

--
You received this message because you are subscribed to the Google Groups "SWFObject" group.
To view this discussion on the web visit https://groups.google.com/d/msg/swfobject/-/J0U3TcBtGbgJ.

David Zhu

unread,
Aug 10, 2011, 9:14:00 PM8/10/11
to swfo...@googlegroups.com
That's it!

Thanks so much, I forgot to check the Firebug requests tab

Turns out it was looking for the skin in my site root directory, not where I had it.

Thanks again Sam and Aran!

Sam Sherlock

unread,
Aug 10, 2011, 9:21:21 PM8/10/11
to swfo...@googlegroups.com
Cool, firebug is such a life saver in many cases
 - S




--
You received this message because you are subscribed to the Google Groups "SWFObject" group.
To view this discussion on the web visit https://groups.google.com/d/msg/swfobject/-/j8544gsym1gJ.
Reply all
Reply to author
Forward
0 new messages