Welcome, Guest
Want to take part in these discussions? Sign in if you have an account, or apply for one below
-
- CommentAuthorDistd
- CommentTimeJun 4th 2008
Hi everyone, I just started using Flint particle system api and I might say it's awesome. I'm currently trying to figure out how to use ImageClass properly, how would I go about using an exported movie clip (in Flash cs3) as particles? I'm trying to pass it down like this
emitters[index].addInitializer( new ImageClass(testParticle) );
But it's not working, I'm getting "Cannot access a property or method of a null object reference." error instead. I know I'm probably make some awfully simple mistake, but I'm relatively new to Flash so I'm not sure what's going on.
p.s. Yes I looked at the examples, but they seem to be using a different way of embedding images, I don't quite get it either. -
- CommentAuthorRichard
- CommentTimeJun 5th 2008
It sounds like it's not finding your image class. testparticle should be the class name of your exported image - this may or may not be the same as the name in the library, it depends what you've set as the class name in the linkage.
The examples on the website use meta-tags to embed resources - this is how it's done in Flex. In the svn repository, all the examples have both Flex and Flash versions. Take a look at the Flash version of the Flocking example to see the use of an embedded image as a particle. You can either check out the svn repository from http://flint-particle-system.googlecode.com/svn/trunk/, or browse it at http://code.google.com/p/flint-particle-system/source/browse. The example you need is at trunk/trunk/examples/Flocking/Flash. -
- CommentAuthorericr
- CommentTimeJun 5th 2008
The examples on the website use meta-tags to embed resources - this is how it's done in Flex.
I figured that's what was happening there. I've tried locating documentation for that syntax but can't find anything about it.
This is of particular interest because I'm setting up a dev environment based solely on the Flex SDK and Flash Develop and would like to understand how to embed objects directly into the project.
By the way, FlashDevelop has added Flash Player 10 (beta) support with code completion. This includes the new typed Vector object! Check it out here. (This is reason two that I'm setting up the FD+FSDK environment... ;) ) -
- CommentAuthorDistd
- CommentTimeJun 9th 2008
Thanks a lot Richard, you're awesome just as your wonderful api is. Everything's working now, though I'm not sure what was the reason, seems like it was an error on my side.
1 to 4 of 4
