It is currently March 29th, 2024, 10:49 am

Scaling and placing an image

Get help with creating, editing & fixing problems with skins
User avatar
qwerky
Posts: 182
Joined: April 10th, 2014, 12:31 am
Location: Canada

Re: Scaling and placing an image

Post by qwerky »

jsmorley wrote: February 18th, 2019, 1:42 am I think you are close.

Try this:
Excellent, thank you.
I added the variable SiteUpdateRate=20, so it isn't trying to hit the web every zero seconds... That would be spectacularly unsuccessful.
Yes, sorry, forgot to copy that variable to the test skin.
I removed the *escapes* from the action where you had them, as they are not needed, and just confuse WebParser. You really can't embed escapes inside of nested variables that way. I'd have to chew on it, but I won't, as they aren't needed...
Done.
I put back the OnUpdateAction.
Done.
I removed the mouse over actions temporarily, as I have no idea what they are doing other than making the image jump around.
Yes, each of those lines was missing the final !SetOption line. They should look like this:

Code: Select all

MouseOverAction=[!SetOption mtrSatImage X "(#skinRight#-1-#imageWidth#)"][!SetOption mtrSatImage W "#imageWidth#"][!SetOption mtrSatImage H ""]
MouseLeaveAction=[!SetOption mtrSatImage X "(#skinRight#-1-#thumbWidth#)"][!SetOption mtrSatImage W "#thumbWidth#"][!SetOption mtrSatImage H "#thumbHeight#"]
So when moused over, the thumbnail expands to a large size image, keeping the same top and right edge, and when the mouse leaves, the image contracts back to thumbnail size.

This now is working to rotate through the images using a single WebParser image download measure, rather than one for each image. The advantage is that when the number of image URLs is changed, all that is required is to update a single variable, rather than to add or remove WebParser measures.

However, as you pointed out, each time the image is updated, the new image needs to be downloaded all over, since now only the most recent is cached. So it appears that a decision has to be made between slower rotation, versus multiple WebParser measures.

If multiple WebParser measures are chosen, then it seems that the finish action FinishAction=[!EnableMeasureGroup groupSatImage][!UpdateMeasureGroup groupSatImage][!UpdateMeter mtrSatImage] would need to be on every one of the image-download WebParser measures, correct?