4 Replies Latest reply on Aug 23, 2013 2:49 AM by mavenni

    In need of help with this error


      so i have done some coding in flash develop for a flash app im building and while testing it i get this error message at runtime and i have no idea what it is and how to solve it heres the error message i get:

      ArgumentError: Error #2173: Unable to read object in stream.  The class flex.messaging.io.ArrayCollection does not implement flash.utils.IExternalizable but is aliased to an externalizable class.


      And heres the coding i've done


                import flash.display.MovieClip;
                import flash.display.Sprite;
                import flash.events.MouseEvent;
                import flash.net.NetConnection;
                import flash.net.registerClassAlias;
                import flash.net.Responder;
                import flash.text.TextField;
                //import com.demonsters.debugger.MonsterDebugger;
                //import mx.Collections.ArrayCollection;
                //registerClassAlias("flex.messaging.io.ArrayCollection", ArrayCollection);
                 * ...
                 * @author DAR
                public class Main extends MovieClip
                          private var conn:NetConnection;
                          public var name1:TextField
                          public var name2:TextField;
                          public var name3:TextField; 
                          public var name4:TextField;
                          public var rating1:TextField;
                          public var rating2:TextField;
                          public var rating3:TextField;
                          public var rating4:TextField;
                          public var comments1:TextField;
                          public var comments2:TextField;
                          public var comments3:TextField;
                          public var comments4:TextField;
                          public var inputName:TextField;
                          public var inputComment:TextField;
                          public var inputRating:TextField;
                          public var submitReviewBtn:Sprite;
                          public function Main() 
                                    trace ("document class running");
                          private function setupInputArea()
                                    submitReviewBtn.addEventListener(MouseEvent.CLICK, addNewReview);
                          private function addNewReview(e:MouseEvent):void 
                                    //Add review to database
                                    var resAddReview:Responder = new Responder(onAddReviewSuccess, onAddReviewFail);
                                    conn.call("yomo_films.addReview", resAddReview,  inputName, inputRating, inputComment);
                          private function addUserReview():void
                                    var resAddReview:Responder = new Responder(onAddReviewSuccess, onAddReviewFail);
                                    conn.call("yomo_films.addReview", resAddReview, "Amanda", 5 , "Really good movie");
                          private function onAddReviewFail(o:Object):void 
                          private function onAddReviewSuccess(o:Object):void 
                                    //Refresh all Reviews
                          private function getReviews():void
                                    //Create a responder object
                                    var res:Responder = new Responder(onResult, onFail);
                                    //Run a call to our service
                                    conn.call("yomo_films.getReviews", res);
                          private function onResult(o:Object):void
                                    //MonsterDebugger.trace("onResult", o);
                                    //Populate our reviews table
                                    for (var i:int = 0; i < 5; i++)
                                              //get our current name / rating / comments object
                                              var item:Object = [i];
                                              var nameTxt:TextField = getChildByName("name" + (i + 1)) as TextField;
                                              var ratingTxt:TextField = getChildByName("ratings" + (i + 1)) as TextField;
                                              var commentTxt:TextField = getChildByName("comments" + (i + 1)) as TextField;
                                              //test if we have a name
                                              if (item.name)
                                                        nameTxt.text = item.name;
                                                        ratingTxt.text = item.ratings;
                                                        commentTxt.text = item.comments;
                          private function onFail(o:Object):void
                                    //MonsterDebugger.trace("onFail", o);
                          private function setupConnection():void
                                    trace("Setting up gateway connection");
                                    //Create a new net connection
                                    conn = new NetConnection();
                                    //Connect to the net connection


      from the error i guessed it had something to do with flex but i dont use flex so i dont know what to do. I have been searching the for how to fix this error for over a week now and still no luck. i need some quick and fast help and intelligence on this please help!!