Author Topic: best way to assign a color to an area?  (Read 1879 times)

jeremyBass

  • Jr. Member
  • **
  • Posts: 49
best way to assign a color to an area?
« on: October 06, 2009, 04:59:49 pm »
Hello, so I have to make a buch of links.. so I thought that it's be way quick to just add a style to it with like the background set to red then I could just remove the back ground color so I could flip them on and off to edit quicker... Hope that makes sense...


example:
Code: [Select]
<page foldfx="1">
<img width="740" height="960"  hires="src/pageTurner/3.jpg" >
<src lang="en">src/pageTurner/3.jpg</src>
</img>
<area left="300" top="210" width="300" height="15" url="http://98.129.105.20/Travel-Tools/view-the-discover-guide.html#/18" overlay="none" target="_self" title="Arts & Culture"  style="areaBox"/>
<area left="300" top="235" width="300" height="15" url="http://98.129.105.20/Travel-Tools/view-the-discover-guide.html#/20" overlay="none" target="_self" title="Destination Guide" style="areaBox"/>
<area left="300" top="250" width="300" height="15" url="http://98.129.105.20/Travel-Tools/view-the-discover-guide.html#/24" overlay="none" target="_self" title="Events Calendar (rodeos, festivals, etc)" style="areaBox"/>
</page>


edit... soory I had a typo in the name lol
« Last Edit: October 06, 2009, 05:11:32 pm by jeremyBass »

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1989
  • MegaZine3 Developer
    • MegaZine3
Re: best way to assign a color to an area?
« Reply #1 on: October 06, 2009, 09:19:03 pm »
Although I don't quite get what you're saying, changing the color of an area can be achieved using the overlay attribute. If you're already playing with v2, don't forget to load the overlays plugin for that.
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.

jeremyBass

  • Jr. Member
  • **
  • Posts: 49
Re: best way to assign a color to an area?
« Reply #2 on: October 06, 2009, 09:27:16 pm »
well this is what I have loaded...

plugins="anchors, batchpages, elementids, javascript, keyboardnavigation, links, navigationbar,  overlays, slideshow, swfaddress, titles, Gallery "

(too which I need to figure out what I can drop off...)

The idea is this.. I want to turn on the area color when I'm making them... so I can see for sure where the xy and wh need to be... then after I'm done I just remove the color.. so I guess the point is this... I'm aiming to have one part that colors all of these area links... this way I turn them all on or off with just a quick small change... Hope that make better sense.. I've looked all over the wiki but have not found what I need just yet :D

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1989
  • MegaZine3 Developer
    • MegaZine3
Re: best way to assign a color to an area?
« Reply #3 on: October 06, 2009, 09:32:59 pm »
Ah, ok. Well, with "one quick change" could be impossible depending on the situation and what you'd call quick ;)

Either way, you'll have to use overlays, so add something like overlay="color(0.75,0.75,0xff00ff)" to your areas.
If you're not using overlays anywhere else, you could just remove the overlays plugin from the plugins list to disable the coloring. Otherwise the only possibility will propably a search and replace through the book definition... try using some "unique" color to make it possible to search for the whole attribute and replace it with overlay_disabled="..." or something, then you can swap replace whenever you need to.
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.

jeremyBass

  • Jr. Member
  • **
  • Posts: 49
Re: best way to assign a color to an area?
« Reply #4 on: October 06, 2009, 09:40:11 pm »
you know that will work just fine .. I'll just do a regex and pull them all or add them all as I need... thanks ... this will work just fine... :D

jeremyBass

  • Jr. Member
  • **
  • Posts: 49
Re: best way to assign a color to an area?
« Reply #5 on: October 06, 2009, 09:50:25 pm »
ok.. I thought would work... if I go

Code: [Select]
<page foldfx="1">
<img width="740" height="960"  hires="src/pageTurner/3.jpg" >
<src lang="en">src/pageTurner/3.jpg</src>
</img>
<area left="300" top="210" width="300" height="15" overlay="color(0.75,0.75,0xff00ff)" url="http://98.129.105.20/Travel-Tools/view-the-discover-guide.html#/18" target="_self" title="Arts & Culture"/>
<area left="300" top="235" width="300" height="15"  url="http://98.129.105.20/Travel-Tools/view-the-discover-guide.html#/20" overlay="none" target="_self" title="Destination Guide" />
<area left="300" top="250" width="300" height="15" url="http://98.129.105.20/Travel-Tools/view-the-discover-guide.html#/24" overlay="none" target="_self" title="Events Calendar (rodeos, festivals, etc)"/>
</page>


I do see it on the one... but If I go with


Code: [Select]
<page foldfx="1">
<img width="740" height="960"  hires="src/pageTurner/3.jpg" >
<src lang="en">src/pageTurner/3.jpg</src>
</img>
<area left="300" top="210" width="300" height="15" overlay="color(0.75,0.75,0xff00ff)" url="http://98.129.105.20/Travel-Tools/view-the-discover-guide.html#/18" target="_self" title="Arts & Culture"/>
<area left="300" top="235" width="300" height="15" overlay="color(0.75,0.75,0xff00ff)"   url="http://98.129.105.20/Travel-Tools/view-the-discover-guide.html#/20" overlay="none" target="_self" title="Destination Guide" />
<area left="300" top="250" width="300" height="15"  overlay="color(0.75,0.75,0xff00ff)" url="http://98.129.105.20/Travel-Tools/view-the-discover-guide.html#/24" overlay="none" target="_self" title="Events Calendar (rodeos, festivals, etc)"/>
</page>


nothing shows after the perloader... very odd... I'll keep trying

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1989
  • MegaZine3 Developer
    • MegaZine3
Re: best way to assign a color to an area?
« Reply #6 on: October 06, 2009, 10:08:05 pm »
You've got an overlay="none" in there as well (the second and third). Having two attributes of the same name is invalid XML and Flash throws an error parsing it -> nothing can be displayed.
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.

jeremyBass

  • Jr. Member
  • **
  • Posts: 49
Re: best way to assign a color to an area?
« Reply #7 on: October 06, 2009, 10:10:20 pm »
 ;) well don't I look foolish there lol.. thanks..

necrop4

  • Newbie
  • *
  • Posts: 6
best way to assign a color to an area when doing over?
« Reply #8 on: October 27, 2011, 12:57:43 am »
I want to change the over color (default is white) when I pass the mouse over an Area it's possible?

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1989
  • MegaZine3 Developer
    • MegaZine3
Re: best way to assign a color to an area?
« Reply #9 on: October 29, 2011, 06:13:14 pm »
No, it's not. You could try the somewhat experimental (was more of a proof of concept than anything) AsulObject element, and create a button in there. I.e. something like this
Code: (xml)
  1. <page>
  2.  <asulobject>
  3.    <asulxml>
  4.      <button>...</button>
  5.    </asulxml>
  6.  </asulobject>
  7. </page>
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.