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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:15:43+00:00 2026-05-10T16:15:43+00:00

I need to dynamically create a Video object in ActionScript 2 and add it

  • 0

I need to dynamically create a Video object in ActionScript 2 and add it to a movie clip. In AS3 I just do this:

var videoViewComp:UIComponent; // created elsewhere      videoView = new Video(); videoView.width = 400; videoView.height = 400; this.videoViewComp.addChild(videoView); 

Unfortunately, I can’t figure out how to accomplish this in AS2. Video isn’t a child of MovieClip, so attachMovie() doesn’t seem to be getting me anything. I don’t see any equivalent to AS3’s UIComponent.addChild() method either.

Is there any way to dynamically create a Video object in AS2 that actually shows up on the stage?


I potentially need multiple videos at a time though. Is it possible to duplicate that video object?

I think I have another solution working. It’s not optimal, but it fits with some of the things I have to do for other components so it’s not too out of place in the project. Once I get it figured out I’ll post what I did here.

  • 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. 2026-05-10T16:15:44+00:00Added an answer on May 10, 2026 at 4:15 pm

    Ok, I’ve got something working.

    First, I created a new Library symbol and called it ‘VideoWrapper’. I then added a single Video object to that with an ID of ‘video’.

    Now, any time I need to dynamically add a Video to my state I can use MovieClip.attachMovie() to add a new copy of the Video object.

    To make things easier I wrote a VideoWrapper class that exposes basic UI element handling (setPosition(), setSize(), etc). So when dealing with the Video in regular UI layout code I just use those methods so it looks just like all my other UI elements. When dealing with the video I just access the ‘video’ member of the class.

    My actual implementation is a bit more complicated, but that’s the basics of how I got things working. I have a test app that’s playing 2 videos, one from the local camera and one streaming from FMS, and it’s working great.

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

Sidebar

Ask A Question

Stats

  • Questions 79k
  • Answers 79k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I'm guessing you're referring to the following line as the… May 11, 2026 at 4:10 pm
  • Editorial Team
    Editorial Team added an answer OpenCV has quite good performance. It should be sufficient for… May 11, 2026 at 4:10 pm
  • Editorial Team
    Editorial Team added an answer Check out aggregate example in the LINQ 101 Samples: http://msdn.microsoft.com/en-us/vcsharp/aa336747.aspx#countSimple… May 11, 2026 at 4:10 pm

Related Questions

I know I can do something like the following code to dynamically create a
I want to fill a map with class name and method, a unique identifier
I am just starting out with Silverlight (2 RC0) and can’t seem to get
Is there a pattern using Linq to dynamically create a filter? I have the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.