Actionscript 3 :: ExternalInterface / NavigateToUrl Popups Blocked When Called From SetTimeout?
Sep 19, 2010
The Symptoms: pop ups intermittently blocked/let through from external interface and navigateToURL combinations.The Problem: Flash (or the browser..not sure) wont let pop ups be triggered outside of a time range and/or an event duration.The Environment: I have an app that needs to send data via zendAMF, do some processing and be sent back to the flash player. On the response, if certain conditions are met true - then trigger a pop open window. The same code that gets blocked on response, works directly from a mouse event trigger.So i set up a basic situation: 6 buttons, calling 3 methods. 3 buttons would call the method directly (all open the window perfectly) the other three would get the value of a numeric stepper, and use setTimeout(openWinMethod, NumericStepper.value) to simulate a delayed call from the zendAMF response.
UPDATE : if i select the 'navigateToURL, no delay' button first, close that window, then try any of the other delay calls - they work. its like the browser accepts that you have clicked to open a window at some point and therefore are allowed to call from a delay then on. (firefox only)All three using the delay would be blocked (firefox and chrome) whereas all three directly would open.afari - as well documented, would only work on the 2 methods using navigateToURLf interest: the js function in the html wrapper would be called be external interface to open a window. Without a delay this worked. With a delay, the js function would be called (as verified by some alert statements) but a new window was never spawned./popup/
here is my as3 class:
package
{
[code].....
View 1 Replies
Similar Posts:
Dec 8, 2008
I am using AS2.0 and SWFObject to integrate an audio player into a website. I have built a button that launches the player into a seperate window so that people can surf the site and listen to the music simultaneously. There is only one problem!! In IE the window is being block by the browser's inbuilt popup blocker. I have tested other sites that feature similar functionality and popups are not blocked!?
Has anyone experienced this issue before and do you have a workaround?
Site I am referring to = [URL] An example where popups are not blcoked = [URL]
View 3 Replies
Jul 14, 2008
I'm fairly new to actionscript. I have created a flash banner ad that is now hosted on a site. Whenever somebody clicks the banner IE responds witha a "pop-up blocked"!
The code that handles this is:
ActionScript Code:
clicky.addEventListener(MouseEvent.CLICK, gotourl);
function gotourl(e:MouseEvent):void {
if (root.loaderInfo.parameters.clickTAG.substr(0,5)=="http:") {
navigateToURL(new URLRequest(root.loaderInfo.parameters.clickTAG),"_blank");
}}
Where "clicky" is a SimpleButton that covers the entire flash. clickTAG is passed as an argument as to where to navigate. If I allow pop-ups everything works as it should! Howvere disabling pop-ups shouldnt be needed - and i see that other flash ads on the site works without and pop-up warning.
View 9 Replies
Apr 25, 2011
Assuming that I want to open some html file placed on server with the use of navigateToURL: navigateToURL(new URLRequest("MyDirectory_1/MyDirectory_2/index.html"), "_blank"); Html opened in this way makes browser treat it as a pop-up window. As a result the html is blocked by browser.
View 2 Replies
Jul 15, 2009
Clicking the button sends the text to a backend server where it does a profanity filter.I'm using an event listener to get a response from the back end. If there is no profanity, the swf does a navigateToURL.Unfornetly the url request is blocked by many browsers.When I skip the profanity filter and the navigateToURL is fired in the MouseEvent function then it doesn't get blocked
View 9 Replies
Dec 3, 2008
I am using setTimeout() to call a function called "finished" after a 1000ms pause, which works absolutely fine until I try to pass a variable with it.
[Code]....
View 1 Replies
Apr 12, 2010
I want to load an external swf called 'signs.swf' into an empty mc called 'signholder'.
var loadit2 = new Loader();
loadit2.load(new URLRequest("signs.swf"));
signholder.addChild(loadit2);
Everything works. Cool. But, I now want to target something within the signs.swf. How do I do it though? What is the path? Do I have to give the child of signholder an instance name? Everything I try fails.
If I wanted the root timeline of the external swf to gotoAndPlay(2) for example,...would i say...
signholder.loadit2.gotoAndPlay(2) ???
var wow:MovieClip = loadit2.content as MovieClip;
wow.gotoAndPlay(2) ????
View 3 Replies
Jul 8, 2010
what is the setTimeout function in Flex 4?I tried the old methods like setTimeout () or setInterval but not working, not found any web references as well, anyone know?
View 1 Replies
May 16, 2011
I am trying to open lotus notes application from Flash CS5 using navigateToURL.
When I click button, the application opens along with a blank window. So I used setTimeout to close the blank window. But the below script works fine with firefox but not with IE. The blank window not closing in IE.
the button action is:
var js:URLRequest=new URLRequest();
js.url="javascript:newWindow=window.open('http:
//servername/mroom.nsf/agtReserveRoom?OpenAgent&Location=roomname','poppe
[Code].....
View 1 Replies
Oct 30, 2007
I am having issues with startDrag(). I have a movie clip called circle. Inside circle, I have a movie clip called circleFill and another called circleOutline.onEnterFrame, this movieClip is duplicated 4 times.
When I use this:
private function onPressNow(event:MouseEvent):void
{
startDrag();
}
IT DRAGS ALL 4 MOVIECLIPS.
[Code]...
how can I make it drag my movieClip called circle? (meaning both circleFill and outlineFill)
View 8 Replies
Oct 24, 2011
i have a box called infoBox that contains a text field called caption. infoBox expands on mouse-over. When it does so, I do not want the text in caption to scale up - I want it to stay at 11 pt. So far my code to prevent this from happening is not working:How do I fix this?[URL]..
View 2 Replies
Jun 16, 2009
I'm setting up a Timeout/Interval in a function but the called function gets invoked only once (so mc._alpha = 1 in the end)! I've tried setting the timer variable as toplevel but that didn't help either.
Here's the code:
Code:
function colortrans(mc, newcol) {
_root.attachMovie("box", mcdup, 2);
colorchange = new Color(mc);
[code]....
View 3 Replies
Feb 3, 2010
I use the setTimeout() function through my application but when its time to garbage collect. the method still runs and calls on a function. How do I stop it from calling on a certain function. I tried setting it to null but it doesnt work
View 4 Replies
Nov 8, 2011
var clearId:int = setTimeout(function():void{
//some code here
clearTimeout(clearId);
[code].....
View 2 Replies
Nov 19, 2010
tried to prepare this source so that it is organized and clear enough to figure out what I (an idiot when it comes to scripting/programming) have done so farI have a slideshow with a function ("wait();"), which uses setTimeout to move the main timeline to the next frame (via nextFrame) after 4seconds(4000ms) have passed. The only exception to this, is on the last frame (Frame 7), where the timeline is to move back to frame 2. This is done using a simple conditional statement.. and all is well so far. Pretty simple.
The problem lies in that I have a set of 6 buttons across the bottom - each corresponding to one of the 6 'slides' that I'm sliding through. Right now, the code on these buttons uses gotoAndPlay, and jumping around from frame to frame in this way screws up the timer.As you click the buttons, the timer is still ticking.. and you start to see multiple advances, I assume each click of the buttons starts a new 'clock'.. each forcing a "nextFrame" as soon as their done, despite the other timers going on.What I need - is for the buttons to send the timeline to the appropriate frame, and turn ALL timers off. That is - if a user clicks a button, they have indicated which slide they want to see - and I want to stop the slideshow entirely. As soon as a user clicks any button, the only way they will see the other 5 slides if they also click those buttons.So the slideshow is built as follows:Frame 1: a basic preloader, followed by this code:
Code:
//setTimeout code
function wait()
[code].....
View 3 Replies
Feb 4, 2009
I am trying to get a handle on the setTimeout command and I can't seem to get it to function at all. As a test I set up a simple movie where two objects fade in, one after the other. But whatever I try, they both fade in together.
Code:
_global.setTimeout()
stop();
onLoad = function(){
box1_mc._alpha = 0;
box2_mc._alpha = 0;
[Code] .....
View 3 Replies
Dec 8, 2011
I have a mouse over event that triggers a setTimeout event. I'd like to clear that event from happening if the user rollOuts of the button. I basically need to figure out how to clear my setTimeout event.
Code:
bButton.onRollOver = function()
{
_root.countdown._visible = true;[code].....
View 2 Replies
Sep 15, 2011
I have an old Macromedia program - Authorware, that doe not like the SWF file output from the new CS Flash. I am able to go back to the old Flash version to get output that works - only 4-5 versions back - MX2004 or maybe CS.
I need to create an equivalent using timeline controls?
I was thinking of using a onEnterFrame. Have it loop till frame cycles hit the time I need i.e. 24 fps x 2sec = 48 frame cycles. then I would advance the main play head.
View 10 Replies
Feb 4, 2009
I am trying to get a handle on the setTimeout command and I can't seem to get it to function at all. As a test I set up a simple movie where two objects fade in, one after the other. But whatever I try, they both fade in together.[code]
View 8 Replies
Oct 3, 2011
Suppose, I have a tabbed application. Can I make Popup window to appear in a given tab only? So, if I change a tab, the related popup(-s) hides. So far, I haven't found any solution for this.
View 1 Replies
Aug 16, 2009
I'm trying to load a .swf into a containerMC with a button action. I want it to delay the loadMovie action for 1 second to allow an out animation to finish playing. The buttons (next and back) are in a MC on the main timeline of the swf.
I have this code in 1st frame of main timeline:
_global.nextMC = function() {
_root.containerMC.loadMovie("images/folio/chevron.swf");
};
[Code].....
I feel like I'm close, but probably just am missing something here in my setTimeout syntax.
View 2 Replies
Jan 5, 2007
I am trying to write a function that calculates the estimated time remaining for the movie to load. I have a function written that gets that information and I run it again with a setTimeout for 1 second then take the difference... blah blah blah. My issue gets me before i can get that calculating goodness off the ground. The first time i run the function without the setTimeout it works correctly. When i use the setTimeout, it returns the boolean value "1" signifying that it ran and didn't fail. Somewhere in there it loses the value returned by the called function. Any thoughts? I'm sure this may not be the most efficient method for doing what I want, but it bugs me nonetheless why this isn't working.Here's my code:
Code:
function getDeltaBytesLoaded(target_mc) {
var sample1:Number = new Number();[code]......
View 2 Replies
Mar 17, 2009
I'm working on a project that requires a draggable map that has buttons that popup onrollover. Inside the popup will be a brief discription and and link that should carry you to another part of the move. Problem is, I don't know how to deal with the fact that buttons/rollover have become "inactive" because their in my draggable map. I am using startDrag for the map.
View 1 Replies
Oct 2, 2011
I have developed a set of flash games which are being used by several schools across the UK. For some odd reason, the school cannot seem to load the Flash games.
Upon contacting the ISP (SWGFL) - I was told that the network would automatically block flash games. This is all well and good BUT the school in question is able to load the following flash game[url].
I am currently using a PHP layer to communicate between Flash and a MySQL database. I was wondering if anyone knew any reasons as to why this might occur? Is there some kind of header() protocol I need to add to bypass this flash blocking?
View 1 Replies
Apr 17, 2011
I'm using this var timer2 = setTimeout(checkValue2, 2000);
as a frame action in Frame 2, which then triggers checkValue2 which is a piece of function in Frame 1 where all the _global. variables are as well.
clearTimeout(timer2);
gotoAndStop(3); //goto lvl3 - throw
addStage3();
it'd then goto Frame 3, but, the problem is even after clearing, the frame animation still loops every 2 seconds, regardless whether i'm using setTimeout or setInterval. Do you might know of any other way where what I need is, after 2 seconds in Frame 2, it'd then move to Frame 3, which I don't want it to go anywhere yet.
View 1 Replies
Feb 26, 2010
I need to create a Flash solution that will display popups on mouseover. My Flash skills are rusty but I have access to [URL]. identifying the mouseover technique that is probably being used in this Citibank Flash object.
[URL]
View 1 Replies
Mar 15, 2010
How can we remove all the popups existing in an application?
View 3 Replies
Jun 15, 2006
How you can add popup functionality to the gallery component at mr10.net.
View 1 Replies
Sep 3, 2007
I am a young designer working on my portfolio website [URL]. Each TV (apart from a broken one) has a pop-up window which loads a section of work. This works fine with firefox but sadly the pop-ups dont load in IE. The script I used to load the pop-up can be found at: [URL].
View 1 Replies
May 26, 2011
I've created a flash with an RSS feed inside it, I've seen it work on other websites but it won't work when I upload it to my server. I've tested it and had to authorize it on my local computer and it's all there, but flash seems to have blocked it when it's online, Here's my AS code, I'm using flash 8
Actionscript Code: [code].....
View 2 Replies