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

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)

Related

Actionscript 3.0 Hyperlink Issue

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.

Adding a interactive gui to my VB.net application

OK. So first, I will try my best to explain so good. My friend has gotten cursed out on this forum for not explaining, so I will explain. :)
Ok so I have my program built and all. But then it hit me! Wouldn't it be better to add a news feature? One teeny tiny problem? I cant? How would I implement a interactive code into an HTML page.
Like can i connect a button to a URL that will make the program do something. Almost like you can open cydia tweaks with there identifier and url EXAMPLE: http://handleopenurl.com/scheme/cydia And then i can add urls so i can update the program, without updating the files.
Or even just a featured news thing would be nice. But how would i implement this perfectly. I tryed a webrowser, but the page is too big for it. I am good at html, not much at css, i mostly use Adobe Muse http://www.adobe.com/Muse
Last question. Kinda defies the first thing i said about having my program finished.
Is there a way i can add a plus button and make it add more buttons and more labels and all?
This would help with allowing users to customize more then what the program can handle. By The Way, its a winter board Theme Maker. So I have a bunch of icons with there bundle identifiers and I create the folders with VB.net and all that stuff. But i want users to be able to click a plus button to add MORE text boxes and file browsers.
Any ideas? Maybe DIM 1 as NewFileBrowser? But i need to move all the buttons and i need it to be able to be clicked an infinity amount of times. I can do the coding for all of these buttons, but i jest need to know how to create them <1 Move them and the button so that the button goes further down each time, and more boxes will go further down. Much help apreciated. THANKS:)
EDIT:
Are you trying to say that you're wondering how to have a web browser control in a vb.net >app, which displays a web page, and when a button is clicked on the page, your app detects >it and does something? – Thraka
That sums up the top part. I am using windows forms, and it is coded in VB.net
If you get the object you want, like the button, you can hook the event and have it call code in your form.
Find the object using the Browser.Document.GetElementById method.
With that object, add an event handler to the Click event.
See http://msdn.microsoft.com/en-us/library/system.windows.forms.htmlelementeventhandler(v=vs.110).aspx for information about the event handler used

Links Not Doing Anything

I'm making a rather simple online store page at http://pyentertainment.com/store.html integrating PayPal for payments, and just when I thought I was done I noticed none of the hyperlinks seem to do anything. By this I mean when I click them (I'm using Chrome and the same happens on other browsers too), on the status bar where it normally says "loading www.xyz.com" it changes to something for a fraction of a second and then disappears, not loading a new page; it's way too fast for me to catch what it says.
This happens to the links on the nav bar and to the social media links on the right.
Some context: When you click on an item, the page dims and an iframe comes up showcasing said product, with PayPal cart buttons. View cart/Add to cart open a new tab, but if you close them by clicking "continue shopping" they throw another error which although I'm not too concerned about might be the cause of the problem; I know iframes can be iffy to work with.
I'd appreciate any help. The links work on the rest of the domain, too.
Thanks in advance!
I would suggest downloading firebug from here:
Firebug Home Page
And watching what loads while you're loading your page, it will tell you if the resource is actually being located/served when the page is processing. If it's not, you may want to review how you built your links toe ensure they're properly configured.
Thanks guys, the issue ended up being that I had the entire body to check for clicks, and if the user clicked outside the item display box while it was on, dim it out, like this:
$('body').click(function(event)
{
if(!$(event.target).is('#productDisplay'))
{
$("#darkenBackground").fadeOut();
$("#productDisplay").attr('src','buy/loading.html');
return false;
}
});
I got rid of that feature and instead added a little close button to do the same thing. The links work now! Thank you all for your help :)
i cant give a full answer but it looks like its your dimmer specificly the part that detects the body click. try putting it into an if statement to check that the functon has been called before running the body click function
EDIT
something like
if(product displayed) {
look for click event on body
}

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".

Open Window that has been put in tab or other options?

I'm hoping that someone may be able to help me out.
My Home page (Home.html) has a link to a mp3player located at (mp3.html)
On the mp3player page there is a link back to Home.html
If the user clicks on the link to the Mp3 player I would like for the music to continue to play even if the link to home.html is pressed.
What I would like to avoid is having multiple tabs from being opened if the user would re-click one of these links.
Also I would like to have the appropriate page to open when it's link is pressed instead of being locked in a tab and not displaying.
The mp3 player isn't affected by being refreshed.
I would prefer not to have different tabs open if at all possible.
This really got me stumped. I've tried different things out only to either be stuck choosing a tab or loosing the music from playing.
Thank you.
You can program your site with AJAX, so index page won't be reloaded but supplemented by content loaded be demand - Google Mail is a good example. Not a task for beginner, though.
You can use HTML frames (see examples) and load index and player at the same time in one tab. Very easy and may fit your needs, but makes your site harder to link to.
I'd go with the AJAX version as well, it's a nicer user experience. If there's a player somewhere in another tab, that's pretty annoying for the user to find if he wants to turn it off or change a track. Check out the Sixtyone and how they're solving the problem.