Editing swfobject.js code so hyperlinks inside the flash widget open in a new window

0down votefavorite
I have a flash calendar widget (code shown directly below) and I do not have access to anything other than the compiled .swf file (no access to .fla).
The widget contains some hyperlinks to other websites, these links are dynamic and changes based on a number of things.
There is also a corresponding swfobject.js file that is used to add functionality to the flash widget. The swfobject.js code is shown further down this post.
Currently, the way the code is now, when I click any of the hyperlinks that are available to me in the widget, the destination website that hyperlink takes me to opens in THE SAME PAGE as the flash widget which is a big problem.
I need to edit the code below so that any hyperlinks that are clicked inside of the flash widget open in a brand new browser window and do not take the user away from the original widget other than opening a new page with new content.
Because the hyperlinks that are available are always changing, the swfobject code below uses some functions and parameters.
I am hoping you can show me exactly what code I must insert, and exactly where I must insert it, in order to alter the behavior that happens so that when a user clicks one of the hyperlinks inside the flash widget, so that the content at the other end of the hyperlink opens in a new window, instead of opening in the same window.
See code below.
Thank you in advance for any help you can provide
Flash Widget Code
<!-- Embedded Calendar --> <div id="activecontent"> <script type="text/javascript" src="swfobject.js"></script> <div id="awccalendar"></div> <script type="text/javascript"> var so = new SWFObject("awc.swf", "awccalendar2", "700", "180", "8", "#ffffff"); so.addVariable('calendarid', '0'); so.addVariable('appurl', ''); // Flash Widget Initial Date should be ddmmyyyy so.addVariable('ldate', '20052014'); so.write('awccalendar'); </script> </div>  <!-- Embedded Calendar -->
SWFOBJECT.JS CODE
/** * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ * * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License: * http://www.opensource.org/licenses/mit-license.php * */ if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(

In that case, I will have no choice but to decompile the .swf to get the .fla because the original .fla is un-obtainable. Unless there is a way to edit the contents of the .swf file without decompiling it.
I can see the code inside via various decompile tools and it seems that I would need to add the equivalent of <src target=_blank> to some of the lines I have shown below.
obj_xml.load(appurl + "loadconfig.aspx?calendarid=" + calendarid);  -- need to edit this so it opens in a new window using something similar to target = _blank
dest_page = appurl + "default.aspx"; -- need to edit this so it opens in a new window using something similar to target = _blank
I know a lot of decompile tools can get you the code and the .fla but once you edit and re-compile and attempt to replace the original with the new & updated file, the decompiler did not necessarily generate the properly formatted flash pro project file, so compiling it back into an operational .swf often ends in failure.
Do you know or can you recommend a tool that has a very good track record of re-compiling the decompiled modified.fla into a workable and usable .swf?

Similar Messages

  • You changed the order of the menu for "Open in a new window" or "Open in new Tab", How can I change it back? Or how can I omit any reference to tabs? I do not use them at all.

    You changed the order of the menu for "Open in a new window" or "Open in new Tab", How can I change it back? Or how can I omit any reference to tabs? I do not use them at all.

    You can use the Menu Editor add-on to rearrange or remove menu items - https://addons.mozilla.org/firefox/addon/menu-editor

  • I have just noticed that the new edit tools don't allow for setting up links to open in a new window. This is a very basic tool. Can it be incorporated ASAP.

    previous editor made i t very easy for clients to create links in text that opened in new windows rather than existing window. I consider this a basic tool. Can it be re-incorporated ASAP.

    Hi Lyn,
    Please review this related thread: wysiwyg editor
    You may also vote for this feature request here: Add support for link target in the new editor
    Cheers,
    Vikas

  • I would like the link to open in a new window

    It was answered once before with a link that doesn't go anywhere now. I want my visitors to click on my Yelp link without leaving my website.
    Help!  GoLive CS2

    Hi,
    If you want to open the link in a new window, you can use the code
    IWDWindow window =wdControllerAPI.getComponent().getWindowManager().createNonModalExternalWindow("http://10.140.8.89/in/mj/pthv/ltb/iso/1HYB600006-481.pdf","Work Procedure");
        window.show();
    These two lines of code will open a new window with the pdf file, we are using the same way in our component. This will resolve your problem......
    Regards,
    Lakshmi Prasad.

  • I've made a word in a paragraph a link,  I can't get the link to open in a new window

    Here's my text and how I've written the link:
    ("In addition to the four issues on this map, <style>a:link {color:#b8dc70;text-decoration:none;} a:visited {color:#c8c8c8;}a:hover {color:#e69400;}a:active {color:#c97777;}</style> <a href =\"http://grassrootschange.net/wp-content/uploads/2013/01/Preemption-FactSheet.pdf\" >peemption</a>has been used to weaken grassroots movements in dozens of other health and safety issues, ranging from environmental justice to fire prevention.");
    I know this must be very simple, but I'm at a total loss. Thank you in advance
    Hacky

    Hi redesign, thank you so much, this did the trick. I have a question. After tinkering a bit, In the end the only change in my link (other than "target="self" was changing from " to '  for example:
    ('In addition to the four issues on this map, <style>a:link {color:#b8dc70;text-decoration:none;} a:visited {color:#c8c8c8;}a:hover {color:#e69400;}a:active {color:#c97777;}</style> <a href =\"http://grassrootschange.net/wp-content/uploads/2013/01/Preemption-Fact Sheet.pdf\"target="self" >peemption</a>has been used to weaken grassroots movements in dozens of other health and safety issues, ranging from environmental justice to fire prevention.');
    Would you be kind enough to explain why, just so I know for the future.
    Thank you so much.

  • When I click on a web link and hold down ctrl the page will not open into a new tab, it is just opening in a new window. How do I correct this?

    When I use to hold down the ctrl key and left click on a web link, the page use to open into a new tab. For some reason this is not working anymore. Instead when I hold down the ctrl key and left click on a web link, the link will open into a new window. How do I fix this?

    I figured out how to correct it. Not sure what exactly was happening. But I started into private browsing and then turned it off. It's been working correctly ever since I did private browsing.

  • When I open a link in a website it opens as a new window instead of just staying on the same page

    In any website, when I click on a link it opens in a new window.this even occurs in google when I click any of the results it opens in a new window instead of just staying on the same page.tabs work fine however, it is just links on websites.

    Did you check the search settings on the Google Search Settings page?
    * http://www.google.com/preferences?hl=en
    ''Where results open: Open search results in a new browser window.''
    You can set the browser.link.open_newwindow pref to 1 to open links by default in the current tab.
    *http://kb.mozillazine.org/browser.link.open_newwindow (3)
    You can set this pref to 0 (zero) to do this for all widows opened via JavaScript.
    *http://kb.mozillazine.org/browser.link.open_newwindow.restriction (0)

  • Can you force a link inside a .pdf to open the "linked to" document in a new window?

    When I have a link inside my .pdf document - linking to another .pdf document or to a Word document - how can I force the linked-to document to open in a new window?
    I have a web site (business internal, so unfortunately I cannot point to it).  My HTML menu has links to .pdf documents - no problem.  However, once I open those .pdfs, they contain links to other .pdfs and to Word documents.  Clicking on these links, which reside inside my .pdfs, opens the "linked-to" docs in the same page.  How can I force them to open in a brand new frame?
    All of my .pdfs were originally created in Word, and in the Word versions, the links DO open into new frames.  I am not sure why, when I convert them to .pdfs, they lose this feature.
    Can anyone help?

    Hi Magenta,
    Would you mind reposting this question over on the Acrobat boards?  You've posted in the AIR forum and you'll have better luck with this over there.
    Thanks,
    Chris

  • Can a hyperlink open in a new window in the latest Pages

    I am creating hyperlinks in a Pages doc, and exporting as a pdf to sell as an ebook. I have yet to see a way of when creating a link to a web page setting it to open in a new window if they have the pdf opened in a browser. Any thoughts?

    Unfortunately, no Pages version has a link inspector/editor that enables the use of HTML attributes, in this case, target="_blank";  that would open the link in a new page (or tab).

  • Hey, im really sick of this, how can i open folders but in the same windows, when i open a folder which is inside of another one, it just open me a new window, its so annoying, could anyone tell me what to do? im using mac os 10.7.2

    hey, im really sick of this, how can i open folders but in the same windows, when i open a folder which is inside of another one, it just open me a new window, its so annoying, could anyone tell me what to do? im using mac os 10.7.2

    Finder > Preferences > General > Always open folders in a new window: uncheck

  • Has Apple stopped installing the liquid contact indicator inside the SIM slot opening on the 6 & 6+?  I've inspected several devices and they are not installed.

    Has Apple stopped installing the liquid contact indicator inside the SIM slot opening on the 6 & 6+?  I've inspected several devices and they are not installed.

    I don't know that Apple has ever officially commented on such things, one way or another. Places like ifixit will be your best sources for such information - https://www.ifixit.com/Answers/View/200937/How+many+water+indicators+or+sensors+ are+there+in+the+iPhone+6
    certainly none of us fellow users know what Apple's official current policies in such things are.

  • Open Link in new window, when field or column type is of Hyperlink

    Hi
    I have created a column by name Registration of 'Hyperlink or picture' type, and i want to open the link entered by the user in the new window as it is opening in the same window by default.
    Please help its a very major requirement.
    Thanks
    Paru

    Create a Site column of type “Hyperlink with formatting and constraints for publishing”
    (Site Actions -> Site settings -> Site columns -> Create )
    Add this Site column in your new list
    (List Settings -> Add from existing site columns)
     http://ashishnjain.wordpress.com/2012/06/06/sharepoint-links-list-to-open-in-a-new-window
    OR try
    1. Open Site in SharePoint Designer 2010
    2. Click on Lists and Libraries
    3. Click on the List Name
    4. Click on the View Name "All Items"
    5. Double click one of the links inside column which contains the HyperLink
    6. Tag Properties change "target" Value from _self to _blank
    http://social.msdn.microsoft.com/Forums/en-US/99e9559a-da76-4722-982c-882b3e4181c7/hyperlink-column-type-open-in-new-window
    http://suryapulipati.blogspot.in/2011/12/open-hyperlink-in-new-window-in.html

  • IWeb - cant adjust hyperlinks to open page in new window

    Anyone know of a work around to this obvious shortcoming? ...other then hacking the html code? the website is: www.apexjiujitsu.com
    My Links page is the one that I'd like to set parent=_ or whatever the value is for new window instead of same window

    Hi all.
    New to iWeb as well and am enjoying creating my website.
    Having played with HTML in the past and dreamweaver for creating pages, remembered there is a way to do this in a non-iweb way.
    The extra code that needs to be added at the end of your link is:
    target="_blank"
    Now how to get that in your iWeb page.
    What I did (worked for me each time) - copy the page you want to edit from your iDisk in the Finder window to a folder on your mac. Make sure to make a copy of this file in case you want to go back to the original.
    - Next open the page in Netscape (using ver 7.2). Pics did not show as I did not copy those.
    - In Netscape click File, Open File. Just navigate to your page location and click Open.
    One really neat feature I like about Netscape is that it comes with a built in web page editing tool.
    - Click File, Edit Page. Editing window appears.
    - Find the link you want to change and double-click it. It may try to open the link in new window, if it doesn't, don't worry about it. Or give you an error - close the error window.
    - Go back to the editing window and double-click on the link again. You should see a drop-down menu appear.
    - Click Advanced edit. There are two columns here - Attribute and Value.
    Attribute is what you want - ie open in a new window (target) and the Value is what happens next ie. opens the link in a new window.
    - Click on the Attribute drop-down at the bottom and choose "target".
    - Click on the Value drop-down and choose "_blank" (usually defaults to this).
    - Click OK and then OK again.
    Close the file and make sure to save.
    All I did then was copy the edited page to the iDisk folder wence it came from and overwrote the original (did you save a copy of the original in a safe location?).
    Opened the page in Safari or any other browser and voila' - link now opens in a new window/tab.
    Sorry for the long winded reply explanation. Wanted to be sure I didn't miss anything. ***Just be sure to save a copy of the original page your working on in a safe place in case you need to revert to the original.***
    Hope this helps.
    ps. Agree, adding an option to open links in new window should be put into the enhancements to come for iWeb.
    Stewy
    G5 Dual 2.3 ghz   Mac OS X (10.4.2)  

  • How do I get the searchbar to open in a new tab?

    I want the search bar to open a new tab every time i search for something. How to I do this?

    Hotmail opens in a new window because the code or set of instructions on the MSN website tells Firefox to open Hotmail in a new window. I would suggest you right click on the Hotmail button and left click on "Open Link in New Tab". This will open a new tab in the current window.

  • Hyperlink on a trigger won't open in a new window

    I have set up a roll over trigger that reveals a target and it works great. The only issue is that the hyperlink I have assigned to the trigger will only work if I uncheck the "open in a new window or tab" box. If I check that box, nothing happens when I click the trigger, yet it's original function of revealing the target still works.

    here is one picture of the composition settings, I also took 6 other photos with a trigger/target/textbox/picture broken apart so you could see the layers, I've included all in this dropbox link:
    https://www.dropbox.com/sh/s2f66agbopl6dig/AACW6cmq5eZjy0VLU73eR350a?dl=0

Maybe you are looking for

  • Remote app is not working atv2

    Before ios5 was out I was using apple remote app from my iphone.  I was also using airplay.  I cannot get any of my devices to connect to remote app, or air play now that we have upgraded to ios5. Anyone else having this issue? Everything is updated

  • Warning when opening BridgeCS3 in Win7

    I get this message every time I start BridgeCS3 on my new Win7 computer.  I never got anything like that on my old XP computer or my Vista laptop.  I always click "Yes" & haven't had any problems (that I'm aware of).  Of course, I could check "Don't

  • Basic Questions/Advice

    I would like to create a series of instructional videos that will be placed on a DVD and become linked from a main menu. Some of the primary links on the main menu will open new menu pages with additional links for other videos. 1.) I am not sure if

  • 160N rerouting issue

    So, this is about the 5th time, is not more that I am having facebook.com rerouted to pricegrabber.com   I have looked online and it seems to be a flaw in the router itself, I, of course like everyone else, thought it was a virus or something, but it

  • My Iphone will not sync with my computer

    My phone stopped syncing about 2 or three months ago.  Windows XP SBS 2011 I have uninstalled Itunes and reinstalled it.  By bet is there is some sort of log file that needs to be deleted but...