Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

[AS2] Scaleform Buttons Question

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [AS2] Scaleform Buttons Question

    I haven't given this much thought until just now, mistake on my part.

    If you plan on having a huge amount of buttons to represent lots of different types of troops, is it better to create individualized buttons / unit type or create all assets in one button and just flip through them with gotoAndStop() in AS?

    Scenario:
    - Assuming 145 different types of units

    Would it be better to create 145 different buttons within the flash file?

    OR

    Would it be better to create 1 button and inside of it's own onDown, onUp and onOver have 1 frame for each unit, then inside the _root assign event listeners for the different states that switch the frame of this button to show the requested unit of those 145?

    Personal thoughts:

    145 buttons seems like a lot more resources would be used, but .... doing the gotoAndStop(unit) for every unit's onDown/onUp/onOver would put a strain on the .swf processing.

    Right now I'm doing the second method I mentioned and it "feels wrong".

    Which of the two methods would you use if you had to do that and why?
Working...
X