ActionScript 3.0 :: Passing Complex Types To Php With AMFPHP 2

Jan 13, 2009

Passing a complex type to PHP with AMFPHP 2. This 'sort of' works, sort of in that I can pass an AMF object to a service, and I can echo that object back to Flex/Flash, but I cannot access the contents of the object in PHP.

A simple service

[Code]....

We get null. - Now I am assuming this is some sort of serialization I am missing, does anyone know what it is?

Edit - also worth noting when passing an Array to AMFPHP I have no problems accessing the data

View 2 Replies


Similar Posts:


Flex :: BlazeDS Serialization With Complex Types

Oct 25, 2010

I recently came into a situation when sending a nested object from Java to Flex via a HashMap the Objects were null. More precisely:final Map< Integer, List<String>> tempMap = new HashMap<Integer, List<String>>();would send the keys as integers but the values were all null.But when sending the same with String keys:final Map<String, List<String>> tempMap = new HashMap<String, List<String>>();the objects came thru.Are there any restrictions in BlazeDS serialization when using complex types as keys?

View 1 Replies

Php :: Passing ByteArray From Flash To AMFPHP (2.0.1)?

Mar 13, 2012

i have a problem passing ByteArray from flash (as3) to amfphp to save an image.With old version of amfphp, all worked in the past... now, with new version i have many problem.I'm using version 2.0.1 and the first problem is that i have to do this, for access to my info:

[Code]...

View 1 Replies

Data Integration :: Complex Data Types From PHP To Flash?

Apr 7, 2006

Does anyone know of any really easy and effective ways to move complex data types from PHP into FLASH and vice-versa? A while back I made an attempt to recreate PHP' serialize() function in actionscript but it was really difficult and performance was poor.

I'm able to do it fairly easily for one dimensional arrays indexed by numbers, but when I have to pass either an object (or several objects) or when i have to pass a nested array of arbitrary complexity (such as a data tree) then I get bogged down.

I have a little experience dealing with XML in flash (working with the tree component) but it seems like so much effort when i am dealing with a new data type.

Does anyone know of any pre-packaged components or code (in actionscript and complimentary part in php) that might be useful?

View 3 Replies

ActionScript 3.0 :: Passing MouseEvents Of Different Types To Same Function?

Sep 21, 2009

I was just wondering if there are any problems that could arise from passing MouseEvents of different types (i.e. MouseEvent.CLICK or MouseEvent.MOUSE_DOWN) at different times to the same function? I've already built my project, and it seems to function fine, I just want to make sure that I'm not setting myself up for some problems in the future. I understand it's probably not the "cleanest" or "best practice" to construct my project in this manner, but if it works...

A simplified example:
PHP Code:
// This is the function that I want to call from varying places with different MouseEvents and triggered by different event listeners
function myFunctionA(evt:MouseEvent):void{
[Code] .....

Actually, in writing that, I may have answered my own question, because it seems that myFunctionA is simply expecting a MouseEvent... regardless if that event is CLICK or MOUSE_DOWN or MOUSE_UP event, right? Now, a MouseEvent.CLICK may have different properties than a MouseEvent.MOUSE_UP that I can access within myFunctionA; however, that shouldn't matter to the function, or is my thinking flawed?

View 3 Replies

Actionscript :: Passing Reference Types By Ref - Flex

Jun 30, 2010

I know that in C# when you pass an object (non primitive) to a method the following is true: A reference to the object is passed Changes made to the object in the method are reflected outside of the method. Also, you can pass a reference to a reference in C# e.g this.changeObject(ref myObject);, in which case: Changes to the object and also to the ref are reflected outside of the method e.g. myObject = new new List(); would change the passed objects referred location. Is this possible to do in Flex/Actionscript - can a ref keyword be used?

View 1 Replies

ActionScript 3.0 :: Passing Complex Objects Via LocalConnection?

Feb 13, 2009

Is there a way I can pass complex objects like sprites or timers through LocalConnection? It seems like you can naively pass simple objects like String, Number, Array thru the LocalConnection. But I can't seem to send other data types.I read that you have to use the method "registerClassAlias()" within the receiving SWF file before that SWF file can accept complex objects. For example, when I attempt to send instances of Sprites or Timers, I get the following error:

"Error #2044: Unhandled AsyncErrorEvent:.text=Error #2095:flash.net.LocalConnection was unable to invoke callback sendState.error=TypeError: Error #1034: Type Coercion failed: cannot convert Object@b9210b1 to flash.utils.Timer."

How can I send complex data types or are some data types not send-able?

View 8 Replies

ActionScript 3.0 :: Converting Variable Types For Passing In A Function?

Mar 17, 2009

I'm trying to write a robust "eventMaker" function that I can run with arguments that will then create an event listener based on the arguments.

However, I can't seem to get it to pass the arguments. Functions are impossible to pass; it can't convert string versions back to functions, and passing the function as type :function just yields "function() function{}".

The same is true with strings and class definitions - if I want it to refer to an object in my other .AS file called "helloWorld", I can't make it think of helloWorld as anything other than a string or an object, and when I write commands based on it I get errors.

So how do I contain classes, functions, et al in variables that I can then reference again, in code, as those functions/classes? How can I convert a string value to something that the code will know is a reference?

View 3 Replies

ActionScript 3.0 :: Complex Flash Form Info Not Passing Through Whiled Embedded A Dreamweaver Site

Dec 20, 2010

Okay, there is something that I don't quite understand. I built a flash contact form in Flash CS4 and embedded the swf in my webpage using Dreamweaver CS4. I upload the files in my server but why it's not working? I created a test folder in my folder and it does work... (It doesn't work here) [URL] The problem is that I'm not receiving the information when the user enters and submits the information on the contact form. I do receive the information on the test link. I'm posting the Flash AS and PHP Code to see if anyone can point out any mistake that I'm doing.

[Code]...

View 1 Replies

ActionScript 3.0 :: Map Data Types To Custom Types?

Jan 24, 2012

Consider the following function:

Code:
public function foo(bar1:int, bar2:uint, bar3:String, bar4:Boolean):void{}

What I want is to have the different types of data represented by custom named types which are essentially representing the original data types. I other word, I would like to proxy the data types and have a valid function as following:

Code:
public function foo(bar1:PAR_Bar1, bar2:PAR_Bar2, bar3:PAR_Bar3, bar4:PAR_Bar4):void{}

so PAR_Bar1 would proxy the `int` data type, PAR_Bar2 would proxy the `uint` data type, so on and so forth.

The reason I need this is because I'm using a debugger with a GUI that can run methods and allows changing function parameter values in real-time, the issue is that the debugger can't tell me what parameter I'm changing, it only displays the data type of a parameter. So if I need to change 10 different parameters all of type int, the debuggers display all of them as int and not by their names.

I think that if I use proxy types I can easily differentiate between parameters.

So, my question: Is it possible to proxy data types? I mean map specific data types to custom data types that would represent the base data types?

View 2 Replies

Returning Errors From AMFPHP?

Mar 19, 2010

When using flash remoting with amfphp, what can I write in php that will trigger the 'status' method that I set up in my Responder in Flash? Or more generally, how can I determine if the service call has failed? The ideal solution for me would be to throw some exception in php serverside, and catch that exception in flash clientside... How do other people handle server errors with flash remoting?

[Code]...

View 1 Replies

IDE :: Possible To Send Or Get An Image Or Swf Using Amfphp

Apr 12, 2007

i want to use amfphp to get a very long text so i want to be able to show the progress of the download with a preloader but i dont know how to do this, also i dont know if it is posible to send or get an image or swf using amfphp.

View 4 Replies

ActionScript 3.0 :: Sending Variables To AMFPHP

Jan 18, 2009

How would I send variables to php when I use AMFPHP? I'm trying to send mediaID and voteValue to my php file, but nothing seems to happen. I guess there's something wrong here..

View 5 Replies

Is The Framework AMFPHP A Bridge Between Flash And PHP

Nov 24, 2009

connectivity of data using AMFPHP between the flash frontend and the mysql database?

View 2 Replies

Php :: Deserialize The AmfPhp Messages While Remoting?

Nov 29, 2009

Is it possible to deserialize the AmfPhp messages while remoting? They are in binary, and assuming that amfphp understands what they are I should be able to decode what it s.

View 1 Replies

Php :: Free Opensource Amfphp Alternative

Dec 17, 2009

is there any other framework that does the same as amfphp? I dont want to use amfphp because it hasnt been updated in years and looks like it's no longer under development, I have to use PHP so I'm looking for a PHP alternative.

View 2 Replies

Actionscript 3 :: SWF Cannot Connects To DB (using AMFPHP ) While Run Through Browser

Mar 10, 2012

its few days i'm stock with a issue using amfphp 2 in my actionscript project. i have an actionscript project which gets the data from db through amfphp, when i run the complied swf in debug mode or just run through flash player it works fine , but once i wrap it with html and open it through browser it never gets the data from db, dose any body can help me what is going on ? i have added these lines at the first of the project , but still through browser ( i've tried , Chrome, Firefox and safari) it cannot connects to db.

[Code]....

View 1 Replies

Actionscript 3.0 :: AMFPHP Services Over HTTPS?

Sep 18, 2008

I'm having a very strange problem around a few services I developed for AMFPHP that worked fine over HTTP but once over HTTPS gone completely wrong. When testing right on export flash IDE the connection goes fine but when online and on the browser it doesn't. On connecting, Flash returns a security sandbox violation like this:

"Error #2048: Security sandbox violation:[URL] cannot load data from [URL]. I know that I'm missing the "www" subdomain on the gateway secure address but this is has another purpose for domain configuration. What's most weird is that even the Service Browser went completely wrong since it tries to open the gateway through the HTTP version of the address instead of the HTTPS one. Upon opening the browser I get a "NetConnection.Call.Failed: HTTP: Failed" error. It also tells me that it's trying to connect to [URL] instead of [URL].

View 9 Replies

Actionscript 3.0 :: Difference Between ZendAMF And AMFphp

Jul 15, 2009

Whats the scoop?I watched Lee's tutorial on Zend and also the older ones for AMFPHP.Is one 'better' than the other? Doubt that since as I understand both are written by the same author, only Adobe 'officially' supports Zend.

My application is composed of 3 parts

1-an image editing tool allowing users to upload images, edit them, then post them to a server.

2-a publicly viewable gallery

3-a private 'admin' tool allowing the user to change their login settings and delete any uploaded images.

Are both Zend and AMFPHP equally robust and easy to implement when it comes to session registration and login?

View 1 Replies

ActionScript 3.0 :: Sending Values To Amfphp

Jan 20, 2009

I have struggled with this a while now, but I can't understand it. I want to send values from my flashfile to amfphp which will then update my database. This is the as3 code I use for sending:

[Code]...

View 5 Replies

ActionScript 3.0 :: Get Columns Comment With Amfphp?

Aug 1, 2011

I'm using amfphp to get some info from SQL database.

My php code of the file in "services" folder looks like[code]...

View 1 Replies

Php :: AMFPHP Flex Propel Mapping Class Bug?

Sep 23, 2009

I'm working on a website using :

- Flex 3.4
- AMFPHP 1.9b
- Propel 1.3
- PHP/MySQL

I'll try to focus on the problem which takes place in a whole system.To sum up, I have 2 entities (MySQL) :

create table AAA
(
id_AAA int not null auto_increment,
id_BBB int,

[code]....

I retrieve all my BBB, they are mapped from PHP classes (generated by Propel) to AS3 classes on the Flex side.But when I create a AAA row in the database.I retrieve all my BBB, and all objects are mapped EXCEPT the BBB whose id corresponds to the foreign key in the inserted AAA row.

if you know anything about how AMFPHP / Propel / Flex are dealing with Foreign Keys and why class mapping is failing right here.The weird thing is that it seems to happen only for this specific case ...

View 2 Replies

Database :: Saving Data From Flash Using Amfphp?

May 15, 2010

I know how to get the data from my database, but i can't seem to figure out how to send data to the database from flash using amfphp! give me an as3 and php service example.

View 1 Replies

ActionScript 3 :: AMFPHP Call From Server To Client

Sep 18, 2010

Is it possible to call a client method from server using AMFPHP? For example if there is a Flash chat app with PHP backend. Everytime a new chat is logged from one of the clients, server would call update in all of the clients?

View 2 Replies

Flex :: Security Amfphp With A Secure Channel

Jul 9, 2011

I have an application running on flex and php, connected using amfphp, i added a secure channel to services.conf of amfphp [code]how do i know if flex is actually using this secure channel? i tried [code]from the php side and they are both false ... but if i remove these checks it works fine, I'm using wamp, with mod_ssl, and working from localhost

View 2 Replies

Flex :: Call A Function In It From Php Side Of AMFPHP?

Aug 26, 2011

Is it possible to call a function in flex from the php side of AMFPHP?

For instance, and error is thrown in php, can i "listen" for it in the flex app?

View 1 Replies

Flex 4.5 :: RemoteObject And AMFPHP Over SSL With Self-signed Certificate

Nov 2, 2011

I'm trying to connect to AMFPHP over SSL (self-signed) from a Flex 4.5 application.Will this work? Or do I need an authority-signed certificate?Will it silently fail or prompt user like it does in browser?How do I need to edit the services-config.xml file for this to work?

View 1 Replies

Actionscript 3 :: Catch PHP Exceptions In Flex Without AMFPHP?

Nov 10, 2011

I'm looking for a way to catch an Exception thrown by PHP in Flex using HTTPService. Is it possible to do it without using AMFPHP?

In my current implementation, if an Exception is thrown in PHP, a FaultEvent.FAULT is indeed dispatched on Flex side. The only problem is that the exception's message string is nowhere to be found in FaultEvent.[code]...

View 1 Replies

Flex :: Getting A Sending Failed Error In AMFPHP

Dec 20, 2011

I am using remote object in flex to call a method in amfphp. I have project setup properly with a services-config.xml in d src, d end point uri pointing to the gateway.php. After testing on my localhost everything works fine but when I copied my files to a remote server repoint the uri in d servies-config and then recompiling the application gives a sending failed error.

View 2 Replies

Actionscript 3.0 :: Update Multiple Records At Once Using AMFPHP?

Jul 7, 2009

programming and on AS3... have patience. :s

I have the following on my php service file :
Code: Select all function updateRecords($id,$name,$age){
$query = mysql_query("UPDATE data SET name= '$name', age= '$age' WHERE id = '$id'");

[code]....

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved