Ask a Question related to Macromedia ColdFusion, Design and Development.
-
newuser111 #1
flash remoting
hi,
i try to put little bit more flash into my pages.
i took the flash1 sample app and changed the size of the layer. when i
exported the new flash file to make it swf i received the message :
can not find netservices.as as well as netdebug.as
anyone an idea?
am not very sure if i am on the right forum?
thx
newuser111 Guest
-
Flash Remoting from Flash (not Flex) via AMF3
Hello, I'm trying to fashion a flash application with AS3 under Flash against Coldfusion 8 via the AMF3 / flex2gateway. I receive this error on... -
Consuming Flash arrays with flash remoting
Hello, Does anyone know of some resources where you can get examples of consuming a flash array with a coldfusion component using flash... -
Flash Media Server vs Flash Remoting
I was wondering what are the pros and cons of moving our text based broadcast service from Flash Remoting to Flash Media server. Right now we have... -
Does Flash Communication server include Flash remoting ?
We plan to use Flash communication server and flash remoting. Now the most simple question, does the com-server already include flash remoting ? ... -
CF 7 and Flash Remoting
I hope this is a pretty simple question. I have Flash Remoting set up under my old cf 6.1 environmnent (but I don't recall what we did to set it... -
deepu_verma #2
flash remoting
I am using the remote object with endpoint set to the coldfusion server on a
different box.
1. How will the remote object work in this case (will the call to the remote
server go from the flash client or it will use the flex proxy)
2.
[url]http://livedocs.macromedia.com/flashremoting/mx2004/using_flash_remoting/0000007[/url]
1.htm
shows how to work with flash remoting while passing objects. Don;t you think
by passing the name of the classes between the two layers will create more
dependency between the two.
deepu_verma Guest
-
Rick #3
Flash Remoting
I am not sure if I am going to say this right. But here goes. I am try to
use Flash Remoting with my cfform (Flash). What I want to do is two things.
Is this possible?
One show an alert if under certain conditions.
Two make a certain Tab active under certain conditions. (tabnavigator)
Here is my cfc remoteing file that gets called.
<cffunction name="gettax" output="false" description="Returns the current
time"
access="remote" returntype="string">
<cfargument name="SState" required="false" type="string" default=""/>
<cfargument name="stax" required="false" type="string" default=""/>
<cfif ucase(arguments.SState) is "NC">
****** show alert here *****
<cfset stax = 0.059>
<cfelse>
******* Make tab index 2 active. *******
<cfset stax = 0>
</cfif>
<cfreturn stax />
</cffunction>
Thanks for any help you can give!!!
Rick Guest
-
doug777 #4
Re: Flash Remoting
You can't do it directly in the CFC. You can either use the returned
variable stax and then in the AS check whether it's 0 or >0, or if there
are more options, make stax a structure and add whatever you want to it
and then look through the object in AS, or you could add the items to a
list (as long as the order is always the same) which looks like a string
to AS then convert it to an array in AS and loop through the array.
As you find the items in AS you can perform whatever action you want:
alert("This sales tax is excessive");
tnav[1].enabled = true;
and so on,
Doug
doug777 Guest
-
Rick #5
Re: Flash Remoting
Is there any references you can give me to the AS check? I am unfamiliar
with that.
Thanks!!!
"doug777" <doug777@ms15.hinet.net> wrote in message
news:e0nnjf$4bn$1@forums.macromedia.com...> You can't do it directly in the CFC. You can either use the returned
> variable stax and then in the AS check whether it's 0 or >0, or if there
> are more options, make stax a structure and add whatever you want to it
> and then look through the object in AS, or you could add the items to a
> list (as long as the order is always the same) which looks like a string
> to AS then convert it to an array in AS and loop through the array.
>
> As you find the items in AS you can perform whatever action you want:
>
> alert("This sales tax is excessive");
>
> tnav[1].enabled = true;
>
> and so on,
> Doug
Rick Guest
-
doug777 #6
Re: Flash Remoting
If in formgroup tabnavigator id="tnav"
var tnav=tnav
responseHandler.onResult = function(results:Number):Void {
if(results) {
alert("This sales tax is excessive");
} else {
tnav[1].enabled=true;
}
}
Doug
doug777 Guest
-
-
Rick #8
Re: Flash Remoting
I am sorry for my ignorance but this is ActionScript correct? Where does
this go in the main cfm file correct? How is it called?
Thanks Again!!
"doug777" <doug777@ms15.hinet.net> wrote in message
news:e0no4u$4tf$1@forums.macromedia.com...> If in formgroup tabnavigator id="tnav"
>
> var tnav=tnav
> responseHandler.onResult = function(results:Number):Void {
> if(results) {
> alert("This sales tax is excessive");
> } else {
> tnav[1].enabled=true;
> }
> }
>
> Doug
Rick Guest
-
doug777 #9
Re: Flash Remoting
If you are using flash remoting then it goes in the result handler of
the remoting function which will either be in the flash form or in an AS
page in your movie presumably.
Doug
doug777 Guest
-
doug777 #10
Re: Flash Remoting
I just realize that what you mean by make tab 2 active is this:
tnav.selectedIndex = 1;
not .enabled
Doug
doug777 Guest
-
Rick #11
Re: Flash Remoting
I am beginning to understand how this works.
Is there a way to do a conditional if statement based on what is retuned
instead of if something is returned? Like this...but this does not work.
responseHandler.onResult = function(results:Number):Void {
stax.text = results;
if(results = 10) {
alert("This sales tax is excessive");
} else {
tnav.selectedIndex = 1;
}
}
Thanks for all your help!!
"doug777" <doug777@ms15.hinet.net> wrote in message
news:e0nokk$5en$1@forums.macromedia.com...> If you are using flash remoting then it goes in the result handler of the
> remoting function which will either be in the flash form or in an AS page
> in your movie presumably.
>
> Doug
Rick Guest
-
doug777 #12
Re: Flash Remoting
If you type if (results = 10) {} then results will always equal 10
because what you are saying is: set results equal to 10, so the if will
always be true.
If you want to check the equivalence of results and 10, you have to use
the equivalence operator which is == (is equivalent to)
so if you type if (results == 10) {} you will get the desired result.
Doug
doug777 Guest
-
Rick #13
Re: Flash Remoting
Like Javascript I see.
Thanks!!
"doug777" <doug777@ms15.hinet.net> wrote in message
news:e0pt8o$p1n$1@forums.macromedia.com...> If you type if (results = 10) {} then results will always equal 10 because
> what you are saying is: set results equal to 10, so the if will always be
> true.
>
> If you want to check the equivalence of results and 10, you have to use
> the equivalence operator which is == (is equivalent to)
>
> so if you type if (results == 10) {} you will get the desired result.
>
> Doug
Rick Guest
-
Rick #14
Re: Flash Remoting
I would like to send two variables over to the cfc file but one seems to get
ignored. Is my code wrong? Can I make two calls like that?
//get service. First parameter is path to component and
//the second it's the object that will handle the response
myService = connection.getService("cgi-bin/flashRemotingResponder",
responseHandler );
//make call
myService.gettax(SState.text);
myService.gettax(SCity.text);
You have been a lot of help I realy apreshate it.
Rick
"doug777" <doug777@ms15.hinet.net> wrote in message
news:e0pt8o$p1n$1@forums.macromedia.com...> If you type if (results = 10) {} then results will always equal 10 because
> what you are saying is: set results equal to 10, so the if will always be
> true.
>
> If you want to check the equivalence of results and 10, you have to use
> the equivalence operator which is == (is equivalent to)
>
> so if you type if (results == 10) {} you will get the desired result.
>
> Doug
Rick Guest
-
doug777 #15
Re: Flash Remoting
You can simply send them both together:
myService.gettax(SState.text, SCity.text);
Then in the cfc put two cfargument in the same order.
<cfargument name="stateText" type="string" required="yes">
<cfargument name="cityText" type="string" required="yes">
The value in SState.text will end up in the cf variable stateText and so
on for as many arguments as you want.
Doug
doug777 Guest
-
-
Rick #17
Re: Flash Remoting
How about on the return. Is there a way to return more than one variable?
Something like
if(results.stax == -1) {
Thanks again!!
"doug777" <doug777@ms15.hinet.net> wrote in message
news:e0q873$7sq$1@forums.macromedia.com...> You can simply send them both together:
>
> myService.gettax(SState.text, SCity.text);
>
> Then in the cfc put two cfargument in the same order.
> <cfargument name="stateText" type="string" required="yes">
> <cfargument name="cityText" type="string" required="yes">
>
> The value in SState.text will end up in the cf variable stateText and so
> on for as many arguments as you want.
>
> Doug
Rick Guest
-
Rick #18
Re: Flash Remoting
Would you use more of these?
<cfreturn qty />
<cfreturn stax />
Thanks!!
"Rick" <rick@di-wave.com> wrote in message
news:e0rrun$hci$1@forums.macromedia.com...> How about on the return. Is there a way to return more than one variable?
> Something like
>
> if(results.stax == -1) {
>
> Thanks again!!
>
> "doug777" <doug777@ms15.hinet.net> wrote in message
> news:e0q873$7sq$1@forums.macromedia.com...>>> You can simply send them both together:
>>
>> myService.gettax(SState.text, SCity.text);
>>
>> Then in the cfc put two cfargument in the same order.
>> <cfargument name="stateText" type="string" required="yes">
>> <cfargument name="cityText" type="string" required="yes">
>>
>> The value in SState.text will end up in the cf variable stateText and so
>> on for as many arguments as you want.
>>
>> Doug
>
Rick Guest
-
Rick #19
Re: Flash Remoting
Ok I figured out how to get more than one variable back but how do I loop
through and separate them.
responseHandler.onResult = function(results:Number):Void {
stax.text = results;
}
what I am getting looks like this.
57.34,99.00
I want to put 57.34 in the stax field and 99.00 in the shipping field.
Thanks for ALL you help!!!
"Rick" <rick@di-wave.com> wrote in message
news:e0rs1n$hfo$1@forums.macromedia.com...> Would you use more of these?
>
> <cfreturn qty />
> <cfreturn stax />
>
> Thanks!!
>
> "Rick" <rick@di-wave.com> wrote in message
> news:e0rrun$hci$1@forums.macromedia.com...>>> How about on the return. Is there a way to return more than one variable?
>> Something like
>>
>> if(results.stax == -1) {
>>
>> Thanks again!!
>>
>> "doug777" <doug777@ms15.hinet.net> wrote in message
>> news:e0q873$7sq$1@forums.macromedia.com...>>>>> You can simply send them both together:
>>>
>>> myService.gettax(SState.text, SCity.text);
>>>
>>> Then in the cfc put two cfargument in the same order.
>>> <cfargument name="stateText" type="string" required="yes">
>>> <cfargument name="cityText" type="string" required="yes">
>>>
>>> The value in SState.text will end up in the cf variable stateText and so
>>> on for as many arguments as you want.
>>>
>>> Doug
>>
>
Rick Guest
-
doug777 #20
Re: Flash Remoting
You're right, you can only return one thing from a function, but that
thing can be a query, a structure (and for both these the AS return type
should be Object), a string, a number and what you've got this time, a
list. Since this is a list, your variable type should be results:String,
not :Number.
Unfortunately AS does not have any list handling capabilities, so you
need to turn this into an array. In flash forms we can't use the 'new'
keyword so do it like this:
var retarray:Array = results.split(",");
Now retarray[0] will equal 57.34 and retarray[1] will equal 99.00, so
stax.text = retarray[0];
Always glad to be of help, but I'm off the forum for a while so if you
want more help I suggest you start a new thread.
Doug
doug777 Guest



Reply With Quote

