The Un-Official Proxomitron Forum
Drag-and-Drop Resizable Flash... - Printable Version

+- The Un-Official Proxomitron Forum (https://www.prxbx.com/forums)
+-- Forum: Proxomitron Filters (/forumdisplay.php?fid=38)
+--- Forum: Website Customization (/forumdisplay.php?fid=9)
+--- Thread: Drag-and-Drop Resizable Flash... (/showthread.php?tid=1158)

Pages: 1 2 3 4 5 6 7 8


RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 10, 2008 12:00 PM

The replacement text is causing some grief with the js.
I knew this would happen. Smile!
I went the quick and dirty approach, so it's payback time for me.
I need to do a js patch so this won't be a problem anymore.

z12


RE: Drag-and-Drop Resizable Flash... - ProxRocks - Dec. 10, 2008 12:37 PM

i was using an extremely similar method before you posted this...
i didn't know how to work around the "maxLeft" and "maxTop" so that the flash retains it's originally intended size, turns out that was easier than i expected, lol...

although i've seen some .swf's (the "Videos being watched right now..." @ http://www.youtube.com) that behave much better with those max variables in place...

all-in-all, this approach does seem to work fairly well...


RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 10, 2008 01:48 PM

With the replacement tweaks, the flash on usatoday's home page doesn't look right when it's initially toggled on.

But Step:1 is fixing the js so it finds the right elements to play with.
To do so, the following code needs to be inserted:

Code:
function setFlashProps(pn){
          
          // array of child nodes
          var cn=pn.childNodes;
          
          // get the child node count
          var nc=cn.length;
          
          // drill down through the child nodes
          while(nc--){
            setFlashProps(cn[nc]);
          }
          
          var pnName = pn.nodeName.toLowerCase();
          
          if (pnName == "object"){
            pn.style.position ="relative";
          }
          
          if (pnName == "embed"){
            pn.style.position ="relative";
          }
          
        }

Insert the new code just above this line:

Code:
var imgName = aToggle.firstChild.src.split(/\/player_[^.]+/i);

Then replace this code:

Code:
oSpan.firstChild.style.position ="relative";
            if(oSpan.firstChild.lastChild)oSpan.firstChild.lastChild.style.position ="relative";
Note: the post above is showing leading spaces on the 2nd line.
there not really there.

With this code:

Code:
setFlashProps(oSpan);

The end result of all this means it doesn't matter what's in the textarea or the order it's in.
The js will still find the object/embed tags that are inside the textarea.

Right now the setFlashProps function just looks for object & embed tags.
When it finds one, it sets the position property. Other properties could also set.

If need be, checks could be added for other nodes, such as div or param elements.
Node matches could be based on nodeName, className or whatever.
Then, you could bend them to your will. Smile!

z12


RE: Drag-and-Drop Resizable Flash... - ProxRocks - Dec. 10, 2008 02:59 PM

even with those changes, i need to place a "left: 0px; top: 0px;" within my drsElement class...

otherwise nothing is "draggable"...


RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 10, 2008 03:50 PM

We want to keep the new js fix, but I need to back up one square.

ProxRocks Wrote:testing... 1.. 2.. 3.. testing...
got the "toggle/resize pack" loaded and test-driving as we speak...
i've notice a bug here or there, give me a day or two with it and i'll report back on it...

Going back to the filter in the zip file, you saw some bugs.
These were resize drag issues?

At any rate, I'd like some links to those problem sites.
I would like to visit them using the filter in the zip file.

If the problem is event related, it will be easier to debug without the extra inner divs.
I need to get a better handle on what you were seeing and the nature of the problem.

I presume these problems were with IE. Which version?
I have IE6 on standby for testing.

z12


RE: Drag-and-Drop Resizable Flash... - ProxRocks - Dec. 10, 2008 05:40 PM

the as-is .zip'd version didn't work for me at all (with any .swf's), i just didn't want to say it that directly 'cause i didn't want it to sound like i was shooting down your efforts Sad

the toggle would work, but the resizing "squares" were not 'moveable' until i added the "left: 0px; top: 0px;" part...


i'm on a fully-patched IE7 within a fully-patched WinXP Pro...


RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 10, 2008 06:06 PM

No problem. It's just a browser issue.

I think I've got IE7 on another machine.
I'll fire it up and check it out.

z12


RE: Drag-and-Drop Resizable Flash... - lnminente - Dec. 10, 2008 07:53 PM

to Z12: I think there are IE7 portables by there, or better you could try IE7 inside Sandboxie... (i use IE6 too).

To both: This project is getting long, sorry for not helping here, but js is not my skill and i got lost from the very beginning


RE: Drag-and-Drop Resizable Flash... - ProxRocks - Dec. 10, 2008 08:56 PM

no worries...
.js ain't my thang either, if i can't "find" it 'pre-packaged' on the web, i'm at a total loss...


RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 11, 2008 12:38 AM

Just upgraded to SP3 and IE7.
Right off the bat, I have some js issues with IE7 and the script I normally inject.
That's why I haven't upgraded to Firefox 3, I can't replace some funtions I do now.
I should probably just bite the bullet and upgrade now.

lnminente Wrote:you could try IE7 inside Sandboxie... (i use IE6 too)

I've thought about using Sandboxie before.
Last time I checked into it, I was tired of struggling with secruity apps and decided against it.
I'll take another look.

Hopefully, we'll get the toggle issue straightened out with IE7.
Maybe you could be the IE6 guinea pig for the Toggle Flash Resize filter. Smile!

Anyway, I need to sort out these js issues before I get back on the flash js.
I'm hoping that won't take too long.

z12


RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 11, 2008 01:28 AM

ProxRocks Wrote:the resizing "squares" were not 'moveable' until i added the "left: 0px; top: 0px;" part...

This is interesting.
I'm able to drag resize on usatoday and at beside.ca with IE7 using the zip filter.
Are you sure your injecting the dragresize.css file that was in the zip?

If so, maybe you should attach your modified js file so I can take a look.

z12


RE: Drag-and-Drop Resizable Flash... - Graycode - Dec. 11, 2008 01:34 AM

Encouragement!

I admire your effors in what you are trying to accomplish with these Flash filters. It's certainly not simple or easy.


RE: Drag-and-Drop Resizable Flash... - z12 - Dec. 11, 2008 01:51 AM

I appreciate your encouragement. Smile!
It certainly has been a bit of struggle.
But win or lose, I'm learning quite a bit.
Right now, I'm still leaning towards win.

z12


RE: Drag-and-Drop Resizable Flash... - ProxRocks - Dec. 11, 2008 10:23 AM

(Dec. 11, 2008 01:28 AM)z12 Wrote:  
ProxRocks Wrote:the resizing "squares" were not 'moveable' until i added the "left: 0px; top: 0px;" part...

This is interesting.
I'm able to drag resize on usatoday and at beside.ca with IE7 using the zip filter.
Are you sure your injecting the dragresize.css file that was in the zip?

If so, maybe you should attach your modified js file so I can take a look.

z12

hmmm...
let me "try again" in a virtual machine clean-install XP/IE7, 'cause this is strange indeed...


RE: Drag-and-Drop Resizable Flash... - ProxRocks - Dec. 11, 2008 12:33 PM

definitely NOT working for me "as is"...

i've attached my copy of the out-of-the-box sidki config with my five filters for the toggle/resize (four you will find have [add] in the title, the fifth being "Toggle Flash Resize 1.3.r.1")...

the PrxObjToggle.js is also attached...
note that the [add] filters look for the .js (and the two untouched dragresize*.js) in a particular folder structure...


i'm hoping you can load this config in, z12, and crossing the fingers that the resize squares are NOT draggable for you... then we can point to "how" i'm injecting the .js files (or an error in PrxObjToggle.js, perhaps)...

keep me posted...


ps: just remembered, the attached config calls for .txt files, not .ptxt's... just fyi...