Error #2176 Actionscript
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Should I workaround Flex security error 2176 up vote -1 down vote favorite I got the following error: Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked upon user interaction, for example by a mouse click or button press. I found a similar thread here and the short explanation of the problem is: Adobe does this as a sort of security measure to ensure users are the ones messing with files rather than potentially harmful code However this thread doesn't answered my questions and that's why I am asking here: 1) Is there a good reason for me getting this error and is it really a security issue (and if so - maybe I shouldn't workaround it?). 2) What are the potential consequences if I do my workaround (I am asking because obviously Adobe decided that it shouldn't be workaround-ed) actionscript-3 security flex share|improve this question asked May 23 '14 at 11:31 s-rusev 85110 1 We don't have many clairvoyants over here, you'll have to show what you are doing to receive that error in the first place, and explain how you're planning to workaround it. –ndm May 23 '14 at 11:39 I will use the workaround with the two event listeners for the events MOUSE_DOWN and MOUSE_UP mentioned in the other thread. I am getting the error when I manually dispatch an MouseEvent.CLICK on a button that invokes action that goes trough the files. Maybe I wasn't clear enough - my concern is whether it is a good idea to workaround something that obviously isn't supposed to be workaround-ed and how this can do any harm. –s-rusev May 23 '14 at 12:02 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote accepted No, don't try to work around it. Flash isn't allowed to download arbitrary files to your hard drive for some very good reasons. Instead, just use FileReference.download(). The Adobe docs talk more about it. Then you can trigger the download on the user's click. share|improve this answer answered May 30 '14 at 6:30 Brian 2,8363930 add a comment| Your Answer draft saved dr
12, 2010 by Bogdan Manate The flash player 10 has new rules for UIA ( user initiated action ) so when I tried to use the FileReference save method I got the following error: Error: Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked upon user interaction, for example by a mouse click or button press. After I made some research I found a very cool article here, but I didn't found any workaround. Dispatching a MouseEvent http://stackoverflow.com/questions/23828089/should-i-workaround-flex-security-error-2176 won't work, because the user must interact with the application by clicking a mouse button or by pressing a keyboard key. I found a way to get rid of this error by displaying a popup and let the user to click a button in order to force the user to  interact with the application.
working with claimed his new image save feature worked.  I tried it, and it didn't.  This morning, another developer sings praise http://jessewarden.com/2008/10/flash-player-10-surprise-error-2176.html in an email chain, and I'm like huh?  I try again, and get the: Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked http://www.chw.net/foro/lenguajes-programacion/277233-actionscript-3-0-violacion-seguridad-sandbox-error-2176-a.html upon user interaction, for example by a mouse click or button press. Doh! The converted image received from the server would trigger a FileReference.download.  Adobe did make announcements with commentary, but the error #2176 unique nature of the change, and the fact that Flash Player 10 didn't have wide adoption when these announcements came out (still doesn't) made them pass through one ear and out the other.  They weren't relevant at the time because Flash Player 9 works, and you move on with life.  Not to mention the fact this is an event driven security error #2176 actionscript change, which makes it not so black and white. Fixing this in our Flex app isn't a big deal, it's just that some of our team is on FP9, including their development boxes.  The con is, we weren't planning on developing for Flash Player 10, but now we have to.  The pro is, we can now leverage FP10 features such as saving images locally vs. using a server to do it. Naturally I'm wracking my brain this morning trying to remember all the applications I've written that utilized FileReference.upload and download.  I'm pretty sure all were initiated by a mouse click.  I just feel bad for all the poor bastards who utilized ExternalInterface to do it on past client websites and are now screwed. Author JesterXLPosted on October 23, 2008October 23, 2008Categories Flex 17 thoughts on “Flash Player 10 Surprise: Error #2176” Mario says: October 23, 2008 at 11:41 am Ha! I feel sorry too for those poor boys complaining at the forums. Fortunately, being the smart ass I am, I've always used a mouse click to initiate FileReference. Jamie Scan
Software Lenguajes de Programación Actionscript 3.0 violacion de seguridad sandbox, Error 2176 Resultados 1 al 3 de 3 Tema: Actionscript 3.0 violacion de seguridad sandbox, Error 2176 LinkBack LinkBack URL About LinkBacks Herramientas Versión para imprimir Enviar por correo… Suscribirse a este tema… 08/10/2009 #1 waiflih Desarrollador Fecha de ingreso 27 Jul, 08 Ubicación Santiago Mensajes 575 Actionscript 3.0 violacion de seguridad sandbox, Error 2176 He estado varios dias tratando de solucionar esto: Código: *** Violaci�n de la seguridad Sandbox *** Se ha detenido la conexi�n con http://dominio.com/save.php?id=5 - no se permite desde http://dominio.com/archivo.swf Error #2176: Algunas acciones, como las que muestran ventanas emergentes, sólo se pueden invocar mediante interacción del usuario, por ejemplo, con un clic del ratón o una pulsación de teclas. Se supone q el swf envia datos con UrlLoader al archivo php, y probandolo desde el flash cs4 funciona bien, pero en el browser con el flash player 10 tira el error. Ese codigo de error me dice que la info no se puede mandar sin que haya interaccion del usuario en el callstack, pero a pesar de que todo se inicia con un evento en un boton igual no lo pesca... alguna recomendacion??? Código PHP: button1.addEventListener(MouseEvent.MOUSE_DOWN,mouseDownHandler);
functionmouseDownHandler(event:MouseEvent):void{
if(!iniciado)
{
varintervalo: