SunQuest
           Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 29th, 2003, 12:33 PM
stanley1610's Avatar
stanley1610 stanley1610 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 248 stanley1610 User rank is Corporal (100 - 500 Reputation Level)stanley1610 User rank is Corporal (100 - 500 Reputation Level)stanley1610 User rank is Corporal (100 - 500 Reputation Level)stanley1610 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 16 h 3 m
Reputation Power: 8
Question AMFPHP Actionscript PHP

I m a newbie of Flash MX Actionscript. I have a group of codes but I could not get any result; Could you help me to find out the problem, please?

ecatgateway.php at /home/myname/public_html/test/
include "flashservices/app/Gateway.php";

$gateway = new Gateway();
$gateway->setBaseClassPath("/home/myname/public_html/test/module/");
$gateway->service();

* category.php and categoryctl.php locate at /home/myname/public_html/test/module/

class CategoryCtl
{
var $entity;

function CategoryCtl()
{
$myDBMgr = new MySQLCtl($GLOBALS['SYS_DBHOST'], $GLOBALS['SYS_DBUSER'], $GLOBALS['SYS_DBPWD'], $GLOBALS['SYS_DBNAME']);
$this->entity = new Category($myDBMgr);

$this->methodTable = array(
"getListByParent" => array(
"description" => "return a list of all categories under a certain parent",
"access" => "remote", // available values are private, public, remote
"roles" => "role, list", // currently inactive
"arguments" => array ("parentid")
),
"getName" => array(
"description" => "return a name of a category",
"access" => "remote", // available values are private, public, remote
"roles" => "role, list", // currently inactive
"arguments" => array ("nodeid")
),
"getParentID" => array(
"description" => "return the ID of a category's ID",
"access" => "remote", // available values are private, public, remote
"roles" => "role, list", // currently inactive
"arguments" => array ("nodeid")
)
);
}

function getListByParent($parentid)
{
if (($parentid+0)<= 0)
{
$parentid = -1;
}

return $this->entity->listDB("parentid=".$parentid, "", "");
}

function getName($nodeid)
{
if (($nodeid+0) <= 0)
{
return "Home Category";
}

return "No Yet";
}

function getParentID($nodeid)
{
return "Not Yet";
}

}

Actionscript in Flash MX
#include "NetServices.as"
#include "NetDebug.as"

NetServices.setDefaultGatewayURL("http://somewhere/test/ecatgateway.php");
var myServer = NetServices.createGatewayConnection();
var categoryMgr = myServer.getService("CategoryCtl", this);

function getName_Result(theResult)
{
trace("Got result " + theResult);
}

function getName_Status(theError)
{
tracert("Got error " + theError);
}

trace("Test getName");
categoryMgr.getName(-1);


WHAT should I do? Thanks.
__________________
------------------------------------------
Perl Kids Kiss Perl
Stanley
------------------------------------------

Reply With Quote
  #2  
Old July 29th, 2003, 06:47 PM
blatant's Avatar
blatant blatant is offline
World Domination
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: San Diego
Posts: 126 blatant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 m 17 sec
Reputation Power: 6
Send a message via AIM to blatant
I don't really understand your question. It would help if you were more specific, and posted less code. AMFPHP comes with a few basic examples, I would suggest trying to get those to work. Also, make sure you have the flash remoting components installed or AMFPHP won't run.

Reply With Quote
  #3  
Old July 29th, 2003, 08:29 PM
stanley1610's Avatar
stanley1610 stanley1610 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 248 stanley1610 User rank is Corporal (100 - 500 Reputation Level)stanley1610 User rank is Corporal (100 - 500 Reputation Level)stanley1610 User rank is Corporal (100 - 500 Reputation Level)stanley1610 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 16 h 3 m
Reputation Power: 8
Thanks for Reply

Thanks for your reply.

I have installed Flash MX Remoting Component. I can run the example provided by AMFPHP.

When I ran my flash, it should be supposed to show

Got Result [something...]

But it just shows

Test getName

This implied that the remoting object cannot be retrieved. I have tested my remoting object can work alone with HTML but the flash cannot use the object.

I also test ecatgateway.php and this does not show any error.

so What should I do?

Reply With Quote
  #4  
Old July 30th, 2003, 10:18 PM
stanley1610's Avatar
stanley1610 stanley1610 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 248 stanley1610 User rank is Corporal (100 - 500 Reputation Level)stanley1610 User rank is Corporal (100 - 500 Reputation Level)stanley1610 User rank is Corporal (100 - 500 Reputation Level)stanley1610 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 16 h 3 m
Reputation Power: 8
The problem was that
the file categoryctl.php did not match the case of the class CategoryCtl

oh! no...

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > AMFPHP Actionscript PHP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway