Author Topic: A couple of problems with links  (Read 786 times)

mosk

  • Jr. Member
  • **
  • Posts: 26
A couple of problems with links
« on: March 03, 2010, 06:16:03 pm »
1) I was able to get URL links working fine on pages within my flipbook, but NOT on the prepage.  Is there a different technique that's required to get links working either on a Prepage or on a Background for the entire FlipBook?

2) I've changed the color attribute inside of my lnk tag and that works fine.  I'm not seeing any color change when I hover over the link, however, even though I've assigned different values in my megazine file.  On hover, the link just becomes bolder and maybe gets a drop shadow applied.  I copied the code for lnk from one of the help files (either on this site or on the wiki).  Not sure what I'm doing wrong.  I tried both #ff0000 format and 0x990000 for hover colors, but neither gives any results.

I've pasted the relevant code from my megazine file below:  (created in Dreamweaver CS4 on Windows 32bit system in case that introduces any quirks).  Thanks for helping.

Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book SYSTEM "http://megazine.mightypirates.de/megazine2.dtd">
<book plugins="anchors, navigationbar, backgroundsound, batchpages, gallery, keyboardnavigation, links" bgcolor="0xCCCC99" pageheight="600" pagewidth="400">
    <pagebackground>
   <box background="image(../mangledweave/images/GiantFLA.swf)" width="pagew" height="pageh"/>
    <nav align="justify" position="left center" color="0x0000ff" hover="0xffffff" >
    <lnk url="http://www.yourgods.com/" target="_self"><![CDATA[<font face="serif" size="48">This Way to Yourgods.com</font>]]>
</lnk> 
</nav>
</pagebackground>

    <chapter>
<page stiff="true">
<img src="../mangledweave/images/FantasyCoverFront.jpg"/>
</page>
<page>
<img src="../mangledweave/images/MosesInsideCovers.jpg"/>
<nav align="left" position="top left" color="0x007700" hover="0x110000">
  <lnk url="http://www.yourgods.com/" target="_self"><![CDATA[<font face="serif" size="48">Link to Yourgods.com</font>]]>
</lnk> 
<lnk url="http://www.blender.org/" target="_self"><![CDATA[<font face="serif" size="48">Link to Blender</font>]]>
</lnk>
<lnk url="http://www.yoursteroids.com/" target="_self"><![CDATA[<font face="serif" size="48">Learn the risks of anabolic steroids</font>]]>
</lnk>
</nav>
</page>

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1985
  • MegaZine3 Developer
    • MegaZine3
Re: A couple of problems with links
« Reply #1 on: March 05, 2010, 08:54:35 pm »
1) The background / pagebackground content does indeed behave differently from pages / page content, as the background is plain ASUL, whereas the book content is not ASUL at all. Nonetheless, linking should work the same, using the url attribute - except that you cannot use the "anchors:" protocol (i.e. set internal links using "anchor:someanchor"); a workaround for that is to use the JavaScript API, doing something like this: "javascript:MegaZine.gotoAnchor('someanchor');".
Regarding linking elements in the background / pagebackground, also see http://www.megazine3.de/wiki/index.php/AbstractAsulObject#url

2) Indeed, nav@hover is bugged at the moment. Will be fixed in the next version.
« Last Edit: April 20, 2010, 02:46:33 am by Florian Nücke »
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.