[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 768
  • Last Modified:

Popup window with Flash object Text Box Focus Problem

I need to load a Flash object in a Popup Window with an Input Text Box.  If I load the flash swf into a blank HTML page,  I am able to type in the text box.  However, if I load the same flash swf into a Popup Window, I am unable to type anything at all even though the cursor flashes in the text box as if the focus is on the text box.  I can make this work if I use the WMODE to be WINDOW, but I would like to use TRANSPARENT for the WMODE parater.  Is there a workaround?  Any help would be appreciated.  Thank you.
0
mxyztplk333
Asked:
mxyztplk333
  • 4
  • 4
1 Solution
 
julianopolitoCommented:
can send code or link with example?
Have embeded the font into the textfield?
0
 
mxyztplk333Author Commented:
The text box in Flash is just a standard text box.  I am guessing that it doesn't have anything to do with the font in the textfield because I am able to type into the text box if I load it into a normal non-popup html window.

Here is how I load the flash into the Popup Window:

var obj = document.createElement("object");
      obj.setAttribute("id","flash_obj");
      obj.setAttribute("classid","clsid:D27CDB6E-AE6D-11cf-96B8-444553540000");
      obj.setAttribute("codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab");
      obj.setAttribute("width","233");
      obj.setAttribute("height","120");
      
      var param2 = document.createElement("param");
      param2.setAttribute("name","movie");
      param2.setAttribute("value", "http://mylocaliis/test.swf");

      var param3 = document.createElement("param");
      param3.setAttribute("name","wmode");
      param3.setAttribute("value","transparent");
      
      var param5 = document.createElement("param");
      param5.setAttribute("name","bgcolor");
      param5.setAttribute("value","#000000");
      
      var param6 = document.createElement("param");
      param6.setAttribute("name","allowScriptAccess");
      param6.setAttribute("value","always");
      
      var param7 = document.createElement("param");
      param7.setAttribute("name","swliveconnect");
      param7.setAttribute("value","true");
      
      var embed = document.createElement("embed");
      embed.setAttribute("name","flash_obj");
      embed.setAttribute("align","right");
      embed.setAttribute("src", "http://mylocaliis/test.swf");
      embed.setAttribute("wmode","transparent");
      embed.setAttribute("swliveconnect","true");
      embed.setAttribute("bgcolor","#000000");
      embed.setAttribute("width","233");
      embed.setAttribute("height","120");
      embed.setAttribute("allowScriptAccess","always");
      embed.setAttribute("type","application/x-shockwave-flash");
      embed.setAttribute("pluginspage","http://www.macromedia.com/go/getflashplayer");

      obj.appendChild(param2);
      obj.appendChild(param3);
      obj.appendChild(param5);
      obj.appendChild(param6);
      obj.appendChild(param7);
      obj.appendChild(embed);
      
      T_PopupWindow.document.getElementById("div1").appendChild(obj);

FYI, here are my environment details:  

IE7
Flash Player 9.0.115
Actionscript 2.0

Thank you in advance for your expert guidance.
0
 
mxyztplk333Author Commented:
One addendum to my last post:

If it is a Popup window focus issue, perhaps there is a way in Actionscript(or javascript) to FORCE the focus on the text box when I click into the text box so that I may type in it?

Any workaround suggestions will be greatly appreciated.

Thank you.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
julianopolitoCommented:
And what about the actionscript code? can send a link where I can see the problem ocrruing, or can you send the complete code for me to test locally ?  From that code I can't say much. thank you.
0
 
mxyztplk333Author Commented:
Hey julianopolito,

Sorry for the delayed response.  I don't have a web server and am testing everything on my local IIS, so I am unable to show you the problem occurring unfortunately.  But it's just when I click inside of the Text Box, the cursor blinks but I cannot type in it when the flash is loaded in a Popup window(but works fine when I load it into a blank html page).  Even in the popup window, I can get it to type in the box if I set the WMODE to be WINDOW, but not when WMODE is set to TRANSPARENT.  Here is the actionscript that I am using on the Submit button of the Input, if that helps:

on (release) {
      _root.Submit(_global.data1);
}

where data1 is the instance name of the input in the text box and Submit is the function that calls a javascript function that processes the data using ExternalInterface like this

function Submit( input1:Number ){
      ExternalInterface.call("doPost",input1);
}

I'll try to see if I can borrow my friend's webspace for some testing if necessary.  Thank you.
0
 
julianopolitoCommented:
I think it is a browser issue not flash issue. It seems to be related with the implementation of wmode n browsers. Can't you just put a background to mimic the main page background so you can use WMODE OPAQUE?
0
 
mxyztplk333Author Commented:
Thank you for your response, julianopolito.  The article, I think, is bringing up the issue in Firefox of textfields in flash being weird when wmode=transparent.  In my case, I need to get this to work on IE6&7.  I just tried your suggestion of setting WMODE to OPAQUE and it still does not allow me to type in the text box.  The only thing that I can get to work so far is by setting the WMODE to WINDOW in the flash object that I load into the Popup Window.  Please let me know if you have any other suggestions and I'll try it.  Thank you.
0
 
ee_autoCommented:
Question PAQ'd, 500 points refunded, and stored in the solution database.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now