Preloader in AS2

This was suprisingly annoying, AS2 is out of control. As usual Kirupa came through in the end. Here's a snippet: this.createEmptyMovieClip("container", "100"); my_mc = new MovieClipLoader(); preload = new Object(); my_mc.addListener(preload); preload.onLoadStart = function(targetMC) { trace("started loading "+targetMC); container._visible = false; bar._visible = true; border._visible = true; pText._visible = true; }; preload.onLoadProgress = function(targetMC, lBytes,... Continue Reading →

HTMLtext linking to actionscript functions

AS3 You can do it with a link event: html text would be: <a href='event:moveUp'>UP</a> listener on the field: myHTML.addEventListener(TextEvent.LINK, linkHandler); function linkHandler(event:TextEvent):void { trace(event.text); // traces 'moveUp' } See this page if that's not enough: http://blog.circlecube.com/2008/12/portfolio/asfunction-texteventlink-tutorial-for-as3-flash-html-link-to-call-actionscript-function-tutorial/ In as2 it was a bit different, see below: AS2: You can use htmlText to call AS functions.... Continue Reading →

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