# External Image as New Tab? \[Click to load an Image\]

**URL:** <https://forum.kirupa.com/t/external-image-as-new-tab-click-to-load-an-image/323221>\
**Category:** flash\
**Created:** [June 21, 2011, 4:53pm UTC](https://forum.kirupa.com/t/external-image-as-new-tab-click-to-load-an-image/323221 "2011-06-21T16:53:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Doushte](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@Doushte](https://forum.kirupa.com/u/Doushte)\
**Post date:** [June 21, 2011, 4:53pm UTC](https://forum.kirupa.com/t/external-image-as-new-tab-click-to-load-an-image/323221/1 "2011-06-21T16:53:42Z")

</div>

Hello all,  
I am really new to actionscript 3.0, so barely with me. I would like to set my buttons to load external images within a new tab of the browser as I also have the swf file loaded within a html file. I have tried “Click to Load/Unload SWF or Image”. Here’s my code:

> btn1.addEventListener(MouseEvent.CLICK, fl\_ClickToLoadUnloadSWF\_2);

var fl\_Loader\_2:Loader;  
var fl\_ToLoad\_2:Boolean = true;

function fl\_ClickToLoadUnloadSWF\_2(event:MouseEvent):void  
{  
if(fl\_ToLoad\_2)  
{  
fl\_Loader\_2 = new Loader();  
fl\_Loader\_2.load(new URLRequest(“image/pic1.jpg”));  
addChild(fl\_Loader\_2);  
}  
else  
{  
fl\_Loader\_2.unload();  
removeChild(fl\_Loader\_2);  
fl\_Loader\_2 = null;  
}  
fl\_ToLoad\_2 = !fl\_ToLoad\_2;  
}

Of course:  
btn1 is my button,  
pic1.jpg is my external image  
using Code Snippets

How do I add \_Blank commend to this, or enable \_Blank / New tab command to “MouseEvent.CLICK”?

Thank you for your time!
