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 8442501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:51:36+00:00 2026-06-10T08:51:36+00:00

As the title suggests, I am trying to create a function in Actionscript 2

  • 0

As the title suggests, I am trying to create a function in Actionscript 2 that calls for a value and function but I can’t seem to get it to use the function. Here is my code.

function fadeOut(seconds, callBackFunction){
_root.fader.activated = true;
_root.fader.secs = seconds;
if(fader.box._alpha >= 100){
        callBackFunction();
        trace("This part of the code is being called");
    }
}

Then this is how I call the function

function BlankFunction(){
        trace("working");
    }
_root.fadeOut(5, BlankFunction);

So I get the trace saying “This part of the code is being called” but i’m not getting “Working” from the BlankFunction used as the callback. Is there a possible way to create a function in AS2 that calls for a callback function?

  • 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-10T08:51:38+00:00Added an answer on June 10, 2026 at 8:51 am

    You can call it using callBackfunction.call(null). The null specifies the target of this within the called function. See also http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001074.html

    I suggest typing it as :Function in the parameters of fadeOut as well: function fadeOut(seconds:Number, callBackFunction:Function)

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

Sidebar

Related Questions

As the title suggests, I'm trying to get the caption of the associated label
As the title suggests I'm simply trying to get a named window to come
As the title suggests, I am trying to nest - or create an array
As the title suggests, I'm trying and failing to get the following combination working
So as the title suggests, I'm trying to get and gunzip a string from
As the title suggests, how do I get the number of views / clicks
As the title suggests, I would like to get the last word out of
So as the title suggests I wish to create a new dom element (the
I have a prob. I'm trying to create a custom slugify functiom. I use
as the title suggests, I'm struggling to understand how to create a new table

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.