The Un-Official Proxomitron Forum

Full Version: Drag-and-Drop Resizable Flash...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8
I grabbed the zip and I'll check it out, but I'm not too concerned at this point.
Right now I'm doing some event testing with IE.

IE7 seems to handle mouse events like IE6.
Basically, IE does not play nice with the tfr filter and resize script at all.
The problem is events don't bubble up past the flash object.
The good news is that I attached a mousemove to the object and the event handler caught it.
So the first problem is to figure out which browsers handle what events and when.
The next hurdle will be css.

The css will effect the resize calcs, but more importantly, how the browser displays the flash.
Forcing the flash container to position:absolute can really screw up the page layout.
Maybe there's a way for js to "see" if the layout will get hosed and fix it, but I don't know how.
Without absolute positioning, that rules out moving the flash all over the screen via a drag.
For now, "moving" is going to the back burner. I'm going to focus on resizing.

It's pretty clear the current resize script has an issue with IE when flash is in the container.
I'll probably end up rolling my own resize js. I think it will be easier.
At this point, I'm about half way there anyhow. Smile!

I'll keep you posted.

z12
(Dec. 11, 2008 07:20 PM)z12 Wrote: [ -> ]So the first problem is to figure out which browsers handle what events and when.

This mouse events test page may provide some insight: http://dunnbypaul.net/js_mouse/
Or this article might be useful: http://www.devsource.com/c/a/Techniques/...avaScript/
Just to share what i didn't know 15 minutes ago: IE8 beta 2, will support most of the standards.
I'm not sure if they are speaking only about CSS, or they are taking in count also javascript, etc... anyway it sounds very promising.
So hope if your code works for firefox, it will work for IE8 too... Big Teeth
I did a search for you and found a very good link

Go to events here: http://www.quirksmode.org/dom/compatibility.html

If you want i can see some pages in IE6, PM a .cfg prepaired and the links for testing Wink
Thanks for the links guys, sorry about the late reply.

Anyway, here's an update, finally.
The filters got move and resize capabilities, works with more browsers and is easier to install.
Basically, just stick the web filter in, make a tweak or two then inject the js and css files.

All in all, with the browsers I tried it on, it seemed most responsive with firefox.
I mainly work with Firefox and don't know any IE or Opera tricks. Just saying.
But with all the browsers, as the flash file size increased, responsiveness decreased.
Tested with IE7, Firefox/2.0.0.18 and Opera 9.26

If you try it, let me know how, or if, it works.

z12
totally wicked AWESOME!!!

many, MANY thanks... you da man!
I'm glad this version seems to be working for you.
I had my fingers crossed when I posted it. Smile!

I figured I might as well toss it out and see what happened.
No doubt we'll find some issues but it's a start.

z12
i'll post any issues encountered, but "so far, so good"...
even works on YouTube, which was "extremely" problematic on my test versions...
People giving a try to this filter, in "tfr_1_readme.txt" it says
<link rel="stylesheet" type="text/css" media="all" href="http://local.ptron/z12_htm/tfr_.css" />\r\n
it must be
<link rel="stylesheet" type="text/css" media="all" href="http://local.ptron/z12_htm/tfr_1.css" />\r\n
to load correctly the css file

----
It breaks my youtube... maybe the reason is for (^$TST(keyword=*.flash.*)), i don't know what is it for...
For my, the filter matches 4 times in http://s.ytimg.com/yt/js/base_all_with_bidi-vfl69372.js
correct, you should see four matches...

the (^$TST(keyword=*.flash.*)) is for sidki-based configs, since it's a "not-match", the filter should work for you "as-is" as you won't have that 'keyword' "embedded" within your URL...


"where" you insert the .css and .js is important...

here's how i'm "injecting" them:
Code:
Name = "Header Top Inject: User CSS - Toggle Flash Resize {z12} [add]"
Active = TRUE
URL = "$TYPE(htm)"
Limit = 16
Match = "(^(^<ProxHdrTop>))$STOP()"
Replace = "<link rel="stylesheet" type="text/css" media="all" href="http://local.ptron/My_HTML/z12_HTML/tfr.css" />\r\n"

Name = "Header Top Add: User JS Code - Toggle Flash Resize {z12} [add]"
Active = TRUE
URL = "$TYPE(htm)"
Limit = 16
Match = "(^(^<ProxHdrTop>))$STOP()"
Replace = "<script type="text/javascript" src="http://local.ptron/My_HTML/z12_HTML/tfr.js"></script>\r\n"

there are "specific" places these "need to be" for sidki's config, hard tellin' "where" they need to be for your config...
Thanks PR, i went to Sidki's added _1 to your filters and the same than with my config...

FF3: Don't toggles in youtube. Other flashes objects toggles well.
hope you remembered the number one rule, "clear your cache" Big Teeth

i can't speak for FF3, i 'have it', but my portable Firefox (and Opera) are "Flash-less", no .dll copied into their plugin dir's...


i can double-check with FF3 if you would like me to...
Yes, yes, all the times were refreshed pages, but don't worry PR Wink
Working fine so far in Firefox 3.0.4, Linux, including nice results on YouTube.
Haven't tried running this with Firefox 3.0.4 in WinXP yet.
Great work! Thank you.
Z12 - Very nice, I admire the work you did in the javascript. Hail
lnminente Wrote:it must be
Code:
<link rel="stylesheet" type="text/css" media="all" href="http://local.ptron/z12_htm/tfr_1.css" />\r\n
to load correctly the css file

Your quite right, my bad.
And here I thought I fixed all the typo's in the read me file. Smile!
Of course, you can put these files in any local.ptron directory, as long as proxo can find them.

lnminente Wrote:It breaks my youtube...

My first guess would be this:
Code:
(($TST(script=*))$SET(1=\\")$SET(2=\\)|$SET(1=")$SET(2=))

This code checks if your "inside" script. It's specific to sidki's config.
If your not using sidki's config this would cause replacement text problems.
It would most certainly will break things if the filter matches in js.
I think you use a different variable to test if proxo is parsing "inside" script.
Use your variable name instead.

I should have thought to include some notes or code for people not using sidki's config in the zip file.

Here's the filter I use for detecting if proxo is parsing "inside" script in html:
Code:
[Patterns]
Name = "Mark: Script Tags 3.1{R}"
Active = TRUE
URL = "$TYPE(htm)(^$TYPE(js)|$TYPE(vbs))"
Limit = 256
Match = "("
        "</script >$SET(bScript=)|"
        "<script(\s|>)$SET(bScript=1)"
        ")&(^?)"

Then, my tfr filter uses this test:
Code:
(($TST(bScript=1)|$TYPE(js)|$TYPE(vbs))$SET(1=\\")$SET(2=\\)|$SET(1=")$SET(2=))

I put the above filter near the bottom of my web filters, after script specific filters.
This filter should not be near the top.
Otherwise it could set the variable and some other filter could delete the script later on.
In that case, the variable may never get reset, messing up the html and causing other problems.

Graycode Wrote:Very nice, I admire the work you did in the javascript.

Thanks, there were times I thought I might never get it to work.
In the end, I decided to use a fair bit of code from Angus Turnbull, TwinHelix Designs.
I had to tweak it around for proxo and flash, but I think it turned out pretty good.
I'd like to do more work on the script so it could be used to move other objects.

Thanks to all for reporting back.
I guess there are quite a few people using sidki's filter set as they are not having lnminente's problems.
Anyway, keep posting any problems.

z12
Pages: 1 2 3 4 5 6 7 8
Reference URL's