Post Reply 
Drag-and-Drop Resizable Flash...
Nov. 27, 2008, 11:51 PM
Post: #16
RE: Drag-and-Drop Resizable Flash...
(Nov. 27, 2008 10:48 PM)Graycode Wrote:  Alternatively, you could try injecting the following Javascript onto the bottom (maybe right before /body) of the pages that you've modified to use the div.

hmm, that didn't seem to do the trick...
something tells me it needs added to z12's original "z12.js", but i'd be totally lost attepting that...
Add Thank You Quote this message in a reply
Nov. 28, 2008, 12:02 AM
Post: #17
RE: Drag-and-Drop Resizable Flash...
(Nov. 27, 2008 11:37 PM)lnminente Wrote:  mmm i was thinking in the javascript code for toggling, not in the css. The style can be inserted in every div anyway without using CSS...
Or use CSS for class and id for toggling maybe...

My impression was that the sizes specified on Object | Embed are not just CSS attributes, but rather they're referenced and used by the Flash rendering engine. Apparently I'm wrong about that.
Add Thank You Quote this message in a reply
Nov. 28, 2008, 12:09 AM (This post was last modified: Nov. 28, 2008 12:20 AM by ProxRocks.)
Post: #18
RE: Drag-and-Drop Resizable Flash...
correct, that's the link i'm using as a test...

the "the 2nd span instead of the div, like so" resulted in the EXACT same output as the class/id and closing div before/after the \0 within the textarea...


"Let's see if that will resize."
i suspect there's some confusion here and i'm being misread...

the "div container" is and always has been resizing (provided the class/id and closing div is not "outside" the outer-span)... within the textarea surrounding \0 or "classing" the span around that textarea both seems to behave identically...

my dilemma isn't that my "container" isn't resizing, it's that the object/embed "within" that 'bordered-container' isn't "rescaling" itself to 'fit to width' and 'fit to height' to the dimensions i drag-and-drop that "container"... my "document.write" object/embeds (of which i don't need a filter to rewrite the width/height) are working flawlessly... but the w/h's in the object/embed tags "must" be 100% for the resize/rescale to work...


thanks for the help, all... i'm sure "we'll get there", lol...


edit: the above is a reply to a post since-deleted... i'll keep here for the poster's reference regarding the div class and closing div placement...
(Nov. 28, 2008 12:02 AM)Graycode Wrote:  My impression was that the sizes specified on Object | Embed are not just CSS attributes, but rather they're referenced and used by the Flash rendering engine. Apparently I'm wrong about that.

the width/height aren't exactly css attributes...
they're basically, "i have a 1024x768 image stored on my server and written into my webpage, when visiters view my webpage, they have to download the entire 1024x768, but their browser will size it, bigger or smaller, to the width/height parameters within the <img> tag"...


.swf's have the same width/height parameter, the web designer wants me to view it at a certain size, i'm saying "to Hades with what the designer wants (good golly i LOVE Proxo), i want it at 100%x100% and i want it placed within a "div container" that i can drag-and-drop the borders of to resize to my own liking"...

(i do want that 'div container' at the size the designer intended, but i'll cross that bridge later...)
Add Thank You Quote this message in a reply
Nov. 28, 2008, 01:10 AM
Post: #19
RE: Drag-and-Drop Resizable Flash...
I guess I could use brute force to modify the H&W attributes in the text area.
Before I do that, I'm going to do a little research.

My last experiment on modifying with H&W killed firefox Smile!

z12
Add Thank You Quote this message in a reply
Nov. 28, 2008, 01:16 AM
Post: #20
RE: Drag-and-Drop Resizable Flash...
lol, i guess i should feel fortunate that my browser wasn't killed...
when i see my CPU-meter in the systray "peg" for 10 seconds or so, i 'kill connections' in Proxo and all is groovy, nothing but the connection needed "killed", lol...
Add Thank You Quote this message in a reply
Nov. 28, 2008, 01:20 AM (This post was last modified: Nov. 28, 2008 01:33 AM by z12.)
Post: #21
RE: Drag-and-Drop Resizable Flash...
So far, what I've found is similar to this:
Quote:Does anyone know how to apply a height to a flash object? For some
reason when you set the height as a percentage, it is not applied to the
flash object, but if I set the height using any other units (px, em,
etc.) it is applied correctly.

Still looking...

z12
From here:
http://kb.adobe.com/selfservice/viewCont...&sliceId=1

Quote:Both object and embed:

* width - Specifies the width of the movie in either pixels or percentage of browser window.
* height - Specifies the height of the movie in either pixels or percentage of browser window.

z12
Add Thank You Quote this message in a reply
Nov. 28, 2008, 02:24 AM
Post: #22
RE: Drag-and-Drop Resizable Flash...
here's an example...
grab sidki's 1/2/08 release (Kye-U's [unoff] updates not needed [they only deal with Google "themes"])...

Code:
[Patterns]
Name = "Header Top Inject: User CSS - Resizable Div [add]"
Active = TRUE
URL = "$TYPE(htm)"
Limit = 16
Match = "(^(^<ProxHdrTop>))$STOP()"
Replace = "<style type="text/css">\n"
          "#ResizeDiv {\n"
          "  overflow: auto;\n"
          "  width: auto;\n"
          "  height: auto;\n"
          "  border: 2px inset lightblue;\n"
          "  background: lightblue;\n"
          "  color: black;\n"
          "  padding: 1px;\n"
          "  }\n"
          "</style>\n"

Name = "Header Top Add: User JS Code - Resizable Div [add]"
Active = TRUE
URL = "$TYPE(htm)"
Limit = 16
Match = "(^(^<ProxHdrTop>))$STOP()"
Replace = "\t<script type="text/javascript" src="http://local.ptron/My_HTML/ErikArvidsson_HTML/genresize.js">\r\n\t</script>\r\n"

Name = "Insert: USA Today & LATimes Sudoku [Key=^Ctrl-^Shift]"
Active = TRUE
URL = "(^$KEYCHK(^C))(^$KEYCHK(^S))(^$TST(uFile=search))(^$TST(uProt=https:))www.google.com"
Limit = 10
Match = "</html>"
Replace = "\r\n<script type="text/javascript">\r\n"
          "var prxdate = new Date()\r\n"
          "var prxyear = prxdate.getYear()\r\n"
          "prxyear-=2000\r\n"
          "if (prxyear < 10 )\r\n"
          "prxyear = "0" + prxyear\r\n"
          "var prxmonth = prxdate.getMonth() + 1\r\n"
          "if (prxmonth < 10 )\r\n"
          "prxmonth = "0" + prxmonth\r\n"
          "var prxday = prxdate.getDate()\r\n"
          "if (prxday < 10 )\r\n"
          "prxday = "0" + prxday\r\n"
          "</script>\r\n"
          "\r\n\r\n"
          "<center>"
          "<span class="FlashUSA" style="display:inline">"
          "<table cellpadding=0 cellspacing=0>"
          "<tr><td align=center>"
          "&nbsp;<a title="Show USA Today Sudoku" href="javascript:prxO.oInt.inToggleB('FlashUSA','cl','span')">Show USA Today Sudoku</a>&nbsp;"
          "</td></tr>"
          "</table>"
          "</span>"
          "<span class="FlashUSA" style="display:none">"
          "<script type="text/javascript">\r\n"
          "document.write ('"
      "<div class="resizeMe" id="ResizeDiv">"
          "<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000""
          " codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0""
          " WIDTH="100%" HEIGHT="100%" id="uc_sudoku" ALIGN="middle">"
          "    <PARAM NAME=movie VALUE="http://picayune.uclick.com/comics/ussud/uc_sudoku_usa.swf?"
          "dt=' + prxyear + prxmonth + prxday + '&xurl=http://picayune.uclick.com/comics/ussud/su_control.xml">"
          "    <PARAM NAME=quality VALUE=high>"
          "    <PARAM NAME=scale VALUE=exactfit>"
          "    <PARAM NAME=bgcolor VALUE=#FFFFFF>"
          "    <PARAM NAME="SeamlessTabbing" value="false">"
          "    <EMBED src="http://picayune.uclick.com/comics/ussud/uc_sudoku_usa.swf?"
          "dt=' + prxyear + prxmonth + prxday + '&xurl=http://picayune.uclick.com/comics/ussud/su_control.xml" "
          "SeamlessTabbing=false quality=high scale=exactfit bgcolor=#FFFFFF WIDTH="100%" HEIGHT="100%" ALIGN="middle" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">"
          "    </EMBED>"
          "</OBJECT>"
      "</div>"
          "');"
          "</script>\r\n"
          "<br>"
          "<a title="Hide USA Today Sudoku" href="javascript:prxO.oInt.inToggleB('FlashUSA','cl','span')">Hide USA Today Sudoku</a>"
          "</span>"
          "<br>"
          "<span class="FlashLAT" style="display:inline">"
          "<table cellpadding=0 cellspacing=0>"
          "<tr><td align=center>"
          "&nbsp;<a title="Show LATimes Sudoku" href="javascript:prxO.oInt.inToggleB('FlashLAT','cl','span')">Show LATimes Sudoku</a>&nbsp;"
          "</td></tr>"
          "</table>"
          "</span>"
          "<span class="FlashLAT" style="display:none">"
          "<script type="text/javascript">\r\n"
          "document.write ('"
      "<div class="resizeMe" id="ResizeDiv">"
          "<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000""
          " codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0""
          " WIDTH="100%" HEIGHT="100%" id="uc_sudoku" ALIGN="middle">"
          "    <PARAM NAME=movie VALUE="http://picayune.uclick.com/comics/lasud/uc_sudoku_lat.swf?"
          "dt=' + prxyear + prxmonth + prxday + '&xurl=http://picayune.uclick.com/comics/lasud/su_control.xml">"
          "    <PARAM NAME=quality VALUE=high>"
          "    <PARAM NAME=bgcolor VALUE=#FFFFFF>"
          "    <PARAM NAME="SeamlessTabbing" value="false">"
          "    <EMBED src="http://picayune.uclick.com/comics/lasud/uc_sudoku_lat.swf?"
          "dt=' + prxyear + prxmonth + prxday + '&xurl=http://picayune.uclick.com/comics/lasud/su_control.xml" "
          "SeamlessTabbing=false quality=high bgcolor=#FFFFFF  WIDTH="100%" HEIGHT="100%" ALIGN="middle" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">"
          "    </EMBED>"
          "</OBJECT>"
      "</div>"
          "');"
          "</script>\r\n"
          "<br>"
          "<a title="Hide LATimes Sudoku" href="javascript:prxO.oInt.inToggleB('FlashLAT','cl','span')">Hide LATimes Sudoku</a>"
          "</span>"
          "<br>"
          "</html>"

don't forget the "My_HTML/ErikArvidsson_HTML/genresize.js" attached in a higher-up post...

the first goes right below "Header Top Inject: User CSS on sel. Sites"...
the second goes right below "Header Top Add: Initial JS Code"...
the third goes AFTER all of sidki's filters, all the way to the very bottom...

now go to http://www.google.com ...
whoala! you have "toggled" flash-embeds...
and eureka! grab the "edge" of that flash-embed and you can RESIZE it!... (the LATimes one works a little better, test with that one...)


this is what i'm wanting to do with ALL .swf's, not just the one's i "document.write" in...


(oh, now i got you all hooked on Sudoku, lol... the ctrl/shift tests are because i also doc.write PCman Simon, uclick Kakuro, Snake Classic, and a paper-throwing game into a waste basket with a circular fan blowing a breeze across my throwing path)... good golly, i love Proxo!


so long as the object/embed tags width/height parameters are set to 100%, flash files are RESIZABLE, dimensionally-speaking (with the help of genresize.js)...


edit: added [Patterns]...
Add Thank You Quote this message in a reply
Nov. 28, 2008, 12:05 PM
Post: #23
RE: Drag-and-Drop Resizable Flash...
Never thinked in that before, but now i see a good utility in zooming for flash files.
In firefox is CTRL+scroll wheel, the good thing is wich firefox remembers the zoom for every site.
Add Thank You Quote this message in a reply
Nov. 28, 2008, 01:42 PM (This post was last modified: Nov. 28, 2008 01:50 PM by ProxRocks.)
Post: #24
RE: Drag-and-Drop Resizable Flash...
the class within the span (versus within the textarea tag) does seem to place the draggable box more effectively... i had to up the ResizeDiv's border and padding else the "draggable mouse icon" would never appear...

although the border is placed more properly, i'm noticing that if you drag-and-drop either the top border or the left border, that the .swf "disappears" - any music will still be heard, but the image vanishes from the screen...
ps - my browser will scroll-zoom flash (and images) also...

but the method i'm in-process of is vastly superior, imho...
ie, i go to full-screen mode in my browser, the 100% embed parameters resize the embed accordingly, i resize my browser via WinXP's "restore down" and "maximize" icons to the left of the Big Red X "close" icon, the embed resizes accordingly, i drag-and-drop my browsers overall window size, the embed resizes accordingly, i change the resolution on my LCD, the embed resizes accordingly, my MLB GameChannel (during MLB season, lol) resizes itself to whichever of three computers i'm sitting at, all with different screen resolutions...
Add Thank You Quote this message in a reply
Nov. 28, 2008, 02:13 PM
Post: #25
RE: Drag-and-Drop Resizable Flash...
I will try your filters after dinner, i didn't tested them yet 'cause are beta and i'm too lazy to open my default.cfg to paste them...
Please Proxrocks next posts paste them to be able to use the "merge data from clipboard" please, please, please Wink
Add Thank You Quote this message in a reply
Nov. 28, 2008, 02:37 PM (This post was last modified: Nov. 28, 2008 02:54 PM by ProxRocks.)
Post: #26
RE: Drag-and-Drop Resizable Flash...
lol... i do *everything* config-related with good ol' Notepad (not even Notepad++ or Notepad2 or equiv, just regular ol' MS Notepad)...

