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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:04:12+00:00 2026-05-15T20:04:12+00:00

I am trying to use AMF PHP to pass variables to a flash file,

  • 0

I am trying to use AMF PHP to pass variables to a flash file, thus far I cannot see anything wrong with my code, but I have very little experience with creating classes, so here it goes, here is my code,

index.php:

<?php
include "amfphp/services/flashMe.php";

$session = true;

if ($session == true) {
 $uid = '12345';


  $thing = new flashMe;
  $thing->push($uid);

} else {

 //login

}

?>

flashMe.php:

<?php
class flashMe {

 public function __construct() {

 }

 public function push($one)
 {   
    return $one;//sends the uid to the flash file?
 }

}
?>

Flash is looking for the flashMe class and the push method within that class, but I keep getting null variables in my flash file when I run it, is there something wrong with this code?

Thanx in advance!

  • 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-15T20:04:12+00:00Added an answer on May 15, 2026 at 8:04 pm

    Your index.php file is unnecessary.

    Your second file is incomplete. Here is the example from the docs for their “hello world” class file:

    <?php
    class HelloWorld
    {
        function HelloWorld()
        {
            $this->methodTable = array
            (
                "say" => array
                (
                    "access" => "remote",
                    "description" => "Pings back a message"
                )
            );
        }
    
        function say($sMessage)
        {
            return 'You said: ' . $sMessage;
        }
    }
    ?>
    

    This file should be saved as “HelloWorld” matching the “class HelloWorld” you have named in the php file (you did this part right with FlashMe).

    The example file in the docs for the Flash piece (in actionscript) is here:

    import mx.remoting.*;
    import mx.rpc.*;
    import mx.remoting.debug.NetDebug;
    
    var gatewayUrl:String = "http://localhost/flashservices/gateway.php"
    
    NetDebug.initialize();
    var _service:Service = new Service(gatewayUrl, null, 'HelloWorld', null , null);
    var pc:PendingCall = _service.say("Hello world!");
    pc.responder = new RelayResponder(this, "handleResult", "handleError");
    
    function handleResult(re:ResultEvent)
    {
        trace('The result is: ' + re.result);
    }
    
    function handleError(fe:FaultEvent)
    {
        trace('There has been an error');
    }
    

    The gateway URL should go to wherever your services can be reached. I’m sure if you try a few you’ll find the right one. The neat thing about amfphp is that it allows you to also test your services out before you try implementing them in the gateway (if you go to the URL in your browser).

    I’m pretty new to AMFPHP as well, but I’ve found the docs to be extraordinarily useful. If you need more help on classes, you can find more info on the PHP docs page.

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

Sidebar

Related Questions

I've been trying to use SQLite with the PDO wrapper in PHP with mixed
I'm trying to use jQuery to format code blocks, specifically to add a <pre>
I'm trying to use the Optiflag package in my Ruby code and whenever I
I'm trying use self-signed certificate (c#): X509Certificate2 cert = new X509Certificate2( Server.MapPath(~/App_Data/myhost.pfx), pass); on
Trying to use an excpetion class which could provide location reference for XML parsing,
Trying to use a guid as a resource id in a rest url but
While trying to use LINQ to SQL I encountered several problems. I have table
I' trying to use a Linq query to find and set the selected value
I trying to use ImageInfo and Jython to get information from a image on
I'm trying to use svnmerge.py to merge some files. Under the hood it uses

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.