Actionscript 3.0 Hyperlink Issue - actionscript-3

I have created buttons that are essentially just hyperlinks to twitch.tv they work perfectly fine when I am previewing the UI via ctrl+enter within flash but when I export them to a swf when I click them nothing seems to happen... I am not sure if this is because of something I am doing when exporting them? But here is the code I have used
twitch.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);
function fl_ClickToGoToWebPage(event:MouseEvent):void
{
navigateToURL(new URLRequest("http://www.twitch.tv"), "_self");
}
I have tried to global security settings panel with a tutorial I found but It wouldn't allow me to link my desktop through linking the location of files, please help!

Navigate Publish Settings in Flash and select the Access network only from Local playback security option Menu. As shown in the image below.

Related

Must I use ActiveXObject to open a powerpoint presentation in html

I have the following code snippet which simply opens a Powerpoint presentation and calls a VBA macro.
function CallVBA()
{
var App;
App = new ActiveXObject("PowerPoint.Application");
App.Visible = true;
App.Presentations.Open("D:\\Jonathan\\PPtHymns\\b.pptm");
App.Run("Doit");
}
While this works fine on Windows, it does not work on a Mac because of using ActiveX objects.
Is there another way of opening a Powerpoint presentation within a html page?
This may appear to be trivial, but I wish use code to add several new slides and text into the presentation and then run the presentation manually when done.
There appears to be no alternative at present.
As I wanted to build up slides from Excel spreadsheets, the only way to make this happen on both Mac and PC is to create a tab delimited file output from excel. Open the powerpoint app and use javascript/typescript in Script Lab.
So far this can not be done 100% as I can not see any javascript/typescript api's for inserting audio and text shapes and setting slide tansition properties. Perhaps I have missed them. Would someone please confirm?
Many thanks.

Pdfjs viewer with external file upload

I am loading the pdf.js viewer in my webpage in a div using the pdf.js API methods such as run and open.
In this page I also have a file upload section to attach related documents.
The issue is when I upload a document in the file upload section, using dropzone, the pdf viewer thinks I am uploading a document to it and changes the existing document. Is there a setting to turn this off? I thought there would be something in network.js but I haven't found anything promising yet.
Here is the offending part in PDFViewerApplication, it adds a global change event listener and changes the pdf if it's a file input with files selected.
Unfortunately there is no settings flag to disable this behaviour, no reference to the listener function to remove it, and also no way to cancel or change the event (it would also break other parts of the app), so you'll have to modify this code to remove it. Seems like the listener just dispatches a new internal fileinputchange event which is only used for this, so you only need to comment out this line.

Created a hyperlink on a button however it only work on the first click then stop working

I'm new to flash. I am using Adobe Flash Professional CS6. I have created a menu bar with a drop down menu and rollovers to change the colors.
I have put the the code (below) on the background and then given the button the instance name of 'navbarbtnhome'.
navbarbtnhome.onRelease = function() {
getURL("http://www.google.com", "_self");}
After i publish and open the HTML file the hyperlink will only work for the first click, after that I have to amend the code in some way and then publish and open it again, then the hyperlink will work another time until I repeat the process. Can anyone help, I'm totally lost for ideas now after trying for hours. my full menu bar is here if anyone wants to help.
Thanks.
It seems as though getURL doesn't work when testing your file locally, due to security sandbox restrictions. Assume that the links work, and upload it to your server and then test it -- hopefully it will work that way :)
Source: getURL not working on HTML export (Actionscript2.0)

Chrome app navigate htmls without creating windows

I'm creating a chrome packaged app, and I need to navigate my htmls without creating a lot of windows, like, if the user click one button, it opens the html in the same window the user are.
Is it even possible? If not, is there a way to make windows modal? So the user can't focus another window without closing the current?
Packaged apps intentionally do not support navigation. Apps are not in a browser, there is no concept of forward, back, or reload. Applications which do require the concept of navigation, or modal dialogs, should use a user interface framework that supports that functionality. In fundamentals, you can navigate by manipulating the DOM or by using CSS to animate and control visibility of components of your app.
The page you want to navigate to can be opened in a new window, then the previous page can be closed.
function navigateToLink (link) {
var current = chrome.app.window.current();
chrome.app.window.create(link);
current.close();
}

Flash not opening links on click

I created this banner with Flash and I need that on click it opens a web page.
I used this Actionscript 3.0 code...
link_btn.addEventListener(MouseEvent.CLICK, openurl);
function openurl(event:MouseEvent):void {
var url:URLRequest = new URLRequest("http://www.festivity.it");
navigateToURL(url, "_blank");
}
BUT it's not working!
WHYYYYY?!
I tried setting it on the timeline and also on a button, but nothing changed.
Whenever I click on the button... nothing happens, but sometimes a message opens with a security alert.
Thanks.
Chiara
Make sure your publish settings enable network access from "local playback security":
I have spent hours and hours working with the action code snippets. My head was practically bleeding, trying to figure out why my simple Go-To-URL action script wasn't working. I've been using a much older version of Flash for ten years. The "local playback security" setting was the problem, and it was not mentioned in any of the Adobe forums that I visited. What a frustrating "feature".