[Xerte] Re: change background colour to white?
Ron Mitchell
ronm at mitchellmedia.co.uk
Tue Jan 25 17:14:07 GMT 2011
Hi Julian
quick question - what property can I check for to detect exactly what theme
is chosen by the user? Can't seem to find it.
Cheers
Ron
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Ron Mitchell
Sent: 25 January 2011 12:17
To: 'Xerte discussion list'
Subject: [Xerte] Re: change background colour to white?
That's great Julian many thanks and the sample is really useful. I can see
that most of the time drawing the gradient would be best but also the event
detection could be used to load different images. Great stuff.
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 25 January 2011 11:13
To: Xerte discussion list
Subject: [Xerte] Re: change background colour to white?
Sorry, sample is attached,
From: Tenney Julian
Sent: 25 January 2011 11:12
To: 'Xerte discussion list'
Subject: RE: [Xerte] Re: change background colour to white?
rootIcon.onThemeChange
then you can draw the gradient yourself using beginGradientFill() and pick
the styles out for the gradient colours. beginGradientFill I remember as a
bit tricky to get your head around.
Does this which works OK - play with the aprms in beginGradientFill to
change the ratio, alphas etc.
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Ron Mitchell
Sent: 25 January 2011 10:57
To: 'Xerte discussion list'
Subject: [Xerte] Re: change background colour to white?
Brilliant thanks! The solution works great!
I tried loads of stuff too before posting my message below and kinda glad it
wasn't something stupid I was doing. ;-)
I'm using this in this instance to put a gradient behind a logo on the title
bar. Which works great. http://130.88.204.160/itq/xerte/play_11
Ideally I should add some conditional code to hide the gradient if a user
changes the theme to something other than the default and then show again if
the user changes back to the default. Is there an existing listener/function
I can use for that?
Cheers
Ron
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 25 January 2011 10:02
To: Xerte discussion list
Subject: [Xerte] Re: change background colour to white?
Curious. I tried it in a blank rlo and couldn't get it to work either. I
have no idea why and I expected it to. I've debugged everything and see that
rootIcon exists, that loadMovie is one of it's methods, the path is correct,
the image exists and the movie clip is being created, because I drew a red
rectangle into it. So why won't it loadMovie()? loadMOvie works everywhere
else. Timing issue I guess, but even if I put the code under a button and
ran it, it wouldn't work. I'm stumped.
//SOLUTION - Using MovieClipLoader:
container = rootIcon.createEmptyMovieClip("container",99);
mcLoader = new MovieClipLoader();
mcLoader.loadClip(FileLocation + 'media/DSC_0137.JPG', container);
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Ron Mitchell
Sent: 24 January 2011 20:47
To: 'Xerte discussion list'
Subject: [Xerte] Re: change background colour to white?
I've tried this even with a brand new non template LO and still can't get
anything to load.
Should this work in the setup icon? e.g.
http://mitchellmedia.co.uk/img/tgrab-j8.png
Wasting too much time and can't spot what's wrong. There was a typo in the
example below but I've corrected that and still can't get the image to load.
:-(
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 24 January 2011 16:04
To: Xerte discussion list
Subject: [Xerte] Re: change background colour to white?
Does rootIcon exist when that code executes? If it's in the first script
icon, rootIcon doesn't exist yet.
Use one of the init events (rootIcon.onInit), or put code in the entry
frame,
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Ron Mitchell
Sent: 24 January 2011 15:16
To: 'Xerte discussion list'
Subject: [Xerte] Re: change background colour to white?
no not sure it does - at least can't get it to work. :-(
On a slightly unrelated note but for the same installation ideally I need to
draw or load a gradient across the first part of the title bar. I've been
trying the following to load a png which I think is your code or a snippet
from the mailing list:
rootIcon.createEmptyMovieClip('myCustomGraphic',++rootIcon.levels);//creates
a new movie clip
rootIcon.myCustomFGraphic.loadMovie(templatePath + 'common/mygraphic.png');
//loads your graphic
rootIcon.myCustomGraphic._x = 0;
rootIcon.myCustomGraphic._y = 0; //positions the graphic
I've tried a fixed link to the graphic online and also FileLocation but the
graphic isn't appearing. Bound to be something stupid?
Cheers
Ron
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 24 January 2011 14:00
To: Xerte discussion list
Subject: [Xerte] Re: change background colour to white?
stageAlpha?
But not sure that exists.
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Ron Mitchell
Sent: 24 January 2011 13:53
To: 'Xerte discussion list'
Subject: [Xerte] Re: change background colour to white?
ah yes thanks Julian that works e.g. setting to 0xFFFFFF changes it to
white.
Is there any way it can be transparent?
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 24 January 2011 10:04
To: Xerte discussion list
Subject: [Xerte] Re: change background colour to white?
stageColour?
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Ron Mitchell
Sent: 21 January 2011 20:21
To: 'Xerte discussion list'
Subject: [Xerte] change background colour to white?
I'm sure we've discussed this years ago and I'm sure I've even done it but
can't remember or find where I have :-(
Where/how do I change the dark grey area around an 800x600 LO (e.g here
<http://mitchellmedia.co.uk/img/631ff65bea884616b54675bb87f3b42c.png> ) to
white or a different colour?
Cheers
Ron
This message and any attachment are intended solely for the addressee and
may contain confidential information. If you have received this message in
error, please send it back to me, and immediately delete it. Please do not
use, copy or disclose the information contained in this message or in any
attachment. Any views or opinions expressed by the author of this email do
not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110125/3d241756/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 40544 bytes
Desc: not available
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110125/3d241756/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 22854 bytes
Desc: not available
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110125/3d241756/attachment-0003.png>
More information about the Xerte
mailing list