Solved

Flash - opening URL's when viewing locally

Posted on 2009-05-05
4
161 Views
Last Modified: 2013-11-11
I have a flash site that requires to be viewed locally but it has popup javascript window functions on the buttons, the problem is these do not work when viewed locally. Is there anything that can be done about this? I need the popup new window facility to function when viewing offline... oh Flash is published as v.9, but it can be v.8, nothing lower though as I require the filters.

Example of the Javascript i have on the button can be viewed below. The desc.link variable is just the name of the page to be pulled in.
getURL("javascript:openNewWindow('pages/" + desc.link +"','thewin','height=900,width=1100,toolbar=no,scrollbars=yes') ");
 

//Or a static URL would be as follows...
 

getURL("javascript:openNewWindow('pages/example.html"','thewin','height=900,width=1100,toolbar=no,scrollbars=yes') ");

Open in new window

0
Comment
Question by:josh3man
  • 2
4 Comments
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 24303107
Please correct me if I'm wrong, but I think this might not have anything to do with Flex/Falsh.
I know that some Browsers as the IE run in different modes when accessing "local files"/"remote files"/"https files". I think when you open a HTML-File locally, you can't send data (A get-http-request can contain data) to the net. I think this was done to prevent a lot of CrossSiteScripting attacks. I remember that the only way to send data to the net, when opening a local file, was to exploit an error in Adobes Accrobat which didn't have this restriction in it's own JavaScript Enginge by adding a hidden PDF with JavaScript proxy-code ... I think they wouldn't have gone through the trouble if there was a direct way.
0
 

Author Comment

by:josh3man
ID: 24303142
The web pages i require to open are also local so it doesn't need to access online data, but as you mention with Flash 8+ i think the facility to open browser windows locally is restricted???? I can actually use getURL normally but i want to use the javascript method for various reasons, but im not sure if this is possible?

thanks

Josh
0
 
LVL 20

Accepted Solution

by:
ChristoferDutz earned 75 total points
ID: 24303544
Well in order to controll the Security settings of the Flash player Sandbox, there is an option to add a special policy file to the server you are trying to access.
http://kb2.adobe.com/cps/166/tn_16629.html

I have also found this interesting document ... It's in german though ... maybe you can read it ;-)
http://www.adobe.com/de/devnet/flash/articles/fplayer8_security_07.html
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now