allowScriptAccess="always"

6,095 views
Skip to first unread message

ccrider

unread,
Jul 4, 2008, 12:14:28 PM7/4/08
to SWFObject
I had to get rid of SWFObject implementation on the one page where it
was working fine because in Safari on Mac (obviously), I ran into the
weird problem that the getURL actionscript in my Flash wasn't
executing. None of the buttons worked on onframe functions which used
getURL did not work either.

After some tooling around, I discovered that the problem can be solved
by adding parameters to your old-school object tag:

<param name="allowScriptAccess" value="always">

allowScriptAccess="always">

I thought for a moment about where to implement such parameters in the
SWFObject tag.
Can you add these to SWFObject?
I couldn't get it to work so I just went back to the old-school way
like you see here:

http://www.actionscript.org/forums/showpost.php3?p=753185&postcount=12

Aran Rhee

unread,
Jul 4, 2008, 11:29:55 PM7/4/08
to swfo...@googlegroups.com
Of course you can add it to swfobject :) The whole point is that you can
mark up and embed you flash files as if you were using the oldschool
object/embed.

You add it you your param object like any other required or optional param:

<script type="text/javascript">
var flashvars = {};
var params = {};
var attributes = {};

params.allowscriptaccess = "always";

swfobject.embedSWF("myContent.swf", "myContent", "300", "120",
"9.0.0","expressInstall.swf", flashvars, params, attributes);
</script>

Reading the documentation should help also... It describes all of this

Aran

Nate Snyder

unread,
Jul 5, 2008, 9:26:58 AM7/5/08
to swfo...@googlegroups.com
Ah, so  SWFObject means I have to learn javascript now, too. Sweeeet. I read the documentation before and it didn't help me do much except struggle with 4 days. Any help I got was from people on this group or on other message boards. The documentation assumes the user who is trying to figure out how to work this thing already knows several things and does not bother to mention them. So, sorry I did not check the documentation on this particular problem, but I did not want to waste another 4 days when I can just drop SWFObject and use old-school embed instead. Thank you for your answer and saving me a lot of time. It's going in my file. :)

Aran Rhee

unread,
Jul 5, 2008, 11:36:42 PM7/5/08
to swfo...@googlegroups.com

Nate.

 

Yeah, there is a learning curve and some assumed knowledge by the authors. The library is intended for use by web developers who feel comfortable (a least a bit anyhow) with javascript and what a DOM is.

 

I recommend beginners check out the code generator, as it will write 90% of the code you require for you:

http://www.swffix.org/swfobject/generator/

 

 

Aran

mat

unread,
Aug 13, 2008, 1:05:05 AM8/13/08
to SWFObject
First off - thanks very much for swfobject 2.0, it's great and saves a
lot of blood, sweat and tears. We've used it on the new Yahoo!7 front
page in Australia. http://au.yahoo.com/



I've had a problem with getting clickthroughs to work-

I have params.allowscriptaccess = "always";

but cannot make getURL calls work

this is when omitting the optional expressinstall parameter

the problem does not occur when expressinstall is being used.

any advice gratefully recieved.

mat



On Jul 6, 1:36 pm, "Aran Rhee" <aran.r...@gmail.com> wrote:
> Nate.
>
> Yeah, there is a learning curve and some assumed knowledge by the authors.
> The library is intended for use by web developers who feel comfortable (a
> least a bit anyhow) with javascript and what a DOM is.
>
> I recommend beginners check out the code generator, as it will write 90% of
> the code you require for you:http://www.swffix.org/swfobject/generator/
>
> Aran
>
> From: swfo...@googlegroups.com [mailto:swfo...@googlegroups.com] On
> Behalf Of Nate Snyder
> Sent: Saturday, 5 July 2008 11:27 PM
> To: swfo...@googlegroups.com
> Subject: Re: allowScriptAccess="always"
>
> Ah, so  SWFObject means I have to learn javascript now, too. Sweeeet. I read
> the documentation before and it didn't help me do much except struggle with
> 4 days. Any help I got was from people on this group or on other message
> boards. The documentation assumes the user who is trying to figure out how
> to work this thing already knows several things and does not bother to
> mention them. So, sorry I did not check the documentation on this particular
> problem, but I did not want to waste another 4 days when I can just drop
> SWFObject and use old-school embed instead. Thank you for your answer and
> saving me a lot of time. It's going in my file. :)
>
> <http://www.actionscript.org/forums/showpost.php3?p=753185&postcount=12>
> &postcount=12- Hide quoted text -
>
> - Show quoted text -

Aran Rhee

unread,
Aug 13, 2008, 6:37:06 AM8/13/08
to swfo...@googlegroups.com, SWFObject
Mat

Can you supply a code snippet? I just want to confirm that all the
params are being passed correctly.

1 with the working code, and 1 with the broken code.

Cheers,
Aran

Sent from my iPhone

Reply all
Reply to author
Forward
0 new messages