I'm doing my first serious-ish, large-ish scale project in AS3, so I'm trying to figure out some approaches that are probably different than the strategies I would have used in AS2.
I have a catalog of events (past and upcoming) and some general resources — this is an internal learning site. Users can filter the catalog in several different ways and/or search for terms in the descriptions. The first pass with the filter or search brings up a list of shorted descriptions and previews. From there the user can click a button to go directly to a recorded presentation, website, whatever the resource is — or — they can click another button to read a more in depth description of the content.
So there will be these long lists of things with many buttons (BTW, these aren't actual buttons, they are movieclips with button like behavior) and the list will change and be regenerated many times. I'm trying to figure out how best to handle the buttons.
In AS2 world I would have added a onRelease handler to each button and then handled it that way.
With AS3 I'm wondering:
I've experimented with these things in AS3 over the years, but never had to put it to quite as much practice as now. So if anybody has advice on how to approach this project I would appreciate it.
i would create a class that extends the movieclip class. if you have a movieclip in your fla library that you want to use, assign it to that class.
in the class file add all the code needed by that movieclip button. for example, the event listener, the listener function the text the it should display, enable its buttonMode property, probably disable mouseChildren etc.
to do that you will need to pass data to your class (like the text to display), maybe a url or something else that the button will use in its listener function etc.
Europe, Middle East and Africa