Note that there are some explanatory texts on larger screens.

plurals
  1. POAS2: Disabling links in hidden Dynamic Text Fields & MovieClip children
    text
    copied!<p>Greetings!</p> <p>I am working on an AS2 website with MovieClips for pages that swap depth when navigation is clicked. Text content is pulled dynamically from an external XML file &amp; styled via CSS, including links (HTML/CDATA). My problem is this:</p> <p>When a page is hidden behind another via <code>swapDepths()</code>, HTML links within the hidden page are still clickable with the hand cursor. I have tried mc.enabled=false on the contents' parent clips, but it has no effect on the dynamic text string. Does anyone know how to disable CDATA links with Actionscript 2? </p> <p>The same question goes for MovieClip children in general: how does one disable movieClips within a parent clip in AS2 without hard coding instance names?</p> <p>Thanks in advance for any suggestions!</p> <p>Here is the code where I control my page swapping:</p> <pre><code>// class code.Startup() : page_arr = new Array(); // references clips laid out in the IDE page_arr = [ ['home', pages.homePage_mc], ['apartments', pages.apartmentsPage_mc], ['building', pages.buildingPage_mc], ['neighborhood', pages.neighborhoodPage_mc], ['press', pages.pressPage_mc], ['team', pages.teamPage_mc], ['retail', pages.retailPage_mc], ['office', pages.officePage_mc], ['contact', pages.contactPage_mc] ] // class code.Navigation() : private function showPage(num):Void { turnOffAllPages(); if(siteFirstRun == true){ prevPageObj = code.Startup.getInstance().page_arr[0][1]; //defaults to homepage, already showing currPageObj = code.Startup.getInstance().page_arr[num][1]; //sets currPageObj to whatever page was chosen with nav siteFirstRun = false; } else { if(currPageObj !== prevPageObj){ prevPageObj = currPageObj; } currPageObj = code.Startup.getInstance().page_arr[num][1]; } TweenLite.to(code.Startup.getInstance().page_arr[num][1], .25, {_alpha:100, ease:'easeOutQuad', delay:.25}); if(prevPageObj !== undefined){ currPageObj.swapDepths(code.Startup.getInstance().pages.getNextHighestDepth()); } currPageObj.copy_mc.enabled = true; } // Each page_arr clip contains a 'copy_mc' instance into which XML content is fed. These are what I need to target! private function turnOffAllPages():Void{ for(i=0; i&lt;code.Startup.getInstance().numPages; i++){ code.Startup.getInstance().page_arr[i][1].copy_mc.enabled = false; // disable pages to avoid rolling over hidden links TweenLite.to(code.Startup.getInstance().page_arr[i][1], .2, {_alpha:0, ease:'easeOutQuad'}); } } </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