The OpenURLs object does not seem to be supported in the .swf export option. I am needing to open a web page when the user clicks my sponsors "more games" button or my logo.
Is there a workaround?
Jason
Printable View
The OpenURLs object does not seem to be supported in the .swf export option. I am needing to open a web page when the user clicks my sponsors "more games" button or my logo.
Is there a workaround?
Jason
I should have experimented a little more before I posted the question in the forums.
I found a simple workaround. I inserted the Flash Player Object in the frame, created a click event for the buttons ("More Games" and my logo) in the frame and then selected -- Open URL "TARGET URL" in new window -- on the event editor for the click event of the buttons in question. I substituted the url I wanted to navigate to in place of TARGET URL between the quotes.
This allows me to open a browser to a web page.
This explanation should be simple enough to explain how to use the workaround but if anyone wants me to upload an example let me know and I will be happy to.
Jason
YOu mean that instead of setting target option like blank or self you set the url?
I set the target to the url (web page) I wanted the web browser to open to.
Jason
Still if you use _blank in target it would also work but _self is not accepted and target windows are blocked by my Firefox browser as popup windows where _target command from links works perfectly.
I did not use _blank, _self or _target. I used "http://www.bluefiregames.com" and it works for me in Firefox (mine is also set to block popup windows).
Perhaps I should have targeted "http://www.bluefiregames.com_blank" instead of leaving _blank off.
Jason
Sorry I didn't understand properly, Are you saying that, by putting the URL in the target field, firefox won't block it??
I don't get it, too. It doesn't help against being blocked by FF. What's it's advantage?
For the button clicked action I used the following action:
open url "http://www.asahnekec.com" in a new window
You can download a very simple example I created at:
http://www.asahnekec.com/Open_URL_Example.mfa
I use Firefox and it is not blocking me being able to navigate to the target url from the application. Maybe you have your Firefox set on a different setting then me.
Jason
Is there any way to upload that example as an attachment to this thread?
Jason
Still it's blocking it as a popup from the Flash file.
My web browser (Firefox) did not block it. Maybe it's the settings I have my Firefox on.
Does anyone else's web browser allow this to work or are yours also blocking it?
Jason
To make sure that it is (not) working, you can reset your popup exceptions list in the Firefox options.
Olivier, I know that when I will turn off the block popup windows it will open them in new Tab.
But my point here is that, using _blank target in pure HTML allows me to open a new Tab, and all flash files allows me to go to their websites despite of fact of my popup blocker - but still with exception of MMF ones.
Yes Fanotherpg. And I already told you that this issue will be solved in the next Flash update:
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=188645#Post1886 45
For the moment I believe that there is no workaround, except maybe an external solution like using javascript.
I created another little test. The test is simply three buttons with each button attempting to open a browser page to the targeted web site. You can find this test at:
http://www.asahnekec.com/test1.html
I have tested it on two separate computers (the once that I have MMF2 installed on and created the test with and another that does not have MMF2 installed and was not used in the creation of the test. On both computers I get the exact same results.
Clicking option 1 or option 2 will open a new tab in the browser which navigates to the target web page. Option 3 results in the browser blocking the attempt to navigate to that web site as a popup window.
Would someone test this and see if they are also getting the same results?
If anyone wants to see the .mfa file used for this test you can download it at:
http://www.asahnekec.com/test1.mfa
Jason
Options 1 and 2 both open in the same browser window. I have tabs disabled. It goes from the test1.htm to the clickteam page.
Option 3 opens in a new window for me, which suprises me because if I build your app myself it gets blocked. :confused:
I got the exact same result on 3 different machines with 4 different browsers Firefox 3.6.3, IE6, IE7 and IE8:
- Option1 and Option2 opened in the current window
- Option3 opened in a new window (only Firefox blocks the popup)
I tested it on FF 3.6.3, IE8 and Chrome 5.
First 2 open in the same window third one WORKS FOR ALL the same and open in a new tab - I will test the MFA and try to build it by myself.
Still I tested it locally and the current and top window are not working but...
The freaking new window was workind for Chrome,IE and FIREFOX! I love ya Jason, thanks for your help with solving this issue!
IE8:
1 and 2 open in the same window/tab, 3 in a new window, even with active popup blocker.
FF3.6.3
works the same, but 3 doesn't do anything while popup blocker is active.
Like for me 3 is opening for firefox with acrive popup blocker.
Thanks for the info guys. I was looking for a way to open a URL when the user clicks on a link in the swf created files and this fits perfectly. :D
Chaps,
Looks like Jason's example isn't available any more. Can someone reupload it?
Thanks,
Steve
Sorry. I forgot all about the example I was hosting there when I removed the web site. I have attached an MMF2 document to this post as an example of different ways to open a browser from inside a program using MMF2. Download the file and open it with MMF2. The example is simple and anyone should be able to easily figure it out by looking at the events. If you have any questions please feel free to ask.
Jason