remoting+flashcom
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: remoting+flashcom

  1. #1
    Danny Gomez Creations cosmiceye's Avatar
    Join Date
    Mar 2002
    Location
    under a palmtree in Jamaica waiting for psytopia 2005 to begin
    Posts
    982

    remoting+flashcom

    This is the deal:
    Use the flashcom server mainly for multimedia and live data syncroniszation. Use flash remoting to store data and make fast queries/resultsets. Now this sounds like the bomb, but thing is that I havent even got started with remoting, and I know theres a lot of others that havent and a lot of people who masters flash remoting.
    Maybe psychlonex, one of those who masters remoting& controls the universe, maybe he could push a flash remoting specific help forum someplace arround here?
    ..:: P S Y T O P I A 2 0 0 5 :::..
    . . . view the psytopia reels _____RIVEND REEL | GOMEZ REEL_____ . . . . . . . . . . .

  2. #2
    ASR | FlashComm Ceasar Aware0's Avatar
    Join Date
    Aug 2002
    Location
    Aurora, Colorado, USA
    Posts
    110
    I would just post ASR questions here. Psx and I know quite a bit about it already. I figure this forum is related to FRMX, but if not, I would suggest lookin on a ColdFusion site. There's really no complex script in ASR on the flash site. Once you learn the basic result object format and the NetServices Gateway, you're done. But maybe there should be a CF Forum...Might try 'Scripting & Backend', or Psx or myself.

    On a similar note, I can't get the SQL 'Contains()' statement to work from flash through remoting. I'm using Flash Dev Environment MX, ColdFusion Server MX(SE),Flash Remoting MX, and a Microsoft Access Database. I get an error when I pass a query like "Select * From MyTable Where Contains(EntryName, 'check')"

    Might be with the MSAccess DB but I know the SQL syntax is correct, I've checked quite a few times.

  3. #3
    Danny Gomez Creations cosmiceye's Avatar
    Join Date
    Mar 2002
    Location
    under a palmtree in Jamaica waiting for psytopia 2005 to begin
    Posts
    982
    My olw-eyes turns big as I read "Flash Dev Environment MX". What is this awesomly sounding thing, and how come I cant find anything about it at the macromedia site?
    Last edited by cosmiceye; 12-16-2002 at 06:35 AM.
    ..:: P S Y T O P I A 2 0 0 5 :::..
    . . . view the psytopia reels _____RIVEND REEL | GOMEZ REEL_____ . . . . . . . . . . .

  4. #4
    ASR | FlashComm Ceasar Aware0's Avatar
    Join Date
    Aug 2002
    Location
    Aurora, Colorado, USA
    Posts
    110
    Flash Development Environment is just the difinitive term for Flash MX. Since they(macromedia) decided that it would be awsome to have everything either use 'Flash' in the name, or to have initials with a select few letters(c, f, s, a), I call the thing that makes the swf's the Development Environment, cuz that's what other companies call similar applications.

    Sry to get you excited..

  5. #5
    Junior Member
    Join Date
    Aug 2000
    Posts
    9

    Not a Remoting God but a Remoting Demi God

    cosmiceye,

    I working on a project that does exactly what you are tlaking about. The setup is basically this: ColdFusion Server/IIS Box, FlashComm Server, SQL7 Server, File Server, and an Email Server. The project uses Flash Remoting to the ColdFusion Server, ColdFusion processes all Querys to the SQL7 Server and SMTP request to the Email Server and Controls access to the File Server. SQL7 holds all data on location of files on File Server, usernames, passwords and application settings and permissions. File Server holds all files related to the application. FlashComm Server holds all video files and shared objects. So if you need a hand on something chances are I've run into that problem!

    On a side note:

    Originally posted by Aware0
    On a similar note, I can't get the SQL 'Contains()' statement to work from flash through remoting. I'm using Flash Dev Environment MX, ColdFusion Server MX(SE),Flash Remoting MX, and a Microsoft Access Database. I get an error when I pass a query like "Select * From MyTable Where Contains(EntryName, 'check')"

    Might be with the MSAccess DB but I know the SQL syntax is correct, I've checked quite a few times.
    The way I set mine up is the CFC does ALL of the work and only returns a value back to me. Example:

    The CFC-

    Code:
    <cfcomponent>
            
    	<cffunction name="getUsers" access="remote" returntype="array">
    		<cfargument name="clientID" required='true'>
    		
    		<cfquery name="getUserList" datasource="MySource" dbtype="odbc">
    			SELECT fName, lName, emailPrimary
    			FROM tblUserInfo
    			WHERE clientID = '#arguments.clientID#'
    			ORDER BY lName
    		</cfquery>
    		
    		<cfset rList = ArrayNew(2)>
    		<cfset i=1>
    		<cfloop query="getUserList">
    			<cfset j = 1>
    			<cfset rList[i][j] = #lName#&", "&#fName#>
    			<cfset j=j+1>
    			<cfset rList[i][j] = #emailPrimary#>
    			<cfset i=i+1>			
    		</cfloop>
    		
    		<cfreturn rList>
    	</cffunction>
    <cfcomponent>
    The SWF File-

    There is a movieclip with the following attached to it:
    Code:
    onClipEvent(load){
         _level0.getMembers_List();
    }
    The Function Code:

    Code:
    getMembers_List = function(){
         clientID = _global.clientID;
         _global.mailService.getUsers(clientID);
         this.onResult = function(dataFromCFC){
              _global.usersList_rs = dataFromCFC;
         }
    }
    Now the record set is stored as a global array variable and avaiable to the whole move. If I need any infomation from it just treat to like any other array. The beauty of this is not readily in your face. But crunch on this, how do you make a 2 or 3 dimintion array in Flash. Have you ever tried? It's complicated and fustrating how ever if you make a 2 or 3 diminational array in the CFC (Like the above example CFC does) and pass it to Flash it recognizes it and treats it just like a 2 or 3 dimintional array. SWEET!!!!!!

    But making the CFC do the heavy lifting on Querying and Query Processing is definitly where it's at! So Happy coding.

  6. #6
    ASR | FlashComm Ceasar Aware0's Avatar
    Join Date
    Aug 2002
    Location
    Aurora, Colorado, USA
    Posts
    110
    I haven't tried queries from CFCs yet, because i use ASR instead. But my whole plan was to skip the CFML and ASR part all together and just do it all in flash, since I am only using CFSMX and FRMX to get data from a MSDB to flash anyways. I just made a simple ASR function that takes all input as a normal CFQuery or ASR(CF.Query) functions do. Since the scripting is so simple in the first place, might as well just skip the repetative queries and make dynamic functions for them.

    I use it like this
    Code:
    // ActionScript Remote Document
    // getQuery function
    // 'Datasource(pds)' and 'SQL Query(psql)' strings required.
    function getQuery(pds,psql,pun,ppw,pmr,pto){
    	nQuery = CF.query
    	({
    		datasource:pds,
    		sql:psql,
    		username:	((pun) ? pun : null),
    		password:	((ppw) ? ppw : null),
    		maxrows:	((pmr) ? pmr : null),
    		timeout:	((pto) ? pto : null)
    	})
    	return nQuery
    }
    This is the ASR that I use for all my flash remoting projects.
    Here's the AS code used to call a query.
    Code:
    #include "NetServices.as"
    #include "NetDebug.as"
    //-------------------
    Query = function () {
    };
    Query.prototype = {};
    Query.prototype.onResult = function(result) {
    	trace("Query Results");
    	for (i in result.items) {
    		trace("\tEntry "+i);
    		for (j in result.items[i]) {
    			trace("\t\t"+j+" = "+result.items[i][j]);
    		}
    	}
    };
    Query.prototype.onStatus = function(error) {
    	trace("Query Error:\n\tLevel: "+error.level+"\n\tDescription: "+error.description);
    };
    //-------------------
    NetServices.setDefaultGatewayUrl("http://localhost:80/flashservices/gateway");
    gatewayConnection = NetServices.createGatewayConnection();
    queryCall = gatewayConnection.getService("_assets._asr.getQuery", new Query());
    // Standard query
    queryCall.getQuery("mainDatabase", "Select * From Links Order By LinkName Asc, LinkUrl Asc");
    // Get a username record using an input field on the stage. 
    queryCall.getQuery("mainDatabase", "Select * From Users Where Username ='"+_root.username_txt+"%'");
    and that's it! no more messing with anything outside of the 'Flash Dev. Environment'(:-D cosmiceyes)



    PS - I guess we kinda already started using this forum for remoting. I dont see why we should stop now. They're so closely related in a sense of being new, external MM flash technology that we should prolly just keep it here. but then again, it's not my choice is it?

    PSS - John = FlashComm Ultra-God. Check out his site(Psychlonex's Website
    Last edited by Aware0; 12-16-2002 at 11:26 PM.

Posting Permissions

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




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com