ac
New Member
Posts: 11
|
Post by ac on Oct 21, 2014 17:19:36 GMT
Apologies if I'm missing something but I'm new here...
I'd like to take user input using an Option Input and, based on the choice made, change the colour of the screen background. I couldn't see how to do this in script, so I thought I could place a box at the back of the display instead and change the colour of that. However, I can't see how to do that either as there don't appear to be any script methods for shapes.
it it possible to achieve this effect? If so, how?
Many thanks in advance.
|
|
|
Post by Hippani on Oct 22, 2014 13:42:31 GMT
|
|
ac
New Member
Posts: 11
|
Post by ac on Oct 24, 2014 9:18:41 GMT
Thought as much! Thanks for responding anyway. The idea was to create a different coloured background to the screen for a quiz I use in my school: green background for green group, red for red group, etc. I built this in Flash a few years ago and simply run a copy for each group, changing the background colour as I set the quiz going. The hope was that I could move it relatively seamlessly to HTML5 and for inclusion on the school website if necessary.
I could duplicate the code in the timeline with different coloured backgrounds, but this is very messy. Could I do it by duplicating the shape (as a development of the stars "duplicate and delete" demo? I'm struggling to know where to start with that approach, though.
Thanks again.
|
|
|
Post by Hippani on Oct 24, 2014 9:28:50 GMT
You could have an image viewer, turn off auto play and then set different background. I've added to the suggestion list the idea of changing the colour of a box, which should be possible on all browsers.
|
|
|
Post by Hippani on Oct 24, 2014 13:14:40 GMT
OK, one of our dev guys decided to add this.
Add a HTML object, give it a script ID.
then use this new function.
HTMLSetColor("Script ID","#000000");
|
|
|
Post by Hippani on Oct 24, 2014 13:15:00 GMT
Note: You'll need to update your software to the latest version.
|
|
ac
New Member
Posts: 11
|
Post by ac on Oct 24, 2014 14:02:02 GMT
Thank you very much for this - it works perfectly. Incidentally, I found out that I could define 3 squares off screen, each a different colour and, after turning timeline off for each, was able to move and resize it as a background for the window. Your solution is, of course, much neater and quicker!
Many thanks again.
Andy
|
|