Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / May 2004



Tip: Looking for answers? Try searching our database.

Flash remoting Bug

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tadeogutierrez - 26 Feb 2004 17:34 GMT
Hello,
This is driving me crazy. I reported this since plain MX and the bug is
present in MX2004 too.
=======================
Bug Description
=======================
Summary:
Flash Asset bug
Flash Movie inside Director will not fetch paged recordsets correctly.
Outside Director will work OK
Steps to Reproduce:
1.  Create an MSAccess db with a table named myTable with 2 fields inside:
Field1 and Field2
a) Create a datasource in coldfusion and name it myDataSource pointing to the
mdb file of step 1.

b) Create a component in ColdFusion and name it mycomponent.cfc in your
webroot:
<cfcomponent>
 <cffunction name="getRecords" access="remote"  RETURNTYPE="numeric">
    <cfquery name="theQuery" dbtype="odbc" datasource="myDataSource">
    SELECT * from myTable
    </cfquery>
    <cfset Flash.Pagesize = 10>
    <cfreturn theQuery>
 </cffunction>
 <cffunction name="populatetable" access="remote">
      <cfloop index="loopcount" from="1" to="100">
        <cfquery  datasource="myDataSource">
            INSERT INTO myTable(field1,field2) VALUES ('test1','test2')
        </cfquery>  
    </cfloop>
    <cfreturn 1>
 </cffunction>
</cfcomponent>

2. Create a movie in flash that uses remoting to fetch records from a
database.
a)create a text instance an name it mytext (to output the results)
b)In the first frame insert the next action script:
//------------------------------------------------------------------
#include "NetServices.as"
NetServices.setDefaultGatewayUrl([yourserverIP]/flashservices/gateway);
_root.GC=NetServices.createGatewayConnection();
_root.ServiceCFC = _root.gatewayConnection.getService("mycomponent", this);
_root.ServiceCFC.populatetable();

_root.theRecordset="";
//this object updates the status of received records
_root.theWatch = new Object();
//this function will update text field to display the number of records
received
_root.theWatch.modelChanged = function(info) {
    themessage="Event:"+info.eventName+"  
"+_root.theRecordset.getNumberAvailable()+ " of " +
_root.theRecordset.getLength() + " records have been downloaded."
    trace(themessage);
    _root.myText.text=themessage;
};
//rececive the answer to getrecords from server and create watch object
_root.getRecords_Result=function(aRecordSet){
    trace("answer received");
    _root.theRecordset=aRecordSet;
    _root.theRecordset.addView(_root.theWatch);
    _root.theRecordset.setDeliveryMode("fetchall");

}
//call recordset
_root.ServiceCFC.getRecords();
_root.myText.text="Starting..";
stop();
//---------------------------------------------------------------------
3. publish the movie as actionscript 1.0 and 2.0
=======================
Expected Results:
the movie runs ok on flash or in IE. you can se how it fetches pages of 10
records each
=======================
Actual Results:
If you import that flash movie to director mx 2004 only the first 10 records
are fetched

Thanks in advance
Vidal - 24 May 2004 17:31 GMT
Have you had any luck finding an answer to this?  I think I'm experiencing a similar issue:

http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=250&thre
adid=833474

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.