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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:51:53+00:00 2026-05-20T15:51:53+00:00

I am using php to read a file (specified by a cookie on the

  • 0

I am using php to read a file (specified by a cookie on the users machine) with the function readfile().
the file I am reading is an actionscript 3 flash file that depends on a configuration file appended to the url to function properly.

ex: http://www.pathToFlash.com/file.swf?CONFIG_URL=http://www.pathToConfig.com/config.xml

When I use readfile – the headers are set properly and the swf is returned to the browser which then runs it. I have discovered that using this method the config file (CONFIG_URL) has to be appended to the php file’s url to be read properly by the swf – as the swf considers the path to the php file it’s own.

This is fine when these are the only two elements involved – but when loading the php>read(swf) combination into another swf – the ‘read’ swf returns a url that is null (using this.root.loaderInfo.url) and therefore fails to execute properly as there is no config file (CONFIG_URL).

My question is: how can I load in a swf file from a php page (using readfile, fopen, whatever) and pass in $get parameters?

  • 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-20T15:51:54+00:00Added an answer on May 20, 2026 at 3:51 pm

    First of all:this.root.loaderInfo.url needs to be: this.root.loaderInfo.parameters.url.

    Second of all root.loaderInfo.parameters can be only accessed only from root swf.
    This means that you can not say inside swf to php: load.php?swf=second.swf&someParameter=1234, and parse some parameter for the loaded swf directly.

    The solution ( there is more thant one ) is:

    1. You need to set all this parameters for the root.swf ( when you loading it )

    mainConfig=xml/config.xml
    secondSWFconfig=xml/secondconfig.xml

    and etc…

    1. in the second.swf which will be loaded by root.swf you need to create function:

      public function set parameters ( value : Object )
      {
      // here all the assigment of the parameters
      }

    2. In the root.swf function which is launched after second.swf is loaded:

      private function onSecondSWFLoaded ( e : Event ) : void
      {
      e.currentTarget.content[‘parameters’] = this.root.loaderInfo.parameters;
      }

    ANd then in the second swf you will be gettin these parameters and after them you can launch everything you need.

    regards.

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

Sidebar

Related Questions

In using PHP's DOM classes (DOMNode, DOMEElement, etc) I have noticed that they possess
Using PHP how can I accurately test that a remote website supports the If-Modified-Since
I have a CSS file that looks fine when I open it using gedit
Using PHP, what's the fastest way to convert a string like this: 123 to
Using PHP and MySQL, I have a forum system I'm trying to build. What
Been using PHP/MySQL for a little while now, and I'm wondering if there are
I've been using PHP & MySQL for ages and am about to start using
I have been using PHP and JavaScript for building my dad's website. He wants
I've been using PHP for too long, but I'm new to JavaScript integration in
I am using PHP with Apache on Linux, with Sendmail. I use the PHP

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.