It is because you are not specifying the embedSWF() params in the correct
order (you missed the expressinstall param, so the rest of the params are
out by 1!

swfobject.embedSWF(swfUrl, id, width, height, version, expressInstallSwfurl,
flashvars, params, attributes, callbackFn)

has five required and five optional arguments:

- swfUrl (String, required) specifies the URL of your SWF
- id (String, required) specifies the id of the HTML element (containing
your alternative content) you would like to have - replaced by your Flash
content
- width (String, required) specifies the width of your SWF
- height (String, required) specifies the height of your SWF
- version (String, required) specifies the Flash player version your SWF is
published for (format is: "major.minor.release" or "major")
- expressInstallSwfurl (String, optional) specifies the URL of your express
install SWF and activates Adobe express install. Please note that express
install will only fire once (the first time that it is invoked), that it is
only supported by Flash Player 6.0.65 or higher on Win or Mac platforms, and
that it requires a minimal SWF size of 310x137px.
- flashvars (Object, optional) specifies your flashvars with name:value
pairs
- params (Object, optional) specifies your nested object element params with
name:value pairs
- attributes (Object, optional) specifies your object's attributes with
name:value pairs
- callbackFn (JavaScript? function, optional) can be used to define a
callback function that is called on both success or failure of embedding a
SWF file (see API documentation)



You want the below (I have passed false to not use expressinstall, but if
you wanted to use express install, then you pass the path to
expressinstall.swf)

 swfobject.embedSWF("<?php
bloginfo('stylesheet_directory');?>/welcome/cv_welcome_final.swf",
"welcome", "560", "560", "9.0.0", false, flashvars, params, attributes);


I suggest you use the swfobject code generator (find on the wiki) to help
you generate valid code.

Cheers,
Aran


On Thu, Sep 16, 2010 at 5:14 AM, ekse <[email protected]> wrote:

> Hello I am using a swf to show a welcome screen to a website. The swf
> files shows fade in and fade out boxes in a time frame of 30 seconds
> or so.
>
> In Flash, I used actionscript to redirect users to the home page if
> clicked on any object during the animation with this script:
>
> ///////////////////////////////
> movieClip_1.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
>
> function fl_MouseClickHandler(event:MouseEvent):void
> {
>         this.mouseEnabled = true;
>         this.buttonMode = true;
>
>         addEventListener(MouseEvent.CLICK , mouseClickHandler );
>
>         function mouseClickHandler(event:MouseEvent):void
>        {
>                navigateToURL( new URLRequest("
> http://www.coralville.com.mv/
> home"),'_self');
>        }
>
> }
> //////////////////////////////
>
> at first I embedded the flash normally without the SWFObject library.
> And the clicks on any of the objects redirected to the specified url
> set on each of the object with AS 3.
>
> I was then told that the best way of embedding flash was to use
> SWFObject 2. And so I did.
>
> I am now having trouble with scripts being enabled. Clicks are not
> working, and the animation is not redirecting when the time ends. I
> did this also in Actioscript to redirect on the last frame. Instead,
> it now keeps on looping.
>
> I have used the params array to set the "allowscriptaccess" to
> "always". My code looks like this:
>
> the following script is placed in the header of my html file.
> //////////////////////////////////////////////
>                <script type="text/javascript">
>                        var flashvars = {};
>
>                        var params = {};
>                                params.allowscriptaccess = "always";
>
>                        var attributes = {};
>                        attributes.id = "welcome";
>
>                        swfobject.embedSWF("<?php
> bloginfo('stylesheet_directory');?>/
> welcome/cv_welcome_final.swf", "welcome", "560", "560",
> "9.0.0",flashvars, params, attributes);
>                </script>
> ///////////////////////////////////////////////
>
> and here is the body.
> ///////////////////////////////////////////////////
> <table id="display" width="100%" height="100%" cellspacing="0"
> cellpadding="0">
>  <tr>
>    <td align="center" valign="middle" >
>    <div id="welcome">
>        <h1>Alternative content</h1>
>        <p><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></p>
>    </div>
>    <p align="center"><a href="http://localhost/projects/coralville/?
> page_id=426">Skip intro</a></p></td>
>
>    </td>
>  </tr>
> </table>
> //////////////////////////////////////////////
>
> I am probably asking a dumb question. I am very new to use of flash.
> And I need to learn a lot of javascript too. But would love any help I
> can get here right now. My boss is kinda unhappy with me these couple
> of days, as I keep asking him about issues with Javascript.
>
> Please help!
>
> --
> You received this message because you are subscribed to the Google Groups
> "SWFObject" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<swfobject%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/swfobject?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en.

Reply via email to