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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:26:17+00:00 2026-05-27T07:26:17+00:00

I am adding the same image (play button) to a movie clip those images

  • 0

I am adding the same image (play button) to a movie clip those images later when pressed toggle states and play a video.

What I am trying to accomplish is automatically toggle the default image since that video is playing automatically.

        //Setup thumb Container
         thumbs = new Sprite();
        thumbs.addEventListener (MouseEvent.CLICK, playVideo);
        thumbs.x = thumbs_x;
        thumbs.y = thumbs_y;
            thumbs.buttonMode = true;
            main_container.addChild (thumbs);
    //Call Function that gets all the thumbs using loader and adds it to the thumb movieClip

    callThumbs ();
    setDefaultButton ();

    function callThumbs ():void {



        for (var i:Number = 0; i < my_total; i++) {



                var thumb_url = my_videos[i].@THUMB;
                var thumb_loader = new Loader();
                thumb_loader.name = i;
                trace(thumb_loader.name);
                thumb_loader.load (new URLRequest(root_path + thumb_url));
                thumb_loader.contentLoaderInfo.addEventListener (Event.COMPLETE, thumbLoaded);
                thumb_loader.y = (thumb_height+210)*i;

    }

        function thumbLoaded (e:Event):void {
        var my_thumb:Loader = Loader(e.target.loader);
        thumbs.addChild (my_thumb);
    }


function setDefaultButton ():void {
thumbs.getChildAt(0).dispatchEvent(new MouseEvent(MouseEvent.CLICK));
//or 
thumbs.getChildByName('0').dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}

So this does the same thing as click the first image but it happens automatically.

THIS IS MY ERROR:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at LowesPlayerCS4_fla::MainTimeline/setDefaultButton()
    at LowesPlayerCS4_fla::MainTimeline/processXML()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
  • 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-05-27T07:26:17+00:00Added an answer on May 27, 2026 at 7:26 am

    Try adding the thumb_Loader to the Display List in callThumbs rather than thumbLoaded.

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

Sidebar

Related Questions

I'm having a weird problem with images in iTextSharp library. I'm adding the image
I am trying to use a custom title to include an image button to
I am uploading some images using plupload and adding those images to div container.And
I am working on an application in which I am adding the same image
I'm trying to create a CSS3 button which includes an image using multiple background.
When adding new properties to classes, I find myself typing the same things over
Adding the row one by one in the button click.. (i tried but its
in will_paginate, i am using custom pagination. Here, i am adding image for pagelinks
I am trying to add an image to the UIBarButtonItem which I have to
I'm developing an application to split an image grid equally and center the images

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.