views:

473

answers:

2

I made a quick flash document for my friend who posted it his MySpace. The document has 3 buttons, each with a URL attached to them. When I play the SWF file locally, the links work fine, however once it's published to MySpace, the links refuse to work. The hand icon comes up so it understands them at least as buttons, but it seems to do nothing when clicked in the web-browser. Also, I can open the SWF in my browser and it also works fine.

I'm using Flash CS5 and working in ActionScript 3.0. The three buttons are on one layer called "Buttons". I right click the button and click "Actions". From there, I click the "Code Snippets" and under the folder "Actions" there is an item called "Click to Go To Webpage". Here is the code it gives you by default:

button_2.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_6);

function fl_ClickToGoToWebPage_6(event:MouseEvent):void

{

navigateToURL(new URLRequest("http://www.adobe.com"), "_blank");

}

I heard there was a problem with MySpace not allowing action scripts, and after checking the source code, the value is set to not allow action scripts. I don't think it's a browser issue, since it's working fine when I execute the SWF by itself, and when I load it into Firefox. It's just seems MySpace is having a problem with it. Any advice on how to work around this issue?

A: 

Been looking at several messageboards online and they all seem to be saying the same thing - MySpace blocks those sorts of ActionScript commands.

I can't seem to find an official "we don't allow this" on MySpace's Developer site...but I'm pretty sure they have disabled a lot of stuff like that by this point.

[EDIT] This thread seems to have a good discussion on it with a possible solution in the last comment...but just don't be shocked if MySpace, Facebook, etc. block certain Flash functionality in general... http://developer.myspace.com/Community/forums/p/232/45799.aspx

ScottCarmichael
Here is the parameter that is stopping my script.<param name="allowScriptAccess" value="never" />Either way, it's obvious it's not allowing action script in user uploads, so I was wondering if there was a work around.
NervXT
Out of curiosity I was looking for a solution or workaround for you and I can't find anything definitive either. http://wiki.developer.myspace.com/index.php?title=Example_Application:_Hello_World has a screenshot that shows 'External iFrame'...it may be possible to use this with your Flash file hosted on your own site to address your issue.
ScottCarmichael
+1  A: 

On the "allowScriptAccess" param, try changing the value to "always"... I had the same problem on a Ning network and this fixed it. The same fix used to work on MySpace but I know they are constantly upgrading their security measures. Good luck!

Matt McGlynn