Welcome, Guest. Please login or register.
Did you miss your activation email?
05/22/12, 17:16
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  Flex, Air, FlashBuilder, Catalyst (Moderators: ..:: Mazhar Hasan ::.., kofi addaquay)
| | |-+  confused with classes
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: confused with classes  (Read 1228 times)
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6175


View Profile WWW Email
« on: 03/19/10, 13:57 »

Hi,
I am working on a Flex-Project with AMFPHP data communication.

Here is the startup definition, which makes trouble, and I dont see why:
Code:
import mx.rpc.Responder;
import mx.rpc.events.FaultEvent;

private var shopCon:NetConnection=new NetConnection();
private var dataresponder:Responder=new Responder(dataReceived, onFault);
private var gromitResponder:Responder=new Responder(gromitReturn, onFault);

the two responders cause the error (possibly undefinded methode Responder) and dont compile.

But it was working before.
Logged

happy flashing
Cool
Ronald
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6175


View Profile WWW Email
« Reply #1 on: 03/19/10, 14:20 »

weird thing on mouseOver:

on the left side, it says mx.rpc.Responder, on the right side it says flash.net.Responder.

I think the compiler gets confused - why - how can I prevent it from this weird behaviour?

BTW. I am working with flashmaker 4
Logged

happy flashing
Cool
Ronald
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6175


View Profile WWW Email
« Reply #2 on: 03/20/10, 03:36 »

I found it myself - this makes it even more weird Wink

If you don't import any Responder class, it works.

I just removed the two import lines - and made the FaultEvent an object in the onFault function.

This means again - never copy old code from older projects Wink
Logged

happy flashing
Cool
Ronald
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #3 on: 03/25/10, 12:16 »

Remoting on AS3 is based on NetConnection only as you discover by yourself

Jorge
Logged

Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6175


View Profile WWW Email
« Reply #4 on: 03/25/10, 14:18 »

I copied code from a former version, which was running perfectly.
This just happens with flashmaker 4.
In flexmaker 3 it was compiled perfectly.
Logged

happy flashing
Cool
Ronald
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything