-
Senior Member
[FB3] Spritesheets to Flex Builder in a swc?
So I imported a few .pngs to my Flash library and set the linkage for them and compiled the .swc
Now when I try to use them from Flex, I get this weird behavior on them.
var bmd:BitmapData = new assets.dudesheet();
Gives a compiler error:
Incorrect number of arguments. Expected 2.
And when I check what dudesheet() wants inside with code completion it shows:
arg0:Number, arg1:Number
Now when I change it to
var bmd:BitmapData = new assets.dudesheet(1,1); or whatever, it works.
Any idea what's going on with this?
-
Senior Member
Why do you need to use a .swc? Why can't you just import the spritesheet at runtime, or in the FlexBuilder Library?
WIP-ZOMBIES
I love vegetarians! More meat for the rest of us!
-
FK founder & general loiterer
bitmapData objects reqire the two variables as they are "width" and "height",
it is pretty stupid though I agree as once the bitmapData object is created the width and height are correctlu set to the width and height of the bitmapData. I generally just go new assets.bitmapDataObject(0,0)
-
Senior Member
Ah of course. Sounds like a minor bug that it said arg0 and arg1 instead I guess.
Pazil, it's the best workflow I've seen yet. I'm not sure what you mean by FlexBuilder Library though. Can you explain it? I'm already using the SWC as a library.
It's nice to be able to add all assets in Flash and export it with code completion.
-
Senior Member
Oh,
What I meant by FlexBuilder Library was (in fact, I'm not sure about this, but it probably has it...FlashDevelop has it) that in FlashDevelop at least, there's a folder called lib where you can drag in images and graphics and such, and it acts much like the Library panel you have in the Flash IDE!
But whatever works for you! I personally don't have Flash CS3+, so I stick to bitmaps and FlashDevelop.
P.
WIP-ZOMBIES
I love vegetarians! More meat for the rest of us!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|