Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7900997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:06:27+00:00 2026-06-03T09:06:27+00:00

Frog I’m developing a flash game called Frog, at the moment my code for

  • 0

Frog

I’m developing a flash game called Frog, at the moment my code for collision between my frog and fly doesn’t work as expected. I’d like to have it so it works something similar to the method linked below (last example).

Collision detection methods, hitTest and hitTestObject alternatives

Any help would be appreciated.

function hitTargetFunction():void {
    for (i = 0; i < insectsMC.length; i++) {
        for (j = 0; j < insectsMC[i].length; j++) {
            if (frogMC.hitTestObject(insectsMC[i][j])) {
                trace('Target: ' + insectsMC[i][j].name);
                score +=  1;
                trace('Score: '+score);
                insectsMC[i][j].x = 0 - insectsMC[i][j].width * 2;
            }
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:06:28+00:00Added an answer on June 3, 2026 at 9:06 am

    Creating a movieclip/sprite inside the frog movieclip will probably be the best thing for you in this situation. PixelPerfectCollision is very awesome and useful(however on larger games, expensive) but the collision would then be with any piece of the frog. You could of course break apart your frog movieclip and just do PixelPerfectCollision on just the tongue. But if this is for coursework I’d stick to just doing hitTest() on a display object of some kind inside the the frog.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my code, I'd like to work with textual names of the items that
When I run this code: - (NSString *)description{ return [NSString stringWithFormat:@(FROG idle:%i animating:%i rect:%@
suppose I had something like this: L1=['cat', 'dog', 'fish', 'rabbit', 'horse', 'bird', 'frog', 'mouse'...]
Say I have a class named Frog, it looks like: public class Frog {
Say I have a table that has items and attributes listed like, frog green
I have created form inside a template file. Form code looks like: <div id=form
Given the following string http://thedude.com/05/simons-cat-and-frog-100x100.jpg I would like to use substr or trim (or
Let's say I have a directory structure like this: animals/dog/details animals/cat/details animals/frog/details animals/horse/details Using
I'm a student programming a frogger game, when the frog collides with an object
There's a nice plugin for Frog CMS that lets you just type in yourpicture.120x120.jpg

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.