Actionscript 3.0 :: AMFPHP Service To Calculate Square Root
Jan 24, 2009I'm starting to write services for AMFPHP and found this example that works
Code: Select all<?php
class HelloWorld
{
public function say($sMessage)
[Code]....
I'm starting to write services for AMFPHP and found this example that works
Code: Select all<?php
class HelloWorld
{
public function say($sMessage)
[Code]....
Is there a simple way of pressing a button on a flash calculator to calculate the square root (sqrt)? I cant find anything about it. for example
Code:
// Tangent of the angle in degree
function Dotan () {
if (display == 90) {
display = "Infinity";
[code]....
I have a number inside a variable. How do I trace the square root of the variable? for example: var xxyy = 57;
I want to trace the square root of 57;
does anyone know if there is a way to display the square root symbol in a text box flash 8 using actionscript? For instance I just want to display the square root of 4 just the problem not the actual calculated value.
View 1 Replieswhen creating a dynamic square with the api. 400 by 400. I am not sure why it wont draw the object
[Code]...
I have this game, and some levels have a moving square as the player, you move the square with your arrow keys.... I want to have an enemy square that chases the player square.... They only chased mario when you didn't look at them? Kinda like that...... but in this regards:
I only want the enemy square to chase the player square when the player square moves.... soo say the player square moves 5 pixels per movement (know how to do all that), I want the enemy square to move when the player square moves..... towards the player square at like 7 pixels per movement..... so eventually you won't be able to avoid the enemy square....
I as this working in AS2 and need to update to AS3...shows that AS3 doesn't like sloppy coding. Here's what I need: I pull data from an XML and that works when I put the data into a dynamic text box. However, I can't seem to get the date of birth into a variable. I have some code that calcs age in years but uses a string literal that I thought I could just replace with a variable from my XML...ain't a workin'. Here's the code I have:
ActionScript Code:
import flash.display.*;
import flash.text.*;
import flash.events.*;
[Code]......
I am experiencing a strange problem when I want to bind a service to a button or something else:
[Code]...
I can add the services to the Data Services panel but I have two strange things:
1) when I want to configure the return type he doesn't let me create a new ValueObject type, I only get the bottom datagrid which states: Properties returned by the operation: Property: country_Id, provence_Id, city_Id, id_cdpc, district_Id with the related values on the right side. Why can't I create a new data type on the top?
2) When I accept this and want to add the service call to a button (drag&drop) I get the following error: Error occurred while generating code. Make sure that there are no compiler eroors and try again after reopening the file. Componentn type services.cdpc.CDPC not found... (ps: When I perform a Test Operation everything seems to be ok, I get the expected output values)
Situation:
- We have a Flash application located on a SAP EP (let's say ep.x.com)
- We have a SAP ABAP Application (Webservices) on a SAP WebAS
server (abap.x.com)
- Clarification: This is not about Flash islands / but a normal Flash application communicating with WebAS ABAP via WebServices
Problem: Due to the changed security policy in Flash 10 this scenario does no longer work.
- A crossdomain policy file on root level cannot be deployed on root level
- The WebServices http/s headers cannot be modified, since the WebServices are generated by the WebAS IDE.
Comment: Technically there is a way to patch a WebAS ABAP,but this is not a practical / acceptable way in a normal SAP WebAS infrastructure.
Conclusion:- The above scenario (Flash from EP content / WebAS ABAP as backend) is a quite normal scenario in the SAP world.
- SAP / Adobe always features the close relationship between their technologies.
Question:- What could we do?
- How does the Visual Composer works around that problem?
I have a root stage, and a MC that is called from the root stage.Now from that MC, i will called in another MC2, and I wanted to placed the MC in the center of the stage. The reason I could not use normal ADDED_TO_STAGE at MC and define the center is because MC is not place in the exact position of the root stage (as in x, y=0). So if I would target MC2 at MC stage center, it would not be the exact center of the root stage/screen.How can I called the root stage properties rather than adding MC2 into the stage?
View 1 RepliesHow do you tell the root timeline to root.gotoAndStop(2); from the timeline of a movieClip added using addChild?In the maintime line I have
addChild(fade_eng);
and in fade_eng I have the following on frame 20
root.gotoAndStop(2);
this.gotoAndStop(1);
But I am getting 1061: Call to a possibly undefined method gotoAndStop through a reference with static type flash.display:Stage.
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]...
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 RepliesHow 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 Repliesconnectivity of data using AMFPHP between the flash frontend and the mysql database?
View 2 RepliesIs 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 Repliesis 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 Repliesits 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]....
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]...
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].
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?
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]...
I'm using amfphp to get some info from SQL database.
My php code of the file in "services" folder looks like[code]...
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 ...
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 RepliesIs 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 RepliesI 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 RepliesIs 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?
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 RepliesI'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]...