Discussion:
Is it possible to set a Skins Screen Position?
(too old to reply)
rommel543
2006-08-15 20:25:02 UTC
Permalink
I am working on a skin for WMP and wondering if it posible to set the skins
position in the window (i.e. at the top of the screen) when the player starts?

I've looked at a few different Microsoft JScript items as well as going
through the WMP SDK and am not able to find anything that will set the screen
positioning. As well the player, theme, and view Elements do not support the
moveTo method and the event.screenX, screenY attributes are readOnly. I've
also looked at the Left and Top attributes on the View and they really have
no effect.

I'm kinda at a loss from here.
Bizzare
2006-09-12 09:49:00 UTC
Permalink
If you're looking for an easy fix, I'm afraid it's a non-starter mate.
I don't know of any built-in way of positioning the skin at set co-ords
on startup.

You might want to look at using theme.openViewRelative() in conjuction
with a full-screen view. Why?
Well, full-screen views are interesting because you know where the
top-left is (0,0) and what the width/height is (screen resolution
initially).

Therefore, you have an absolute reference point to work with when using
theme.openViewRelative ()

You can get a view to reposition to 0,0 by doing the following:

// Get the current screen resolution
intScreenWidth = event.screenWidth;
intScreenHeight = event.screenHeight;

// Sizing the view to the screen dimensions appears
// to reset the view's location (top, left co-ords)
// to 0,0 (which is verrrry handy!)
myView.width = intScreenWidth;
myView.height = intScreenHeight;

So if you have myView as the default view for the skin, resize it, then
use, say:

theme.openViewRelative('newView', 10, 100)

it *might* just open newView at absolute co-ords 10,100 (left, top).


Warning! I've never tried doing this, but you might as well give it a
whirl. WMP can be notoriously wacky when switching between views in the
same skin.
Still, you have nothing to lose except perhaps your sanity! :P

Cheers

Biz
Post by rommel543
I am working on a skin for WMP and wondering if it posible to set the skins
position in the window (i.e. at the top of the screen) when the player starts?
I've looked at a few different Microsoft JScript items as well as going
through the WMP SDK and am not able to find anything that will set the screen
positioning. As well the player, theme, and view Elements do not support the
moveTo method and the event.screenX, screenY attributes are readOnly. I've
also looked at the Left and Top attributes on the View and they really have
no effect.
I'm kinda at a loss from here.
Loading...