Expand my Community achievements bar.

Cocomo without flex

Avatar

Level 1
Hello,

Is it possible to use the cocomo api without flex, mxml... ?

( is it possible to use cocomo only with actionscript 3, no
mxml )

thank you

7 Replies

Avatar

Level 1
Thank you Nigel,



I tried to use COCOMO without MXML (but with the proper flex
SDK), but I got this error without stop:



#THROWING ERROR# onError from URLLoader. Error.:
<[IOErrorEvent type="ioError" bubbles=false cancelable=false
eventPhase=2 text="Error #2032: Erreur de flux. URL:
http://connectnow.acrobat.com/oxmo456/test/?x=0%2E3780770283192396&mode=xml"





I finally found a solution, the error disappears when the SWF
is embed in a HTML page...!!?? any reason for that ?



this is a part of the code that I use:



Avatar

Employee
I don't see any reason why this would work when embedded in
an HTML page and not work if not embedded.



Could you try again and send the full debug log up to the
point of the error ?



thanks!



Avatar

Level 1
Hi Raff,



here is what i got:



Cocomo Beta Build # : 0.9

requestInfo
http://connectnow.acrobat.com/oxmo456/test/?mode=xml&x=0.8052213843911886

getMeetingInfo: status=0

#THROWING ERROR# onError from URLLoader. Error.:
<[IOErrorEvent type="ioError" bubbles=false cancelable=false
eventPhase=2 text="Error #2032: Erreur de flux. URL:
http://connectnow.acrobat.com/oxmo456/test/?x=0%2E8052213843911886&mode=xml"



this is only trace log, error is catch...



(URLLoaders listeners inside MeetingInfoService removed),
here is what i got:



Error #2044: ioError non pris en charge : text=Error #2032:
Erreur de flux. URL:
http://connectnow.acrobat.com/oxmo456/test/?x=0%2E010875246953219175&mode=xml

at
com.adobe.rtc.session.sessionClasses::MeetingInfoService/requestInfo()[F:\DATA\WEB\WORKSPACE_FDT\TEST_COCOMO\src\com\adobe\rtc\session\sessionClasses\MeetingInfoService.as:106]

at
com.adobe.rtc.session.sessionClasses::MeetingInfoService/requestRoomInfo()[F:\DATA\WEB\WORKSPACE_FDT\TEST_COCOMO\src\com\adobe\rtc\session\sessionClasses\MeetingInfoService.as:85]

at
com.adobe.rtc.session.managers::SessionManagerAdobeHostedServices/getMeetingInfo()[F:\DATA\WEB\WORKSPACE_FDT\TEST_COCOMO\src\com\adobe\rtc\session\managers\SessionManagerAdobeHostedServices.as:67]

at
com.adobe.rtc.session.managers::SessionManagerAdobeHostedServices/
http://www.adobe.com/2006/connect/cocomo/session/internal::login()[F:\DATA\WEB\WORKSPACE_FDT\TEST_CO...

at
com.adobe.rtc.session::ConnectSession/login()[F:\DATA\WEB\WORKSPACE_FDT\TEST_COCOMO\src\com\adobe\rtc\session\ConnectSession.as:406]

at
Cocomo()[F:\DATA\WEB\WORKSPACE_FDT\TEST_COCOMO\src\Cocomo.as:35]

at
Main()[F:\DATA\WEB\WORKSPACE_FDT\TEST_COCOMO\src\Main.as:21]



when i try to load "
http://connectnow.acrobat.com/oxmo456/test/?x=0%2E8052213843911886&mode=xml"
with an URLLoader i have a HTTPSTATUS CODE = 0 and an IOError...



with WireShark, it seems that there is a redirection (server
side, http status 300)..... .. maybe the Standalone flashplayer is
not able to handle redirection ?



sorry, my english is not very good : |



Avatar

Employee
Well, I tried to build an AIR app with no MXML and run it in
the Standalone player and... it works :(



This was on Windows XP with FlashPlayer 9 (9.0.124 debug
version).



Can you tell us more about your configuration ?



Avatar

Level 1
Hi,



Windows XP



standalone DEBUG flash player 9.0 r115 ---> ERROR

standalone DEBUG flash player 9.0 r151 ---> ERROR

standalone DEBUG flash player 10.0 r12 ---> ERROR



standalone flash player 10.0 r12 ---> ERROR

standalone flash player 9.0 r115 ---> ERROR



i am using COCOMO SWC for flash player 9



here is the code that i use:



<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" applicationComplete="init()">

<mx:Script>

<![CDATA[

import com.adobe.rtc.authentication.AdobeHSAuthenticator;

import com.adobe.rtc.events.SessionEvent;

import com.adobe.rtc.pods.simpleChatClasses.SimpleChatModel;

import com.adobe.rtc.session.ConnectSession;



private var _auth : AdobeHSAuthenticator;



private var _session : ConnectSession;



private function init():void{

_auth = new AdobeHSAuthenticator;

_auth.userName = "user_name";

_auth.password = "password";

_session = new ConnectSession;


_session.addEventListener(SessionEvent.SYNCHRONIZATION_CHANGE,
syncChange);

_session.addEventListener(SessionEvent.ERROR, sessionError);

_session.authenticator = _auth;

_session.roomURL = "room_url";

info.text+="start cocomo\n";

_session.login();

}

private function sessionError(e : SessionEvent) : void {

info.text+="SESSION ERROR >
"+_session.isSynchronized+"\n";

}

private function syncChange(e : SessionEvent) : void {

info.text+="sync change > "+_session.isSynchronized+"\n";

}

]]>

</mx:Script>

<mx:TextArea x="10" y="10" width="480" height="480"
id="info"/>

</mx:Application>



I compile this code with Flex Builder 3.0.194161

once built, if I run the SWF directly, I get an error
(SessionEvent.ERROR)

the HTML version works properly (ConnectSession syncronized)



when i build an AIR application (air 1.5) with the same code,
application is working correctly inside AIR environement...



best regards



oxmo456

Avatar

Employee
I tried your app and it still works for me :(



I didn't have a chance to downgrade my Flash Player yet (I am
using 9.0.124 that I think it's the latest Player 9) but I am quite
sure that that isn't the problem.



Is it possible that you are testing on a brand new machine
(or VM instance) where the Windows Internet stack is complaining
that you are going from an insecure URL (http) to a secure URL
(https ?)



I know that on a brand new Windows install if you were to try
to access an http page that redirects you to https Internet
Explorer would popup a dialog box asking you if you accept the
redirect (with the option to disable the popup). In the same case a
Flash application will get an error because it doesn't know how to
show the dialog box. The error disappear once you disable the
dialog in Internet Expolorer (and it reappear if you reset your
security setting to the default)



Again, not sure if this is your case, but I am running out of
ideas :)