Note that there are some explanatory texts on larger screens.

plurals
  1. POStuck on an interactive map
    text
    copied!<p>SO, I am getting down to the wire on a deadline for an HTML/Flash hybrid interactive map, and it is not anywhere near finished. I keep getting close to solving each problem, only to discover more bugs. Most of them are quite obvious when you look at the work. I would like to at least squash the big bugs, so I am VERY appreciative of any suggestions. PLEASE HELP!</p> <p>Basically, I am using a Tooltip in two ways: <code>[0]</code> conventionally Flash-based onMouseMove (works fine), and <code>[1]</code> unconventionally targeting a point in the Flash movie from an HTML list. The Tooltip comes up fine, but is in the wrong place due to the Map moving &amp; scaling via TweenLite. There are also bugs with the onMouseOver/onMouseOut events, where the onMouseOver fires again onMouseOut, leaving the Tooltip visible when it should have an _alpha of 0.</p> <p>Link to the work: <a href="http://muralapts.com/test/neighborhood.php" rel="nofollow noreferrer">http://muralapts.com/test/neighborhood.php</a></p> <p>---- <strong>BIG ISSUE #1:</strong> HTML onMouseOver is firing again onMouseOut, effectively "turning back on" my Tooltip. Really buggy looking when Tooltip won't go away. No errors, therefore I can't figure out why onMouseOver is firing twice. Appears to be an HTML issue, not a Flash issue.</p> <p>---- <strong>BIG ISSUE #2:</strong> Tooltip triggered from HTML list on the left of page shows up in the wrong place due to parent clip being scaled &amp; moved with TweenLite. Tooltip is attached to _root, but is "targeting" a dot within several container clips (paths not specified below). I am trying to get the Tooltip position like this:</p> <pre><code>Tooltip._x = ( dot._x + parentClip._x ) * parentClip._xscale/100; Tooltip._y = ( dot._y + parentClip._y ) * parentClip._yscale/100; </code></pre> <hr> <h2><strong>INTERACTIVE MAP DETAILS:</strong></h2> <ul> <li><p>XML Content dynamically generates HTML and Flash map data <em>(id, name, link, blurb, category number</em> [Arts, Shopping, etc.]<em>, list number</em> [number within category] ). Uses Magic Parser to render HTML Output from the same XML file that Flash is using. </p></li> <li><p>HTML/Javascript talks to custom AS2 map component via External Interface</p></li> <li><p>Map Initially zooms in to 140% and moves to a certain point using TweenLite</p></li> <li><p>onRollOver of dots in Flash movie shows Tooltip with place name, changes dot color</p></li> <li><p>Zoom In/Out buttons set parent clip _xscale + _yscale and record with TweenLite onUpdate</p></li> <li><p>onMouseOver of list in HTML shows Tooltip w/ map data but in the WRONG PLACE, since Map has been zoomed &amp; moved with TWEENLITE. Using TweenLite onUpdate to record parent clip's scale + placement values.</p></li> <li><p>Changing color of dot from HTML works onMouseOver, is "sticky" onMouseOut (dots stay black)</p></li> </ul> <p>XML CODE: <em>(showing one category + listing, there are many more)</em></p> <pre><code> &lt;category title="Arts &amp;amp; Entertainment"&gt; &lt;loc id="artsWest_mc" name="Arts West" website="http://www.artswest.org/" cat="0" num="0"&gt; &lt;content&gt;&lt;![CDATA[The Junction's thriving community playhouse &amp;amp; art gallery.]]&gt;&lt;/content&gt; &lt;/loc&gt; &lt;/category&gt; </code></pre> <p>HTML CODE:</p> <pre><code> &lt;script type="text/javascript"&gt;&lt;!-- function showTooltip(btnID,catNum,listNum) { thisMovie("map").showTooltip(btnID,catNum,listNum); } function removeTip(btnID, catNum, isExternal) { thisMovie("map").removeTip(btnID, catNum, true); } function thisMovie(movieName) { if (navigator.appName.indexOf("Microsoft") != -1) { return window[movieName] } else { return document[movieName] } } //--&gt;&lt;/script&gt; &lt;a onMouseOver="showTooltip( btnID, categoryNum, listingNum )" onMouseOut="removeTip()"&gt;Arts West&lt;/a&gt;; </code></pre> <p>FLASH CODE: </p> <pre><code>public function showTooltip( bt:MovieClip, catNum:Number, listNum:Number ){ //MOVES MAP &amp; SHOWS TOOLTIP TweenLite.to(map_mc, 1, {_x:destX, _y:destY, ease:'easeOutQuad', onUpdate: trickTip, onUpdateParams: [bt, contentArr[catNum].childNodes[listNum].attributes.name] }); } public function trickTip( btnID:MovieClip, btnName:String ){ //CALLED FROM EXTERNAL INTERFACE theTip.theText.text = btnName; theTip._x = ((btnID._x + btnID._parent._x) * (map_mc._xscale/100)) - (theTip._width *.75); theTip._y = ((btnID._y + btnID._parent._y) * (map_mc._yscale/100)) + 20; TweenLite.to(theTip, .01, {_alpha:99, overwrite:1}); } public function removeTip( bt:MovieClip, catNum:Number ){ TweenLite.to(theTip, .01, {_alpha:0, overwrite:1}); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload