So I found a nifty little video that shows how to use AS2.0 to make a sprite sheet that can then be used to allow flash graphics in XNA. However, after copying the code it doesn't seem to want to work for me.
Here is the video http://www.youtube.com/watch?v=UfZuBY_DAB4
Here is the code:
And I will provide a copy of the file I was working with.Code:cellWidth = 100; cellHeight = 150; max = 10; for(i = 1; i<=4; i++) { mc = _root.attachMovie("hero", "hero" + i._root.getNextHighestDepth()); mc._width = guy._width; mc._height = guy._height; mc._x = (i-Math.floor((i-1)/max)*max)*cellWidth + 100; mc._y = Math.floor((i-1)/max)*cellHeight + 100; mc.gotoAndStop; }
I was applying the code to the Weapon Fire movie clip in the project file (it's the only one with any type of animation), but it didn't work. I tried applying it to the timeline as well, that didn't work either. If somebody could tell me what I'm doing wrong I'd appreciate it :P


Reply With Quote
