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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:01:10+00:00 2026-06-14T12:01:10+00:00

Greatings! I have yet another question concerning the loading of a .swf inside a

  • 0

Greatings!

I have yet another question concerning the loading of a .swf inside a existing one.

In my game. I have a introduction screen in which I load another .swf (which is a movie).
This all works fine and the URLRequest is this:

request = new URLRequest("Movie.swf");

As I said, this works fine. However when I copy my game.swf and movie.swf to a USB stick.
(I put them in the same directory to prevent other issues).
It doesn’t seem to find the movie.swf.

Now I know that it has to do with the path given in the URLRequest and/or the publish settings. But I do not know how to make this so that it searches in the same directory
as the game.swf is in.

I hope you guys have an answer for this issue.

Thanks in advance,

Matti.

  • 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-14T12:01:11+00:00Added an answer on June 14, 2026 at 12:01 pm

    Matti, I believe Lukasz’s comment is correct about it being a security error.

    You can avoid this security error by embedding Movie.swf instead of using a Loader. If you do this, then at compile-time the Movie.swf needs to sit next to the Game.as file, and it will be included in the Game.swf (no need to deliver both files, just Game.swf).

    The syntax is:

    package
    {
      import flash.display.Sprite;
    
      public class Game extends Sprite
      {
    
        [Embed(source="MyMovie.swf")]
          private var myMovieClass:Class;
    
        private var myMovie:DisplayObject;
    
        public function Game():void
        {
          myMovie = new myMovieClass();
    
          // Technically myMovie is now a Loader, and once
          // it's loaded, it'll have .content that's a
          // MovieClipLoaderAsset, and .content.getChildAt(0)
          // will be your MyMovie.swf main timeline.
        }
      }
    }
    

    Alternately, if you embed it as mimeType=”application/octet-stream”, you can get the bytes of the SWF and use it in your existing Loader’s .loadBytes() method:

    package
    {
      import flash.display.Sprite;
      import flash.utils.ByteArray;
    
      public class Game extends Sprite
      {
    
        [Embed(source="MyMovie.swf", mimeType="application/octet-stream")]
          private var movieBytes:Class;
    
        private var myMovie:DisplayObject;
    
        public function Game():void
        {
          // Treat this loader the same as your current loader,
          // but don't call .load(url), call loadbytes():
          var l:Loader = new Loader();
          l.loadBytes(new movieBytes() as ByteArray);
        }
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Greetings all, I have yet another RegEx question. I have done hours of searching
Greetings all... I have a simple, yet annoying question regarding Spring Web MVC. I
Greetings all, I have a question. On my MOSS 2007 dev box, I created
Greetings, I have to following problem. I have a WCF Service which runs under
Greetings, I have a problem which would seem to involve some kind of z-index
Greetings- I have 2 classes. One is called Programs and the other is called
i have a question on a problem i am working on. I have to
Greetings, I have a large .Net web app which runs on a farm of
Greetings All; I have a LinkedList of type String which contain some words like
Greatings everyone! I have some images (100x100) . Depending on the number of results

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.