Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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...
    4. 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 ? ...
    5. 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...
  3. #2

    Default 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

  4. #3

    Default 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

  5. #4

    Default 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

  6. #5

    Default 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

  7. #6

    Default 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

  8. #7

    Default Re: Flash Remoting

    Sorry should be var tnav=tnav; of course.
    doug777 Guest

  9. #8

    Default 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

  10. #9

    Default 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

  11. #10

    Default 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

  12. #11

    Default 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

  13. #12

    Default 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

  14. #13

    Default 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

  15. #14

    Default 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

  16. #15

    Default 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

  17. #16

    Default Re: Flash Remoting

    Thanks soooo much!!!


    Rick Guest

  18. #17

    Default 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

  19. #18

    Default 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

  20. #19

    Default 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

  21. #20

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139