[flexcoders] Re: VideoDisplay
For a complete example project you can use check out http://www.flashcomguru.com/index.cfm/2009/1/15/FLVPlayback-2_5-component-in- Flex. Maybe have a look at: www.video-flash.de for a good open source player. Or google... There are lots out there. With examples of how to load the video (I use .flv's) via xml. --- In flexcoders@yahoogroups.com, christophe_jacquelin christophe_jacque...@... wrote: Hello, VideoDiplay is not displaying the video. I have try .mp4, .flv, .avi and .swf files. I have a black square. Could you send me the minimum basic code to display a video ? Thank you, Christophe,
[flexcoders] Unload sound when unloading module... how?
I am almost done creating a modular application to display my showreel. The main app has a ToggleButton Bar that calls the modules When a new module is called the previous one unloads - except in the radio/audio module, the sound continues to play. When I try and stop it using: if(_modUrl == modules/Telly.swf || modules/Print.swf) mp3Player.stop(); from the clickHandler function that calls the modules, I get a 1009 error. A null object reference... Presumably because the situation hasn't yet arisen and so the modules aren't yet loaded? When I try and place similar code inside the mp3Player itself, it gets ignored. Can anyone please provide me with any tips on how to manage this? I am using the open source xmlmp3player available at www.axelscript.com as my radioplayer, and the moduleManager class form letsflex.com as my module loader.
[flexcoders] Re: How to access module app. controls from within module?
Thanks. Putting event in as a parameter solved it. --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Not sure I understood. I would think you would get an exception give than you didn't pass any parameters into clickHandler() Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of spinglittery Sent: Sunday, February 22, 2009 4:53 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] How to access module app. controls from within module? When I call itemclick=parentApplication.clickHandler(); from my Module to the main App. where clickHandler = public function clickHandler(event:ItemClickEvent):void { _modUrl = modules/ + event.label + .swf; moduleHandler(_modUrl); ... it doesn't work -although clickHandler works to load modules from the main app. Can anyone give me any pointers as to what I am doing wrong, please?
[flexcoders] How to access module app. controls from within module?
When I call itemclick=parentApplication.clickHandler(); from my Module to the main App. where clickHandler = public function clickHandler(event:ItemClickEvent):void { _modUrl = modules/ + event.label + .swf; moduleHandler(_modUrl); ... it doesn't work -although clickHandler works to load modules from the main app. Can anyone give me any pointers as to what I am doing wrong, please?
[flexcoders] Unable to set up proxy for secure https in Blazeds
I am using Blazeds for the first time... trying to communicate with a secure api - and send a username and password over https, to receive xml response. But there seems to be a security sandbox violation between my flex app. and the Blaze/tomcat server I am using as my proxy on localhost: Connection to https://localhost:8400/Test/messagebroker/httpsecure halted - not permitted from http://localhost:8400/Test/Test-debug/Test.swf How do I get the Flex app. to send Test.swf via a secure channel? Would that solve my problem? Here is an excerpt from my proxy-config.xml: adapters adapter-definition id=http-proxy class=flex.messaging.services.http.HTTPProxyAdapter default=true/ adapter-definition id=soap-proxy class=flex.messaging.services.http.SOAPProxyAdapter/ /adapters default-channels channel ref=my-secure-http/ channel ref=my-http/ /default-channels destination id=photoshelter properties urlhttps://www.photoshelter.com/bsapi/1.1/?auth/url remoteusernameblah/remoteusername remotepasswordblah/remotepassword /properties adapter ref = http proxy/ /destination
[flexcoders] Re: httpService to api
Thanks for your input. I have been sending to an https destination - but probably over insecure http, which may beone reason why it is being rejected. I had thought that the protocol property had been removed/deprecated - because I can't see it in the Flex 3 HTTPService class documentation... From Docs: The mx:HTTPService tag accepts the following tag attributes: mx:HTTPService Properties concurrency=multiple|single|last contentType=application/x-www-form-urlencoded|application/xml destination=DefaultHTTP id=No default. method=GET|POST|HEAD|OPTIONS|PUT|TRACE|DELETE resultFormat=object|array|xml|e4x|flashvars|text showBusyCursor=false|true makeObjectsBindable=false|true url=No default. useProxy=false|true xmlEncode=No default. xmlDecode=No default. Events fault=No default. result=No default. / Also when I compile with it included, I get an error: 'Cannot resolve attribute 'protocol' for component type mx.rpc.http.mxml.HTTPService.' Where did you get the version you sent that lists 'protocol' as a property? Is it Flex 2.01? ( I have a foreboding that I may have to use Blaze DS in order to access a secure HTTPS channel...) I do understand that I need to get a session cookie from bitshelter, just not how to obtain it. Any further tips/ thoughts are appreciated. Posted by: Rob Kunkle [EMAIL PROTECTED] rob_kunkle Sat Nov 29, 2008 12:44 am (PST) I haven't used bit shetler, but from this response it looks like you first have to present your email address and password to and httpS service for identification. In exchange you get a cookie back, and then you present the cookie with subsequent requests. It's like when you go in a club, and the bouncer at the front door checks your id...he would be the httpS service. Then you get your hand stamped and you can come in and out for the rest of the night through any door. The hand stamp would be the cookie. I'm not sure if you need to set up a special services-config.xml...You might want to just try sending your request to httpS://pa.photoshelter.com (or whatever url you were sending the request to)...that would be the first thing to try. you also need to set the protocol property of your httpService to https. That will probably do the trick. You will probably then set up a second httpService for handling the rest of the api calls, and you will pass a cookie into this...probably just a string value. These requests would just go to the normal http service. Rob mx:HTTPService concurrency=multiple|single|last contentType=application/x-www-form-urlencoded|application/xml fault=No default. id=No default. method=GET|POST protocol=http|https result=No default. resultFormat=object|xml|flashvars|text serviceName=No default. showBusyCursor=false|true url=No default. useProxy=true|false xmlEncode=No default. xmlDecode=No default. / On Nov 28, 2008, at 8:20 AM, spinglittery wrote: Thanks for the input Rob. It is worse than I thought... Using trace(XML(evt.result).toXMLString()); as you suggested, I see I am not getting authorisation because the setRemoteCredentials function isn't being properly received... The xml returned is: BitShelterAPI version=1.1 identity companyPhotoShelter, Inc./company applicationPhotoShelter/application urlhttp://pa.photoshelter.com/url /identity response error classFieldRequiredErr/class messageYou are missing the required field lt;bgt;Passwordlt;/bgt;./message /error error classFieldRequiredErr/class messageYou are missing the required field lt;bgt;Emaillt;/ bgt;./message /error /response usage nameauth/name descThe authentication module returns an HTTP cookie that is required by all the other modules. This cookie is of a proprietary format and should be sent as is. Modules will return an updated HTTP cookie so that accurate idle time can be tracked. Calls to the authentication module must be made via an HTTPS connection./desc input U_EMAILemail address/U_EMAIL U_PASSWORDpassword/U_PASSWORD /input output cookiesession cookie/cookie orgorganization array/org O_IDorganization ID/O_ID O_NAMEorganization name/O_NAME OU_F_MEMorganization user member flag/OU_F_MEM /output /usage /BitShelterAPI I am somewhat concerned that perhaps I am not connecting via a secure connection.( Calls to the authentication module must be made via an HTTPS connection.) And wonder whether I need to write a services-config.xml file in order to establish https? Back to top
[flexcoders] httpservice to api
Ah-hah. I discovered that I have to use a proxy, otherwise the setRemoteCredentials function is ignored... Using a proxy and a services- config.xml to set parameters, I recokon I can specify https. Certainly I can specify it as destination: destination property destination:String [read-write] An HTTPService destination name in the services-config.xml file. When unspecified, Flex uses the DefaultHTTP destination. If you are using the url property, but want requests to reach the proxy over HTTPS, specify DefaultHTTPS. ,,,but I remain unclear whether that means that I am actually communicating across a secured channel... or just accessing a secure destination. Anyway, some light in the murk.
[flexcoders] re:httpService to api
Thanks for the input Rob. It is worse than I thought... Using trace(XML(evt.result).toXMLString()); as you suggested, I see I am not getting authorisation because the setRemoteCredentials function isn't being properly received... The xml returned is: BitShelterAPI version=1.1 identity companyPhotoShelter, Inc./company applicationPhotoShelter/application urlhttp://pa.photoshelter.com/url /identity response error classFieldRequiredErr/class messageYou are missing the required field lt;bgt;Passwordlt;/bgt;./message /error error classFieldRequiredErr/class messageYou are missing the required field lt;bgt;Emaillt;/bgt;./message /error /response usage nameauth/name descThe authentication module returns an HTTP cookie that is required by all the other modules. This cookie is of a proprietary format and should be sent as is. Modules will return an updated HTTP cookie so that accurate idle time can be tracked. Calls to the authentication module must be made via an HTTPS connection./desc input U_EMAILemail address/U_EMAIL U_PASSWORDpassword/U_PASSWORD /input output cookiesession cookie/cookie orgorganization array/org O_IDorganization ID/O_ID O_NAMEorganization name/O_NAME OU_F_MEMorganization user member flag/OU_F_MEM /output /usage /BitShelterAPI I am somewhat concerned that perhaps I am not connecting via a secure connection.( Calls to the authentication module must be made via an HTTPS connection.) And wonder whether I need to write a services-config.xml file in order to establish https?
[flexcoders] httpservice to api
I am a relative newbie in the Flex and development world, trying to extend my design skills. So please forgive any foolish errors. Presently I am attempting to communicate with the photoshelter api via httpservice, and need help. I can successfully log-in and get authorisation - but cannot work out how to actually access albums and galleries via their api xml syntax. (...although it looks as though it should be straightforward...) I have tried adapting code I found on flexexamples - dynamically-loading-xml-files-using-the- httpservice-tag: mx:Script ![CDATA[ import mx.rpc.http.HTTPService; import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; import mx.controls.Alert; private var alert:Alert; public function setRemoteCredentials(remoteUsername:String=,remotePassword:String=x, charset:String = null):void { httpService.url=https://www.photoshelter.com/bsapi/1.1/auth;; httpService.send(setRemoteCredentials); } private function loadGallery(src:String):void { httpService.url = https://www.photoshelter.com/bsapi/1.1/alb-qry;; httpService.send(); } private function httpService_fault(evt:FaultEvent):void { var title:String = evt.type + ( + evt.fault.faultCode + ); var text:String = evt.fault.faultString; alert = Alert.show(text, title); xmlListColl.removeAll(); } private function httpService_result(evt:ResultEvent):void { var xmlList:XMLList = XML(evt.result).alb; xmlListColl = new XMLListCollection(xmlList); trace(Done!); } ]] /mx:Script mx:XMLListCollection id=xmlListColl / mx:HTTPService id=httpService resultFormat=e4x showBusyCursor=true fault=httpService_fault(event); result=httpService_result(event) / mx:ApplicationControlBar dock=true mx:Button label=Data click=setRemoteCredentials()/ mx:Button label=Travel click=loadGallery('Travel'); / mx:Button label=Landscapes click=loadGallery('Landscapes UK'); / mx:Button label=gallery 404 click=loadGallery('gallery404.xml'); / /mx:ApplicationControlBar mx:TileList id=tileList dataProvider={xmlListColl} itemRenderer=TileListItemRenderer columnCount=3 columnWidth=150 rowCount=2 rowHeight=100 / /mx:Application -- //TileListItemRenderer// ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; mx:Image source=[EMAIL PROTECTED] horizontalCenter=0 verticalCenter=0 / /mx:Canvas I am unsure what I should put as the source - and have tried [EMAIL PROTECTED] as well as [EMAIL PROTECTED] But I am not sure that I am querying the api correctly... Whatever I am doing wrong, it also prevents the gallery 404 error message appearing anymore... Any help would be greatly appreciated.
[flexcoders] Data Transfer choices...?
My first post on this marvellous but bewildering resource... I am a designer/art director heading in the direction of development - and I am presently baffled by the number of varieties of possible data transfer, and don't know what to use. Almost all the data that I wish to display is visual or audio - print work, video, some sound production - and I don't know whether I should be storing my data in a mysql database and uploading it via AMFphp, Zend, Weborb or somesuch - or loading it from an external xml file and image/video/thumbnail folders. I would like to have optimum conditions for viewing the work at a good size without pixillation, but of course I want it to be fast enough to retain attention. Should I use modules to separate the image gallery from the video material? Would a framework help me? Would I be better off remaining in pure flash, avoiding the added Flex overhead? Or is there a way with actionscripted components of reducing and streamlining...? Would I be best off using HTTPService, Remote Object, Webservice, or NetConnection classes for my remote transfers? ( All my material can reside in the same domain...) There are so many amazing alternatives out there, I am spoiled for choice, and sometimes disappointed by the result after I have set everything up and compiled. Which may be my naivity in some area, rather than a problem with the method as a whole. I have made several stabs at using various open source and Adobe tutorial solutions - for instance, I rebuilt Video Jukebox only to find that the file size made it all far too cumbersome to be workable anywhere but locally... I would like the .flv's - varying from 15 to 180 seconds in length - to look respectable at 50% screen size, but this means many video players become sluggish. Is it because I am not using the best way of loading the data? I would be very happy if someone could give me some pointers. p.s: I can't afford to use Live Cycle/Cold fusion options - but should I be looking into Blaze DS, or Red 5, or is that overegging it for my needs? I won't have lots of dynamic data updates - but perhaps streaming is a big improvement on progressive? Wish I knew...
[flexcoders] Set as default application on Mac
When I attempt to set an .as file as the default application on Flex 2.0.1 and Mac OS, 'set as default application' is greyed out. Does anyone know a way around this? thanks in anticipation spin