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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:27:44+00:00 2026-06-02T14:27:44+00:00

I´m trying to extend the Loader class. I want to store a variable on

  • 0

I´m trying to extend the Loader class.

I want to store a variable on it.

Example:

package
{
import flash.display.Loader;

public class MyLoader extends Loader
{
    private var _typeOfGallery:String

    public function MyLoader()
    {
        super()
    }

    public function set typeOfGallery(value:String):void
    {
        _typeOfGallery = value
    }

    public function get typeOfGallery():String
    {
        return _typeOfGallery
    }
}

}

Then I´m using like this:

var loader:MyLoader = new MyLoader()
loader.typeOfGallery = 'games'
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded)

function loaded(e:Event):void{
trace(e.target.typeOfGallery)
}

I´m receiving this error:

ReferenceError: Error #1069: Property typeOfGallery not found in flash.display.LoaderInfo and has no pattern value.

(I have translated from portuguese to english the error message)

How could I extend Loader so I don´t receive this error?

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-02T14:27:46+00:00Added an answer on June 2, 2026 at 2:27 pm

    Loader does not dispatch the Event.COMPLETE event. You should listen to

    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded)
    

    and then get your MyLoader with

    function loaded(e:Event):void{
       trace(((e.currentTarget as LoaderInfo).loader as MyLoader).typeOfGallery);
    }
    

    In your code, e.target is a LoaderInfo because the COMPLETE event bubbles to the Loader itself.

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

Sidebar

Related Questions

I am trying to play with JavaCompiler interface: class A<T extends TrackableObject>{ } public
I'm new to Flash/AS3 and I have been trying to display objects from class
I am trying to extend the mysqli class to make a helper class that
I'm trying to extend my ActiveRecord class with some dynamic methods. I would like
I'm trying to extend TextBox control to add watermarking functionality. The example I've found
I'm trying to extend the DOMDocument class so as to make XPath selections easier.
I am trying to import java.awt.*; into my class in Greenfoot but when I
I have been trying to override the database method of the loader class (CI_Loader).
I've been trying to create an universal asset loader class (with help of the
import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.util.jar.JarEntry; import java.util.jar.JarFile; public class

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.