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

  • Home
  • SEARCH
  • 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 8783523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:50:47+00:00 2026-06-13T20:50:47+00:00

I am trying to make a game where people have to identify a lighthouse,

  • 0

I am trying to make a game where people have to identify a lighthouse, and then drag a symbol over to it. I have the drag and drop code fine, but I am wondering what is the best way to animate my lighthouse. I have a seperate movie clip called lightFlash that I am trying to time, and it will just sit beside the lighthouse. I am trying to use a timer to make it flash. What I want is it to wait 3 seconds, flash for a second, then wait 3 seconds etc. this is what I have so far, not a lot, so any help would be appreciated!

lightFlash.alpha=0;
var myTimer:Timer = new Timer(3000);
myTimer.addEventListener(TimerEvent.TIMER, timerListener);
function timerListener(e:TimerEvent):void {
lightFlash.alpha=1;
//wait for one second
}
myTimer.start();

i can already see i would have a problem that i would be losing a second of the timer each time if i did it this way, there is probably a much better way I should be doing this, any help would be greatly appreciated thanks!

  • 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-13T20:50:48+00:00Added an answer on June 13, 2026 at 8:50 pm

    Try

    var isOn:Boolean;
    
    lightFlash.alpha=0;
    var myTimer:Timer = new Timer(3000);
    myTimer.addEventListener(TimerEvent.TIMER, timerListener);
    myTimer.start();
    
    function timerListener(e:TimerEvent):void {
       isOn = !isOn;
       if (isOn) {
          lightFlash.alpha=1;
    
         //wait for one second
         myTimer.delay = 1000;
       } else {
          lightFlash.alpha = 0;
          myTimer.delay = 3000;
         //wait for three seconds
       }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to make simple minesweeper game in python, but have one problem. I have
I am just messing around trying to make a game right now, but I
I am trying to make a simple game in C#/XAML. I have a worker
I'm trying to make a game where the user is supposed to drag a
I'm trying to make a game with score counters, round counters, etc, but what
I'm trying to make a game that will have a black screen, when you
I'm trying to make a compiler for my game (so that people could do
I'm trying to make a game in Java (school project) and I have the
I'm trying to make an android game here, but I'm not sure what is
I'm trying to make a game in HTML5 canvas, but instead of uploading a

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.