i mean, with "merge from clipboard", imo, it's just a NUISANCE to have to scroll to the top, cut, scroll down to where the filter is supposed to be, paste, scroll back to the top, cut, scroll down to second-place-to-be, paste, scroll back up, cut, scroll back down, paste, save...

and one of the HUGE mistakes that many Proxo-users make is they merge from clipboard, save, and think they're done... (if they remember to even save)... don't forget that these filters are NOT supposed to be sitting at the TOP of your config, where the merge function will place them...

at any rate, the LENGTH of the filters is rather "exhaustive", so instead of posting TWICE, i've edited the above to contain that merge-from-clipboard-approved "[Patterns]" line (ps, you could also use Firebug to insert that yourself, before copying to your clipboard Big Teeth [well, at least my browser can, haven't gotten around to trying "fox-with-bug" yet, lol])...
(Nov. 28, 2008 02:13 PM)lnminente Wrote:  i didn't tested them yet 'cause are beta and i'm too lazy to open my default.cfg to paste them...

that's what i was afraid of, the required .js has only been downloaded three times... there are only a select few of us that really "dig DEEP" (which i acknowledge isn't everyone's "thing", it takes a chess player, not a checkers player) when it comes to Proxo... that's really the ONLY "flaw" with Proxo these days, the 'community' has dwindled to a select few "deep diggers" and countless others that just want six-liner fixes created for them at the drop of a hat... the <font=sarcasm> "<bump> i requested this two hours ago, no responses yet, boy, where's <insert name here> when you need him?" crowd </font>...

</end off-topic> lol...
Add Thank You Quote this message in a reply
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
Nov. 28, 2008, 03:54 PM
Post: #28
RE: Drag-and-Drop Resizable Flash...
Eureka!!! That did it!

my flash's are resizing!
had to revert to the class/id/closing-div being "inside" the textarea tag...
seems "intermittent" on whether the border is draggable with them within the span tag encasing the textarea tag...

some improvements still need made, but this was a HUGE LEAP FORWARD, many thanks!


edit: here's another good test, http://www.thecigaretteisdead.com/
Add Thank You Quote this message in a reply
Nov. 28, 2008, 04:09 PM
Post: #29
RE: Drag-and-Drop Resizable Flash...
lol hehehe The best is community with '!! hehehe. Yes! i think i could invite to coffe and cake to
everyone here, and i would spend less than 20 euros... hehehe would be interesting to do some polls here to see how many we are and what we want...

The filters look interesting.
Nice javascript to download the flash only when it's clicked.
The file /My_HTML/43unite_HTML/player_play.png is not included in the zip, but i have it from the other thread.
Thanks for the "merge data from clipboard" Wink I feel it easier to give them a try and if i like, then save.

Waiting for the eureka version Wink
Add Thank You Quote this message in a reply
Nov. 28, 2008, 11:01 PM (This post was last modified: Nov. 28, 2008 11:46 PM by ProxRocks.)
Post: #30
RE: Drag-and-Drop Resizable Flash...
i've been trying now for two hours to disable the javascript/flash detection on YouTube (as a test site for the toggle/resize flash filter)...

i *HATE* flash detection, 15% of the time they are flat-out WRONG (i bumped into two dozen outside of YouTube!), i "canPlayV9Swf" whether the stinkin' thing returns true or not!


does anyone know how to disable/bypass these D@MN "detections"?


thanks in advance...
follow-up: i'm seeing the problem, my Flash is version 10... the "tests" are for >9... 10 shows up as 0, 0 is less than 9, "test" fails...

how freakin' retarded...
these "script kiddies" never envisioned a two-digit version number ???


still needing to "axe" this with Proxo, haven't found any workarounds yet...
pretty much at wits-end at this point - "Mork and Mindy" marathon should ease the sense of wanting to throw my monitor out the window...

if anyone can think up a workaround, i'm all ears... "nah-noo nah-noo" (phonetic spelling, it's actually Na-Nu, lol)...
follow-up #2: re-installed Flash and all is well (sorry for the false alarm if anyone swung by and caught my above before i followed-up my follow-up)...
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: