Post Reply 
Drag-and-Drop Resizable Flash...
Nov. 28, 2008, 03:24 PM
Post: #27
RE: Drag-and-Drop Resizable Flash...
Here's the code to make the height & width parameters 100%.

In the js toggle function, you'll see some code like this
Code:
if (oSpan && oSpan.firstChild.nodeName.toLowerCase() == "textarea"){
            var fnHTML = oSpan.firstChild.value;       // this is the html inside the textarea node
            oSpan.removeChild(oSpan.firstChild);       // delete the textarea node

for a test, insert the two "foo" lines
Code:
if (oSpan && oSpan.firstChild.nodeName.toLowerCase() == "textarea"){
            var fnHTML = oSpan.firstChild.value;       // this is the html inside the textarea node
            var foo = fnHTML.replace(/((?:height|width)\s*=\s*["']*)\w+/gi,'$1100%');
            alert(foo);
            oSpan.removeChild(oSpan.firstChild);       // delete the textarea node

This will alert the the new "100%" height & width parameters that would be used.
The code is not actually replaced, it's just for you to inspect.

If all looks well and you want to go for it, edit so the final code looks like this:
Code:
if (oSpan && oSpan.firstChild.nodeName.toLowerCase() == "textarea"){
            var fnHTML = oSpan.firstChild.value;       // this is the html inside the textarea node
            fnHTML = fnHTML.replace(/((?:height|width)\s*=\s*["']*)\w+/gi,'$1100%');
            oSpan.removeChild(oSpan.firstChild);       // delete the textarea node

In the end, all we've done is inserted 1 line of code.
Make sure the browser reloads the edited js file each time you change it.

I tried it on the flash 9 demo test page.
Also tested it out at usatoday on the flash at the upper right of the home page.

The flash 9 demo got much bigger.
usatoday's flash appeared to remain the same size.
At least nothing caught on fire.

I plan on trying out the code you posted later today.

z12
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
Drag-and-Drop Resizable Flash... - ProxRocks - Nov. 27, 2008, 05:26 PM
RE: Drag-and-Drop Resizable Flash... - Oddysey - Nov. 27, 2008, 06:10 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Nov. 27, 2008, 07:57 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Nov. 27, 2008, 09:31 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Nov. 27, 2008, 11:42 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Nov. 28, 2008, 01:10 AM
RE: Drag-and-Drop Resizable Flash... - z12 - Nov. 28, 2008, 01:20 AM
RE: Drag-and-Drop Resizable Flash... - z12 - Nov. 28, 2008 03:24 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Nov. 29, 2008, 05:49 AM
RE: Drag-and-Drop Resizable Flash... - z12 - Nov. 29, 2008, 01:23 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Nov. 29, 2008, 02:23 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Nov. 30, 2008, 12:29 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Nov. 30, 2008, 04:20 PM
RE: Drag-and-Drop Resizable Flash... - Oddysey - Nov. 30, 2008, 08:10 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Nov. 30, 2008, 10:25 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 02, 2008, 12:24 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 02, 2008, 09:23 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 03, 2008, 12:20 AM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 07, 2008, 03:32 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 09, 2008, 03:28 AM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 09, 2008, 05:00 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 10, 2008, 12:00 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 10, 2008, 01:48 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 10, 2008, 03:50 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 10, 2008, 06:06 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 11, 2008, 12:38 AM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 11, 2008, 01:28 AM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 11, 2008, 01:51 AM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 11, 2008, 07:20 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 16, 2008, 01:17 AM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 16, 2008, 12:21 PM
RE: Drag-and-Drop Resizable Flash... - 43unite - Dec. 16, 2008, 06:12 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 16, 2008, 10:15 PM
RE: Drag-and-Drop Resizable Flash... - bugger - Dec. 18, 2008, 05:24 AM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 20, 2008, 01:40 PM
RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 21, 2008, 02:15 AM
RE: Drag-and-Drop Resizable Flash... - bugger - Dec. 21, 2008, 10:03 PM
RE: Drag-and-Drop Resizable Flash... - bugger - Jan. 14, 2009, 10:16 PM
RE: Drag-and-Drop Resizable Flash... - Mele20 - Jan. 15, 2009, 08:32 AM
RE: Drag-and-Drop Resizable Flash... - bugger - Oct. 28, 2009, 09:01 AM

Forum Jump: