I finally found a reasonable solution for what I wanted to do, so I wish to share that with all of you now.
If you scroll back up and read our previous posts on this issue, you will see that I have been wanting to prevent the automatic shrinking feature in Walter’s action, which shrinks the size of the popup graphic if you make your browser window too small. The problem is that if you have a graphic with text in it, that text can become unreadable.
When I originally asked if Walter could remove that auto resizing feature, Walter replied as follows:
“If you remove this feature, there won’t be much of anything left to the Action… Plus, it would be a usability nightmare on the iPad.”
I honestly didn’t care much about Walter’s “there wouldn’t be much left” reason, but I did give thought to his iPad comment.
After being frustrated with this for so many weeks, I put my thinking cap on today to see if I couldn’t single-handedly solve my own problem. I was able to. My solution is basically a hack of Walter’s Action but it works. Here’s what I did:
-
I right-clicked on Walter’s “ScriptyLightbox2” action to make it “Show Contents.”
-
I then dug down into the folders until I found “ScriptyLightbox2.fwaction,” and I then opened that file in TextWranger.
-
Within TextWrangler, I scrolled through the file and didn’t make much sense of it all (since I’m by no means “a coder”) but I did take note of the section entitled “Element.addMethods.” In there I could see Walter was using math to resize something, and I logically deduced this to be the “Auto Resize” code.
-
I then noted the following two lines in that section of the code:
if (width > (screen.width * .8)){
if(element.getHeight() > (screen.height * .8)){
- I then Previewed one of my Freeway web pages in the browser to confirm that indeed when I shrank the browser window width to less than 0.8, my popup graphic was getting resized. But rather than eliminate this code altogether, which would be a pain in the booty and cause problems with the iPad, I merely changed those two lines to the following:
if (width > (screen.width * .98)){
if(element.getHeight() > (screen.height * .98)){
-
I then noticed that the Freeway Action icon vanishes in the Finder, so I used FileBuddy to examine the file. Sure enough, because I had saved the file in Text Wranger, it added File TYPE code. I deleted that out and left the CREATOR code intact, and the icon came back.
-
I then removed the Action on my Freeway page, reapplied it, then tested in the browser. The end result is perfect for me!
The reason I consider the value of 0.98 better than 0.8 is because if someone browsing my site likes to keep their browser windows very narrow width-wise, they almost always will keep the window just a tad wider than the width of the page (otherwise you wouldn’t be able to see the entire page). But at Walter’s default setting of 0.8, the browser window would have to be quite a bit bigger than the width of the actual page you make in Freeway, and people who like to keep their browser windows narrow probably wouldn’t widen it that big. In other words, for those folks, my graphics would constantly be getting automatically sized smaller, which is not what I want.
So by changing 0.8 to 0.98 in those two places, I can view my page in the browser and decrease the browser window width to just very slightly larger than the page width, and my graphics still won’t get resized.
For those of you whose graphics are much narrower than the width of the Freeway page itself, this really isn’t an issue. But in my case, the graphics were just a tad wider than the page itself, so they were getting resized too often when I narrowed the browser window.
I hope all this makes sense. And again, I am not a coder. This is a change that most any of you can make to the action if you want. It’s not hard if you follow my advice above.
actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options