Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash


Advertisements:










Actionscript 3 :: Reduce The Area For Hittestobject - Flash Cs5?


I'm making a simple snake game in as3. the problem I'm having is that the stroke on elements slightly overlap thus when the snake passes by the apple in an adjacent square it triggers hit test object. If i reduce the size or stroke of either the snake or the apple then they dont properly line up to the grid. is there a way i can use hittestobject but reduce the area of the object that will trigger it. ie only trigger if it hits the center of the object?

//this will hit when snake is adjacent due to overlapping strokes
if(snake.hitTestPoint(apple.x,apple.y,true))
{[code]............

when I traced the values for the bottom code the values are what would be expected but some reason hitTestPoint wont trigger. strangely if I do + 1 it will still work but because the stroke is 2 i need at least +3. If i set apple.x+n as a variable and use the variable in hitTestPoint it wont trigger. also on all cases where it does not trigger i get no errors and all trace values are what you would suspect...


View 1 Replies (Posted: Aug 27 11 at 3:29)

Sponsored Links:

Related Forum Messages For Flash category:
Flash :: Determining Visible Area/invisible Area Of A Masked Object?
I have a movie clip named circle_mc(see the image on the link below) and a mask object(movie clip) which determines visible area of the circle. User can change the portion which is visible (extend the red area and make it red+blue, gray area is invisible). I need to find proportion of visible area to invisible area (red+blue/gray) so that I can calculate angle.

Posted: Sep 29 11 at 21:13

View 1 Replies!   View Related
IDE :: Reduce The Flash Swf File?
reduce the file of flash file as well as swf file to upload.I am a fresher. I don't know advance actionscript, xml etc. reduce the swf file size. So that i can easily upload the file.Also briefly explain me how to externally load the swf file in flash.

Posted: July 1st, 2009

View 1 Replies!   View Related
Reduce Frame Count In Flash Mx?
I have a image sequence of 350 images. Is it possible to Reduce frame count in flash mx, (remove every other frame)automaticy, not by hand one frame at a time. I do also have flash cs5 can it be done in that?

Posted: 06-09-2011, 01:37 PM

View 1 Replies!   View Related
Reduce Flash Movie Size?
I make a very simple movie but its 5 Mb i dont know why >>> do image size i use in movie enlarge the movie size?

Posted: May 5, 2011 11:40 AM

View 1 Replies!   View Related
Flash :: Reduce PS Image Size For It?
I am importing layers from my Photoshop file to Flash to create a Flash Banner ad using CS5. My Banner size is set-up in PS as 160x600 72DPI. Are there any tricks to getting my file size down without losing anymore resolution when importing to the flash Stage?

Posted: Jan 6, 2012 6:44 PM

View 1 Replies!   View Related
IDE :: Reduce The Flash File Size To Upload In The Web?
how to reduce the flash file size (flash website) to upload in the web. And also tell me what is the limit size of flash sile to upload in the web.

Posted: June 2nd, 2009

View 1 Replies!   View Related
ActionScript 2.0 :: Reduce Size Of Flash Site
In an effort to reduce the size of my flash site I reduced every single one of the swf movies (17 in total) that it contains. Each minor swf was cut back with about 25%. When publishing the main swf (the actual site) the file size is still 1 mb?

Posted: August 24th, 2010

View 4 Replies!   View Related
Flash :: HitTestObject On Child Of A MC?
I have a MC called 'playerP" and inside of it with 7 different MC. I can't seems to hit test on the children MC, it always show [object position_2]

private function cMove(e:MouseEvent):void
{
trace(MovieClip(playerP.RR), playerP.PT)

[Code]....

Posted: Jan 16 11 at 4:47

View 1 Replies!   View Related
CS5.5 :: Reduce Time Of Publication In Swf From Fla In Adobe Flash Professional?
My fla-file (27mB) is graphic resources to a project, split into pieces is very problematic.Publication time on my computer is 4 minutes. I tried setting "preferance / publish cache" - not result.

Posted: Apr 2, 2012 6:36 AM

View 16 Replies!   View Related
Actionscript 3 :: Disable System Volume Reduce In Flash
I have a flash chat application and when app create new conversation system reduce volume of incoming sound stream at 80%(and any other sounds). How can i disable volume reduce from flash? Here is some additional information Problem with sound quality.i think only win7 has that problem because of URL...

Posted: Dec 17 10 at 9:59

View 1 Replies!   View Related
Media Server :: Reduce Audio And Video Latency In Flash?
We have one functionality in which one user can communicate with the other user at the same time through flash media server3.5. In this fucnitonality we are catching stream from both end through camera and pass it to flash media server. On FMS side this streams gets stored also we are displaying those recorded flv files side by side to the corresponding user so that they can communicate with each other. In this situation we are facing a video and audio latency upto 1.5 to 2 sec.

Posted: Sep 22, 2010 7:06 AM

View 2 Replies!   View Related
Actionscript 3 :: Flash Webcam Snapshot Reduce Motion Blur?
i have a photo snapping app built in flash. I notice that any movement results in a lot of motion blur.. which makes the photos kind of turd. Is there a way to digital reduce the blur? potential camera setting in actionscript??

Posted: Feb 8 11 at 6:10

View 2 Replies!   View Related
ActionScript 2.0 :: Optimizing A Flash File To Reduce Loading Time
i have a fairly large flash file and i'm wondering what i can do to reduce/compress this anymore to make it load a little quicker??

Posted: February 25th, 2007

View 2 Replies!   View Related
ActionScript 3.0 :: Flash - Game HitTestObject Error?
I'm new to ActionScript but I've been following Lynda tutorials and tried to tailor them to my game. I simply want to make my character at the top of the screen shoot at enemies below. The error I'm getting when I press the shoot button is "Parameter hitTestObject must be non-null." I've read some other forum posts on this error for ideas but still can't seem to make mine work.

{
import flash.display.MovieClip;
import flash.events.Event;

[code]......

Posted: Aug 17, 2011 12:37 PM

View 3 Replies!   View Related
Flash :: HitTestObject On Dynamically Placed MovieClip Instances?
Trying to do hitTestObject on instances that are dynamically placed on the stage. Receiving an error:

TypeError: Error #2007: Parameter hitTestObject must be non-null.
at flash.display::DisplayObject/_hitTest()
at flash.display::DisplayObject/hitTestObject()

[code].....

Posted: Sep 11 10 at 20:07

View 1 Replies!   View Related
Flash :: Papervision 3d HitTestObject Doesn't Work?
I'm new to papervision 3d and I created two display objects in basic view.
Here's a part of the code :

...
_stick = new Cube(materials, 50, 5, 500);
_ball = new Sphere(new ColorMaterial(0xfc0000), 80);

In the onRenderTick method, I tried to check whether two objects are hitted

[Code]...

However, stick.hitTestObject always returns false even if the stick really hits the ball as I see in the flash.

Posted: Jul 4 11 at 6:37

View 1 Replies!   View Related
Flash :: AS3 - HitTestObject Collision Not Registering Correctly
I had a problem with my hitTestObject collision detection a couple of days ago which has since been fixed (How can I solve my hitTestObject Collision Null Object Ref Error) with the help of you folks. My problem now is as such: When my "enemy.hit" comes into contact with "player.hit" it registers as a hit - this is good. When my "building.collide" comes into contact with "player.hit" it registers as a hit - this is good.

However, when my "building.collide" comes into contact with my "enemy.hit" it does not register, but sometimes it does register even though the only enemy on-screen is many pixels away from it - as if either the building or enemy "hitBox" is somewhere other than directly on the graphic(MovieClip in this case).

[Code]....

Posted: Aug 7 11 at 22:27

View 3 Replies!   View Related
ActionScript 3.0 :: Flash Stopping A HitTestObject After A Certain Frame
I am placing my code within frames and using the code below to hit test an object. After the animated object leaves the stage, the hit test starts getting errors because it is now looking for an object that isn't there. NULL

Code:
var o1:MovieClip;
o1.addEventListener(Event.ENTER_FRAME, o1hit);
function o1hit(Event) {

[Code]...

So the question is: How can I get the Hit Test to stop after a certain frame? Or does it have to do with the EventListener?

Posted: June 7th, 2010

View 1 Replies!   View Related
ActionScript 3.0 :: Flash Other Function Similar To HitTestObject?
Is there any other function similar to 'hitTestObject'. Am having problem with this function, b'coz it checks the collision on a box around that object. I want to find the actual collision with the object.

Posted: September 16th, 2010

View 2 Replies!   View Related
Flash :: Professional - Reduce File Size Of Opening Page In A Site
I'm using the Flash CS4 IDE, and the first page of my site takes a lot longer to load than I want it to. So I wanted to go through the varied images / symbols / movie clips / sounds and so on to see where all the memory is being chewed up. When I go into my library, however, I can see the Name, LInkage, usecound and Type of my elements, but no mention of file size and I can't seem to find any right click menu that lets me add file size to the list of details being displayed. Is there a way to make it show file size? Or some workaround? And are there any best practices to reduce file size aside from using symbols for anything that's used more than once and reducing image and sound quality?

Posted: Sep 27, 2011 9:00 PM

View 4 Replies!   View Related
ActionScript 3.0 :: Flash MovieClip - HitTestObject For The Collision Detection
I have a bullet object and a boulder object (both movieclips originating from JPEGs) in my AS3 game. The trouble I'm having is with hitTestObject for the collision detection, as it's taking in to account the transparent areas and basing the collision on the bounding boxes surrounding the movieclips. This is a problem because the collisions are not accurate and if the bullet (long and thing line shaped) is at an angle...the bounding box is quite large around it...and it's "colliding" with the boulder even though it's visibly many pixels away. Is there a way to detect MovieClip collisions that ignore transparent areas?

Posted: April 28th, 2011

View 2 Replies!   View Related
ActionScript 1/2 :: Decrease Hit Area - That Mouse Out Of To Make The Drop Down Area Pull Back?
i have a drop down menu am working on and each button tab (although they are not button instances !) when clicked opens up the "drop down" section which you can mouse over to choose another specific button etc - if you mouse out of that drop down area then it pulls back up to the original tab state .. what do i change to the code below to decrease the area that you mouse out of to make the drop down area pull back .....at the moment it at least two inches on the screen below and to the right of boundaries of the drop down box before it pulls up - i want to it pull up as the mouse leaves the boundary box .... hope this makes sense .... there is some part of the actionscipt below that controls this but can work out which bit and how to change it !!! (am guessing the x mouse and y mouse bits - but how to change it ???)

[Code]...

Posted: Jul 28, 2009 10:39 AM

View 1 Replies!   View Related
Actionscript 3 :: Get BitmapData From A DisplayObject Included Transparent Area, And Effect Area
I have this function:

public static function cloneDpObj(target:DisplayObject):Bitmap
{
var duplicate:Bitmap;

[code]....

to clone target displayObject (MovieClip or Sprite) and return Bitmap Object.

It can get bitmap from the target object, but it seem don't get all the area of the image.

By give the width and height of target object, but the target object in design was applied by Glow Effect, so my question can we get the all view of bitmapdata from a displayobject?

Posted: Aug 5 11 at 8:13

View 4 Replies!   View Related
ActionScript 2.0 :: Load The Area Of The Xml File Into Text Area On Mouse Click?
I would like to first add the xml to my flash. Fine I can do this.But I have a number of buttons, where when I click say CW1, i get the information from the XML file with a node of CW1. I have all the xml set up fine.As I have about eight different postcode types.

ST, CW, CH, TF, WV, WS, DE, SK, SY, and each of these may have numbers that follow, i.e ST1, ST2, ST3 and so forth.

So I can only assume that the postal area could be the main nodes, and the numbers inside the child nodes, am I right thus far.o how can i load the area of the xml file into my text area on mouse click, pulling the information relating.

Posted: May 21st, 2004

View 11 Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved