Flex :: Sending AMF Typed Objects Back To PHP?

Oct 29, 2011

I succeeded in sending typed objects from a PHP application to a flex front-end using Zend_AMF as per this question. The problem I am facing now is that I would like to send a typed object from flex to PHP and on the PHP side, be able to receive it as a typed object instead of stdClass.

Here is the class in flex:
package com.mysite{
[Bindable]
[RemoteClass(alias="CTest")]
public class CTest {
public var stuff1:String;
[Code] .....

After some testing, I removed the namespace from the PHP object and moved it into the global namespace. This seems to have resolved the issue. I have tried setting RemoteClass to modules estingCTest and also modules.testing.CTest. $_eplicitType was then set to the same value for both tests. The result is that when I use modules.testing.CTest, this is the classname that Zend_AMF sees. If I use namespace notation, Zend_AMF sees modulestestingCTest, as all the slashes get stripped out. But how can I get this working with php namespaces?

View 1 Replies


Similar Posts:


Php - Flex Is Deserializing Generic Objects From Zend AMF Instead Of Strictly Typed Objects

Mar 4, 2012

I'm using Zend AMF to send my remote objects to Flex. I've defined a Constant class and created getASClassName() method. Then I've created Action script class in flex.

Objects are send successfully, but they are deserialized to generic Objects in Flex instead of specific ones. EDIT: On network monitor in Flex I can see that AMF value is set to com.my.project.valueobjects.Constant. Although array from event.result contains Objects.

[Code]...

View 1 Replies

Flex :: Collection Of Typed Objects?

Apr 13, 2011

For example in Java you can do:List<Person> where Person is the object type.In AS3/FlexArrayCollection which takes any object type. Is there any way to create a list/collection of declared objects in AS3/Flex (or is it impossible due to weakly typed language)?

View 2 Replies

Flex :: What Is Faster - Plain Or Strongly Typed Objects

Feb 15, 2010

So is
public var user:Object = {};
user["firstName"] = "Bill";
user["lastName"] = "Cosby";

Slower than if I have a value object like User?
var user:User = new User();
user.firstName = "Bill";
user.lastName = "Cosby";

View 2 Replies

.net :: Receiving Generic Typed Custom Objects Through AMF In Flex

Apr 27, 2010

Is it possible to receive custom generic typed objects through AMF? I'm trying to integrate a flex app with an existing C# service but flex is choking on custom generic typed objects. As far as I can tell Flex doesn't even support generics, but I'd like to be able to even just read in the object and cast its members as necessary. I basically just want flex to ignore the <T>. I'm hopeful that there's a way to do this, since flex doesn't complain about typed collections (a server call returning List works fine and flex converts it to an ArrayCollection just like an un-typed List).

The custom C# typed class
public class TypeTest<T> {
public T value {
get; set; }
public TypeTest () {
}}

The server method returning the typeTest
public TypeTest<String> doTypeTest() {
TypeTest<String> theTester = new TypeTest<String>("grrrr");
return theTester;
[Code] .....

Irritatingly if I change the result handler to take parameter of type Object it works fine. How to make this work with the value object?

View 2 Replies

Flex :: Coldfusion Returning Typed Objects / AMF Remoting

May 26, 2010

Is the same possible in ColdFusion? Currently I am using .Net/Fluorine to return objects to the client. Whilst in testing I like to pass strings representing the select statement and the custom object I wish to have returned from my service. Fluorine has a class ASObject to which you can set the var 'typeName'; which works great.

I am hoping that this is possible in Coldfusion. Does anyone know whether you can set the type of the returned object in a similar way. This is especially helpful with large collections as the flash player will convert them to a local object of the same name thus saving interating over the collection to convert the objects to a particular custom object.

[Code]...

View 2 Replies

Java :: Why Value Objects Coming Back As Generic Flex Objects

Aug 4, 2011

I will try to give as much detail as I can. I am creating an CRM application using Flex(Cairngorm 2)/Java/Hibernate. The basic problem I am having is this: I have a Customer class in Java that has an ArrayList of Address classes. I have a Customer class in Flex that has an ArrayCollection of Address classes. When I make the remote object call for a Customer I get back a Customer object in Flex, but the ArrayCollecion objects have a data type of Object instead of Address. If I try to call for a List of Address classes I get the same result. If I try to call for a List of Customer classes I get a list of Customer classes in Flex. Using tomcat 6 with the following jars:

[Code]...

View 1 Replies

C# :: Actionscript 3 :: Typed Objets Serialization To C# Hashtables And Back?

May 5, 2011

i need to serialize AS3 strong typed Objects, send them to a C# Application and then be able to derserialize them as Hashtables/Dictionarys or so because i have no corresponding C# Class. I then will make some changes to that Hastable and need to be able to send them back to the as3 App. I tried using JSON (see this question with bounty Typed AS3 JSON Encoder and Decoder ?) as i already got JSON serialization to Hashtables in C#. It does not work because AS3 has no support for typed JSON.

I also looked in XML and found asx3m http://code.google.com/p/asx3m/ which is strong typed in as3 but i can find a solution to serialie and deserialize this to proper hashtables in c#.

View 1 Replies

Django :: Pyamf Register Class Not Mapping Strongly Typed Objects As Expected

Nov 15, 2011

I'm using Pyamf as my backend for my Flex app and I'm seeing some weird problems with the mapping of the stongly typed classes.[code]When I do that in Flex, I get my SouvenirAct objects are typed as they should be, BUT then the child souvenir objects are all null. So when I force the casting of the SouvenirAct objects in the return result, I get null for the child properties that are strongly typed.Has anyone see this before? Is there a different way I should be mapping classes?

View 2 Replies

ActionScript 2.0 :: LocalConnection - Remote SWF Sending Back Value Twice

Nov 18, 2009

I've got a problem with the LocalConnection. I've got 2 swf's and I call one to get a value which then sends it back to the first. It's working, but it seems like the 2nd swf, which is called remote.swf, is sending the value back to the player.swf twice. I've pasted the codes form each swf below. The first is the player.swf which is asking for the value, and the second is from remote.swf which is generating the code:

ActionScript Code:
var comPlayLC = new LocalConnection();
comPlayLC.send("rpLC", "received");
comPlayLC2 = new LocalConnection();
comPlayLC2.received = function(val) {
info = val.split("|");
[Code] .....

View 3 Replies

ActionScript 2.0 :: Sending MC's To The Back (stacking Order)?

Jan 28, 2004

Basically I have a little app where a pop up palette contains dragable movie clips that then are placed on the main stage. However when the palette pops up for a second time it remains behind the placed movie clips. The clips have to be on top of the palette initially, but something like on release swapDepths?

View 14 Replies

ActionScript 2.0 :: Sending Rectangle To Back Layer

Mar 25, 2008

I've created a rectangular box with actionscript (code follows) and I need to make sure this stays in the background - so all other movieclips and symbols are visible when they are positioned over the top of it. I guess it's using the swapDepths function although not sure?

this.createEmptyMovieClip("rectangle_mc", 10);
rectangle_mc._x = 15;
rectangle_mc._y = 285;
drawRoundedRectangle(rectangle_mc, 520, 100, 15, 0x2C79BE, 100);
function drawRoundedRectangle(target_mc:MovieClip,
[Code] .....

View 3 Replies

ActionScript 2.0 :: Sending Images To The Back When Clicked?

Dec 20, 2011

basically im making an image gallery this is what ive done so far imported all of my images that i wanted to use and converted them to movie clips ive put these movie clips in another movie clip which is masked with an instance name of master_mcthe images are placed on top of each other so it looks like a stack of photos what i want to do is when the user clicks the image on the top it should send it to the back of the stack of images and continue to do this for all photos

View 8 Replies

ActionScript 2.0 :: Sending MC's To The Back (stacking Order)

Jan 28, 2004

Basically I have a little app where a pop up palette contains dragable movie clips that then are placed on the main stage. However when the palette pops up for a second time it remains behind the placed movie clips.

The clips have to be on top of the palette initially, but something like on release swapDepths?

View 14 Replies

ActionScript 3.0 :: FileReference - Sending Data Back To Flash From PHP?

Feb 11, 2009

Is there any way to send data back to flash after using a FileReference upload? Basically I'm uploading an image and I want my PHP script to return some information back to flash after the upload.

View 2 Replies

ActionScript 3.0 :: Sending Flash Form Data To PHP And Reading Back XML?

Sep 24, 2009

sent form data in Flash to a PHP script before and then read in a variable (say a user id) that gets passed back by the PHP. simple enough.but if the script passes back XML, how do i read that in?elow is the code i've used to send PHP a name and an email address and get back a userid, but i'm not sure how to go about writing the code if the script is passing flash a chunk of XML instead?

ActionScript Code:
var userRequest:URLRequest = new URLRequest("saveUser.php");
var userLoader:URLLoader = new URLLoader();

[code].......

View 1 Replies

ActionScript 3.0 :: Sending Variables In Flash Back To HTML Page

Dec 16, 2009

I had posted this in the PHP section but think it may be more relevant in Flash as have'nt had any replies yet..I have been asked to create a photo canvas website that allows users to upload an image, then apply several effects such as re-sizing/cropping/desaturate, then viewing the updated image on a generic wall and going to check out to buy the canvas.I am pretty new to web developing/designing, i am confident with html,css and actionscript to an extent, but have only used small parts of php before.My biggest worry is how to go between html > php >flash >back to html again.From what i understand i need to create the following functions:

1. Create a general html website which will store the upload form and flash photo editor swf on, when the user first access's the site i start the php session...

2. The user then uploads there image to the server using a simple php upload form which will store the file and create a unique named file also on the server...

3. The flash editor swf will then load up on the html page. Inside the actionscript of the swf i will tell flash to continue with the php session by calling it again and call users image on the server with the 'file reference' command. The editing functions such as cropping, canvas size will all have variables to mark what the user has chosen and these varaibles will get ent back to the html page using php to keep track of them for the checkout process...

4. Once the editing has finished the user will click 'finish' in the swf taking them to the php shopping basket/checkout which will call the variables sent in flash to determine final cost depending on what effects chosen.

Is the above correct and more importantly is it possible? The main part i am struggling to get my head around is editing in flash (say changing the uploaded image to 20 x 26) and then saving this back to the server and sending the new settings back into the html/php page.Is this all possible without using database and tables such as MySql?

View 0 Replies

ActionScript 3.0 :: Sending A Value From A Class Back To The Maintime Line & Calling A Method

Sep 22, 2009

I'm now finding the great need for classes as my current project is getting quite gummed up with too much scripting in the main document. Becoming a real pain to find stuff with in my code.

So I started writing a class to takes an id passed to it from the main time line, accesses my mySql DB, pulls the related info and the processes it. What I can't seem to figure out, is how to pass a variable back to the main time line. The traces all work, so I know my class works. I've searched here and via google, but I must not be searching the right stuff because I get a lot of results with are usually very complicated questions that don't yield the answers I need.

so here we go. my main.fla (and question):

Code:
import Name;
var theUserName:String = "Joe";
var processName:Name = new Name(theUserName);

[Code]....

ps: what's it called when trying to call a method from the main time line? or passing a property back to the main? are there specific terms for these?

View 10 Replies

ActionScript 1/2 :: Get Back Into Initial Frame After Sending User GotoAndPlay Action?

Feb 4, 2010

I have multiple frames with stop-points and labels on my timeline and an action where if the user holds down the button for >1 sec it will go to one frame, if <1 sec it will "gotoAndPlay" a warning animation. after that animation plays i want them to be sent back to the initial frame that they were previously in.

View 3 Replies

Actionscript 3.0 :: FireFox Upload - Get The Focus Back By Sending A Call To Javascript

Dec 21, 2009

I have a picture upload function in my flash and when I upload a picture I lose focus on the flash. This results in that all my listeners disappears. I cant click buttons, use dragbars etc. This only happens in FF. Im using flash player 10 and Snow Leopard. ive tried to get the focus back by sending a call to javascript:

[Code].....

View 2 Replies

ActionScript 3.0 :: Sending Objects To Php?

Oct 12, 2009

how I can send objects to php:

Quote:

var test:Object = new Object();
test.var1 = 1;
test.var2 = "one"
var request:URLRequest = new URLRequest( "path_to_php_file" ){

[Code].....

View 4 Replies

Flex :: Send Typed Object From FMS To Client

Jan 2, 2010

I have following object in the FMS

User = function(userName,userId)
{
this.userName = userName;
this.userId = userId;
}

I need to send the list of user to the client swf. Once I initialized the User object collection to an array, array element is undefined when I read it from the client.

[Code]...

View 2 Replies

Flex :: Initialize Two-dimentional Typed Vector?

Aug 15, 2010

How can I initialise two-dimentional typed Vector is AS3? Now I can get working only this:

private var _mainArray : Array = new Array( MyConst.DIMENTION );
public function MyArray()
{[code].....

View 1 Replies

ActionScript 2.0 :: Sending Complete Objects To Php

Feb 5, 2007

i have been doing some experimenting with sending variables to php from flash. but i need to extend my sending class so i can send variables, arrays or objects without having to define the vars before i send them. in other words the number of vars i need to send must be dynamic.so far i made an sidesollution by compressing an array to a string, then send it and then exploding it to an array again when it reaches php. this is really a last resort in my eyes, and i would like to send complete objects that php can read.

View 4 Replies

Actionscript 3 :: Displaying Content From BulkLoader Which Is Typed As MovieClip In Flex App?

Dec 24, 2009

I am using bulkLoader to load dozens of SWFs into my Flex app, and all of SWFs are static (1 frame only). 'Everything' works fine, however, I'm not sure how to handle data from bulkLoader... I am getting MovieClip types for all of my SWFs, and I am not sure how to tell to Image or SWFLoader classes to use some of those MovieClips as source.

View 1 Replies

ActionScript 3.0 :: Sending Position Of Objects To External Script

Oct 7, 2009

I have a flash script which creates instances of movie clips and stores them in an array. What I want the script to perform next, is when clicking a "save" button the position and the movieclip class name of each created instance will be sent to an external script to store.

View 6 Replies

Manage The Layers And Objects And To Place In Front/back Of Each Other

Aug 22, 2009

I don't understand how it's possible to have a lot of objects on the stage and be able to manage the motion tweens with all of them, but ALSO manage which objects are in front and which are in back of each other. I have a military type animation and there is a lot of action going on, and there are times where I need some of my guys to be in front of objects, and times when they need to be behind.
 
I don't know how to manage the objects in regards to layers and motions in a way so I can get the objects in the order I need them to be (like which item goes in front of the other).
 
Does anyone have any tips or a way that I can manage my objects and motions and be able to sort them on the stage so that I can arrange the objects how I need them to be in regards to placement and which should be in front of other objects?

View 4 Replies

ActionScript 3.0 :: Getting A Timer Counting Down From 5 To Go Back Up To 5 When Objects Collide?

Apr 23, 2009

Not only am I a newcomer to these forums but I'm also very much a newcomer to ActionScript, so I hope you will have some patience if you are able to provide me with a crystal clear answer to my problem and I'm still a little lost! Basically, I have made a flash game where the player moves around on screen and tries to collect a little ball. There a timer on the ball that counts down to 5. One of two things can happen from here: 1. If thetimer reaches 0 before the player collects the ball, the ball is moved to a new random location, the players "lives" count goes down by 1 and the timer goes back up to 5. 2. If the player collects the ball before the timer reaches 0, then the player's "score" count goes up by 1 and the ball moves to a new location with the timer going back up to 5.

[Code]....

View 5 Replies

ActionScript 2.0 :: Objects Re-spawning When Coming Back To Frame?

Nov 20, 2010

what happens is I have a key, a door and a health bar and an enemy. the enemy takes off some of my health...I pick up the key and it disapears and is added to my inventory. I then us it to open door then my character can move off the screen to the next frame where there is a castle., but my health bar is full again. when I go back into the previous frame the key is back, the door is closed and I cant pass through it again until I pick up the key.

the only way I have found around this is to make sure the objects are in every frame but that only solves a few problems. one of the problems is my health bar always re-plenishes no matter what when going from frame to frame. and I still cant pass thru the door even though its open.

View 1 Replies

ActionScript 3.0 :: Calling Libarary Objects Referring Back To The Timeline?

Jul 20, 2009

How do I call an object from the library in ActionScript 3.0? Once I do, how do I refer back to the timeline in ActionScript 3.0?

View 7 Replies







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