[flexcoders] ID3 library?
Hi all - has anyone ever run across an actionscript library for reading/writing ID3 tags from music files? (ideally flac, but mp3 would be a start).. alternatively, does anyone have a favorite non-actionscript ID3 library that they are able to call from actionscript? Would prefer open source solutions, but would also consider just purchasing something if it was reasonable.. thanks for any pointers - david
[flexcoders] oval canvas
Hi All - can anyone point me to some ideas for creating an Canvas with an oval/circular border? I don't need the actual border line to be drawn, but rather need the background color of the Canvas to be a rounded shape.. thanks - david
[flexcoders] Trouble coding AS Effect
Hi all - I am having trouble locating the proper way to attach an effect via AS code.. at a high level, I have controllers that are associated with views (Canvas descendants).. works well for me, but now I would like to have controllerA hand off control to controllerB/ViewB using a WipeDown effect.. in other words, user clicks something, a new canvas slides down displaying something else and so on.. if I understand correctly, I don't get to use Transitions unless I change my views to be ViewStates.. I first tried using the help examples, which embed the effect in a tag, but the problem is that this tag is embedded inside the components tag and so setting the Canvas' showEffect is not working.. I can't even see how to set the showEffect prop in code.. Next, I tried creating a WipeDown in code, setting its duration prop and either setting the canvas.visible=true, OR calling wipeDown.play().. both fail - setting visible=true just ignores the effect, calling play seems to do nothing whatsoever.. tried attaching the canvas to the effect via effect constructor and also during the call to play(myCanvas).. same behavior (nothing).. this all looks like: var _wipeDown:WipeDown; _wipeDown = new WipeDown(myCanvas); _wipeDown.showTarget = true; // the default, I know _wipeDown.duration = 800; . . _wipeDown.play(); OR _wipeDown.play([myCanvas]); thanks for any thoughts - david buitenveld
[flexcoders] Re: socket question
thanks for the feedback.. this suggests that synchronous sockets are not possible? before I bail on this, is there any chance of not using events at all? rather, just processing the bytesavailalble value until non-zero? if things must be asynchronous, then it seems that the client is going to have to know about this.. perhaps my getServerData method below needs an extra param which is the callback method on the client when the data event is fired.. does that sound right? david --- In flexcoders@yahoogroups.com, Lachlan Cotter <[EMAIL PROTECTED]> wrote: > > Hi David, > > I tried doing something similar to this a while back but without > success. Others have also noted that there is no way to do thread- > blocking in Flex. The problem is that your onData method won't even > get called until next time through the Flex event loop; and that's > not going to happen until after getServerData has returned. So > unfortunately(?) it doesn't work to hang around in a loop until the > service call returns. I think you might be disappointed with this one. > > Cheers, > Lach > > > On 07/12/2006, at 11:00 AM, David Buitenveld wrote: > > > Hi all - > > > > I am creating a server interface, one of whose implementations > > involves talking over a socket connection. I have a need for > > synchronous behavior - I call an API method, say > > getServerData(aParam), and I get back the result that I want. Not sure > > what a good way to do this with sockets would be since the receive > > data event makes them asynchronous in nature - can anyone point me > > to a good tutorial, or provide a hint? > > > > Consider a made up example : > > > > class SocketServer implements Server > > private var _lastResult:String; > > > > // client calls this method and expects a result passed back > > public function getServerData(aParam:String): String { > > _socket.addEventListener(ProgressEvent.SOCKET_DATA, onData); > > connectToSocket(someHost, somePort); > > > > _lastResult null; > > issueCommandViaSocket(aParam); > > > > // sit around until we get data > > while (_lastResult == null) ; > > return _lastResult; > > } > > > > private function onData(e:ProgressEvent):void { > > _lastResult= socket.readUTFBytes(socket.bytesAvailable); > > } > > > > this works conceptually, except that the wait around part hangs the > > app.. if I remove that, then I can get the return value and log it in > > the onData method.. so, am I even on the right track here? Is there > > some way to have actionscript pause or wait until the desired event > > gets fired? > > > > thanks for any thoughts - > > > > david >
[flexcoders] socket question
Hi all - I am creating a server interface, one of whose implementations involves talking over a socket connection. I have a need for synchronous behavior - I call an API method, say getServerData(aParam), and I get back the result that I want. Not sure what a good way to do this with sockets would be since the receive data event makes them asynchronous in nature - can anyone point me to a good tutorial, or provide a hint? Consider a made up example : class SocketServer implements Server private var _lastResult:String; // client calls this method and expects a result passed back public function getServerData(aParam:String): String { _socket.addEventListener(ProgressEvent.SOCKET_DATA, onData); connectToSocket(someHost, somePort); _lastResult null; issueCommandViaSocket(aParam); // sit around until we get data while (_lastResult == null) ; return _lastResult; } private function onData(e:ProgressEvent):void { _lastResult= socket.readUTFBytes(socket.bytesAvailable); } this works conceptually, except that the wait around part hangs the app.. if I remove that, then I can get the return value and log it in the onData method.. so, am I even on the right track here? Is there some way to have actionscript pause or wait until the desired event gets fired? thanks for any thoughts - david
[flexcoders] Absolute Sizing
Hi all - Does anyone know a strategy for creating an application window size that is an absolute size in inches (vs pixels) independent of screen size or reslution? My goal is to simulate one of these new UMPC devices with a 7 inch screen, then compare the visual output to a 9 inch screen device - this simulation needs to run on whatever the client is running. My problem is that Capabilities.screenDPI is not returning a useful value. Example: on my laptop with 15 inch screen (12 inch horizontal, 9 inch vertical) is set to 1280x1024. Simple math tells me that I have 106.7 pixels for each horizontal inch of screen, and 113.8 pixels per inch of vertical. Skipping the math, I end up with a layout of 6.1x3.4 inches for my 7 inch device, which (via pixels per inch) gives a pixel resoultion of 651x353. And, this works pretty well when actually measured with a ruler. However - Capatilities.screenDPI tells me that I have 72 pixels per inch (at least the docs say that dots = pixels).. in other words, using the screenDPI figure results in a completely missized window. Is there a better way? thanks! david buitenveld -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/