Re: [Flashcoders] RS-232 triggered by Actionscript
The flash player has no such feature. In fact, most modern OSes doesn't even let applications bitbang hardware ports directly. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] RS-232 triggered by Actionscript
Hi guys, You can do it with a simple Processing proxy. Here is a how-to (sorry, in french) : http://ressources.mediabox.fr/tutoriaux/flashplatform/realisations/arduino. 2010/9/28 Henrik Andersson > The flash player has no such feature. In fact, most modern OSes doesn't > even let applications bitbang hardware ports directly. > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] correct path
So I have a mc that has another mc inside of it... I have: var holder:Sprite = new Sprite(); holder.name = "holderMC"; addChild(holder); var childOne:childMC = new childMC(); childOne.name = "childOneMC"; holder.addChild(childOne); now childOne has a mc inside of it (let's call it "grandchild") I am trying to affect that mc from within a listener function... I have tried: holder.childOne.grandchild holderMC.childOneMC.grandchild holder.getChildByName("childOneMC").grandchild but keep getting errors - what am I doing wrong? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] correct path
Did you try: childOneMC.getChildByName("grandchild") ? You're already defining the variable childOneMC at the top level, so there's no reason to reach down into holder to get it. Just my 2¢, hth... .m On Tue, Sep 28, 2010 at 10:48 AM, Lehr, Theodore wrote: > holder.getChildByName("childOneMC").grandchild ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] correct path
Woops, that should be: childOne.getChildByName("grandchild") On Tue, Sep 28, 2010 at 11:20 AM, Matt S. wrote: > Did you try: > > childOneMC.getChildByName("grandchild") > > ? > > You're already defining the variable childOneMC at the top level, so > there's no reason to reach down into holder to get it. Just my 2¢, > hth... > > .m > > On Tue, Sep 28, 2010 at 10:48 AM, Lehr, Theodore > wrote: >> holder.getChildByName("childOneMC").grandchild > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] correct path
Misconception correction time! Read my article: http://www.actionscript.org/resources/articles/943/1/Actionscript-and-timelines/Page1.html ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] correct path
Actually I just realized that might not work, since it looks like the variable is declared locally within the function, not at the top of your class (although its hard to tell, is this on a timeline, or in a class?). So you'd probably have to do: this.getChildByName("holder").getChildByName("childOneMC").getChildByName("grandchild"); On Tue, Sep 28, 2010 at 11:21 AM, Matt S. wrote: > Woops, that should be: > > childOne.getChildByName("grandchild") > > On Tue, Sep 28, 2010 at 11:20 AM, Matt S. wrote: >> Did you try: >> >> childOneMC.getChildByName("grandchild") >> >> ? >> >> You're already defining the variable childOneMC at the top level, so >> there's no reason to reach down into holder to get it. Just my 2¢, >> hth... >> >> .m >> >> On Tue, Sep 28, 2010 at 10:48 AM, Lehr, Theodore >> wrote: >>> holder.getChildByName("childOneMC").grandchild >> > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Re: RS-232 triggered by Actionscript
You can do it with a simple Processing proxy. Here is a how-to (sorry, in french) : http://ressources.mediabox.fr/tutoriaux/flashplatform/realisations/arduino About time I used ces six ans de francaise. Thanks! RT ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] bounce object off tilted wall
Hi, I'm looking for information to help me learn how to bounce an object off another rotated object (or irregularly shaped object). I've already got basic collision detection working, and can bounce off straight horizontal and vertical shapes easily enough (blocks). I'm looking for info on doing that to an arbitrarily rotated block, or even a round shape, in a realistic way. I'd considered using a physics engine, but that seems like overkill in my case - I really just need the bounce logic. Any ideas or tutorials suggestions are appreciated. :-) A bonus would be information that helps me do that to data that isn't on the display list or DisplayObject derived. Thanks, Kevin N. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] bounce object off tilted wall
I'd look in this direction: http://www.google.com/search?q=actionscript+3+physics+library Hope this helps. Cheers. -- Carl Welch http://www.carlwelch.com On Tue, Sep 28, 2010 at 10:40 AM, Kevin Newman wrote: > Hi, > > I'm looking for information to help me learn how to bounce an object off > another rotated object (or irregularly shaped object). I've already got > basic collision detection working, and can bounce off straight horizontal > and vertical shapes easily enough (blocks). I'm looking for info on doing > that to an arbitrarily rotated block, or even a round shape, in a realistic > way. > > I'd considered using a physics engine, but that seems like overkill in my > case - I really just need the bounce logic. > > Any ideas or tutorials suggestions are appreciated. :-) > > A bonus would be information that helps me do that to data that isn't on > the display list or DisplayObject derived. > > Thanks, > > Kevin N. > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] bounce object off tilted wall
I'd thought of that, but was hoping to something with less weight - I think it's Matrix/Vector math I need to learn about. Just to continue down this path - anyone have a recommendation for the most appropriate engine for mobile? Is there a physics engine that operates on non-screen objects which would allow me to apply that data to my scene in the RENDER event (this seems to be important on GPU accelerated AIR for mobile). In other words, I don't want a physics engine that updates the display list itself, I want to be able to grab the data and update the scene myself. Box2D Alchemy looks good, but I'd love some suggestions. :-) Kevin N. On 9/28/10 1:52 PM, Carl Welch wrote: I'd look in this direction: http://www.google.com/search?q=actionscript+3+physics+library Hope this helps. Cheers. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] bounce object off tilted wall
Hi, You should be able to work out your angle of reflection in a similar way as you do for horizontal collision. 2 billiard balls - collision detection is easy - if the distance between the centre's is less than 2 x the radius you have a collision. I think there is some optimisation you can do for this - check out some tutorials / books. Keith Peter's "Making Things Move" book is really good. Jobe Makar's Flash MX Game Programming Demystified explained the basic concepts nicely too. For the angle of reflection - it's to do with the angle between the "wall" and the ball. If you assume the "wall" (for one of your billiard balls) is at right angles to the direction of the billiard ball, you have a starting point - again, there is some stuff you can do with trig in here. There are lots of tutorials online, so I would Google "as3 physics collisions" or similar. For other optimisations - it's possibly not worth updating stuff that's not on stage until you put it back - is that possible? Glen On 28/09/2010 18:40, Kevin Newman wrote: Hi, I'm looking for information to help me learn how to bounce an object off another rotated object (or irregularly shaped object). I've already got basic collision detection working, and can bounce off straight horizontal and vertical shapes easily enough (blocks). I'm looking for info on doing that to an arbitrarily rotated block, or even a round shape, in a realistic way. I'd considered using a physics engine, but that seems like overkill in my case - I really just need the bounce logic. Any ideas or tutorials suggestions are appreciated. :-) A bonus would be information that helps me do that to data that isn't on the display list or DisplayObject derived. Thanks, Kevin N. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] bounce object off tilted wall
On 9/28/10 2:25 PM, Glen Pike wrote: Keith Peter's "Making Things Move" book is really good. Jobe Makar's Flash MX Game Programming Demystified explained the basic concepts nicely too. I'm reading Keith Peter's book now. So far, very relevant - thanks! There are lots of tutorials online, so I would Google "as3 physics collisions" or similar. For other optimisations - it's possibly not worth updating stuff that's not on stage until you put it back - is that possible? What I was talking about wasn't necessarily adding and removing things from the stage, but adding and removing them from the GPU. You can add stuff to the stage without too many hiccups (in software) - but if you set the cacheAsBitmap and cacheAsBitmapMatrix properties (or update or remove something with those set), you cause the player to generate and upload (or destroy) a texture to the GPU - this has a noticeable impact on performance (at least as far as I can tell so far - the biggest impact out of most things). That's why I was saying I'd like to control that part of it myself - I don't know if the available physics libraries have been re-crafted for mobile/GPU yet. Kevin N. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders