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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:22:04+00:00 2026-05-13T07:22:04+00:00

I am embedding a swf file into the parent swf file and my code

  • 0

I am embedding a swf file into the parent swf file and my code in parent swf file want to call the function inside the embedded swf file. It always failed, below is the code. The error is in line:

var player:testflv1 = (loader.content as SystemManager).application as testflv1;

It can’t be compiled because the testflv1 is not recognized as the known type.

The code of the parent swf:

        private function applicationComplete():void
        {
            // loader.load("http://localhost:8000/testflv1.swf");
            return;
        }

        public function callfunction():void
        {
            trace("loadedCompleted.");
            Alert.show('hello');

            var player:testflv1 = (loader.content as SystemManager).application as testflv1;
            // player.setSize(320, 240);
            player.playVideo();
            return;
        }

        protected function button1_clickHandler(event:MouseEvent):void
        {
            // TODO Auto-generated method stub
            callfunction();
        }

    ]]>
</fx:Script>
<mx:SWFLoader id="loader" horizontalCenter="0" width="100%" height="362" source="http://localhost:8000/testflv1.swf"/>
<s:Button x="211" y="376" label="Button" click="button1_clickHandler(event)"/>

The code of the embedded swf:

        private function applicationComplete():void 
        {
            //var nc:NetConnection = new NetConnection();
            //nc.connect(null);

            //var ns:NetStream = new NetStream(nc);
            //var vid:Video = new Video(320, 240);
            //this.addChild(vid);

            //vid.attachNetStream(ns);

            //ns.play("http://www.mediacollege.com/video-gallery/testclips/20051210-w50s.flv");

            svid.play();
            return;
        }

        public function playVideo():void
        {
            svid.play();
            return;
        }

        public function pauseVideo():void
        {
            svid.pause();
            return;
        }
    ]]>
</fx:Script>
<s:VideoPlayer id="svid" source="http://127.0.0.1:8000/jacko.flv" bottom="0" left="0" top="0" right="0"/>

  • 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-13T07:22:05+00:00Added an answer on May 13, 2026 at 7:22 am

    swfloader is generally used to load and play a Flash movie inside a Flex app. If you want to load additional functionality at runtime you’re better off using Modules; they’re specifically designed for what you’re trying to do.

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

Sidebar

Related Questions

I'm embedding MSBuild directly into a more complex build tool. The relevant code looks
Inside my /test folder/music_player/ have have a file called mini_player.swf. If I play it
i am embedding a javascript file inside an svg file like this: <svg xmlns:dc=http://purl.org/dc/elements/1.1/
I'm having problems embedding php inside an html file. I first ran in to
The problem: I am embedding a CSS file into a custom control library with
I know that embedding CSS styles directly into the HTML tags they affect defeats
I'm embedding a Flash video into an HTML and would like the user to
I have a JavaScript function that loads a flash movie into a webpage div
I am having in issue with IE passing a string back into an swf
I have swf file with some graphics I need to use in my haxe(future

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.