Re: [Flashcoders] AS3 & detect end of FLV
Hi Eric. There are three ways that I know of to detect the end of an FLV. WARNING. I haven't tested this code, or looked it over for best practices, etc. 1) The simplest way is to use the FLVPlayback component and use the complete event. (The following assumes an FLVPlayback component is on stage and instantiated as "myVid", and haven't changed anything else. Without autoplay, for example, you'd have to add a line to play the vid, etc. You can also create an instance if it's in your library if that's better.): ** import fl.video.*; myVid.source = ".flv"; myVid.addEventListener(VideoEvent.COMPLETE, vidEnd); function vidEnd(evt:VideoEvent):void { trace("FLV has ended"); } ** 2) The second method is pretty much the same, but doesn't rely on the FLVPlayback component. Instead, it uses the VideoPlayer class. ** import fl.video.*; var vidPlayer:VideoPlayer = new VideoPlayer(); addChild(vidPlayer); vidPlayer.play(".flv"); vidPlayer.addEventListener(VideoEvent.COMPLETE, vidEnd); function vidEnd(evt:VideoEvent):void { trace("FLV has ended"); } ** This reduces file size because you aren't using the component, but it doesn't have a controller, or all the capabilities of the component (such as seeking to cue points). You also have to add code if you're streaming the video, because the component takes care of that for you. I haven't done that yet, so you'll have to look that up in the docs, sorry. I haven't had a need to save on file size so significantly that I skip the component. However, using this method does allow you to do things 100% with code, so you don't need the component in the library to begin with. 3) If you need to know the end is nigh, you'll need to look for the video's metadata. As far as this being "reliable" goes, this method requires that the metadata be in the FLV. Although different encoders add different ranges of features, most do add 'duration' metadata. You can also probably inject it using one of the third party metadata injectors, after the video has been encoded. To look for the metadata, you'd write an object that is assigned to the NetStream. Here's a simple example. ** var vidConnection:NetConnection = new NetConnection(); vidConnection.connect(null); var vidStream:NetStream = new NetStream(vidConnection); var vidDuration:Number; var vidClient:Object = new Object(); vidClient.onMetaData = function (md:Object):void { vidDuration = md.duration; } vidStream.client = vidClient; var myVideo:Video = new Video(); myVideo.x = myVideo.y = 100; myVideo.attachNetStream(vidStream); addChild(myVideo); vidStream.play(".flv"); ** >From there you can do something like this (though more efficient?): ** this.addEventListener(Event.ENTER_FRAME, checkVid); function checkVid(evt:Event):void { var timeDiff = (vidDuration - vidStream.time) if (timeDiff < 3 && timeDiff > 0) { trace("The video will end in less than 3 seconds"); } } ** --Rich Shupe On 4/20/07 4:07 PM, "eric e. dolecki" <[EMAIL PROTECTED]> wrote: > is there a reliable way with AS3 to detect the end of a FLV? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] swf to jpeg
You can save BitmapData using ByteArray in AS3. Tinic Uro has written JPEG and PNG encoders, as have some others. Check out www.kaourantin.net for more info. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] swf to jpeg
you could take an internal screenshot of the stage via BitmapData.draw() and save that as a jpg using a server. See Marios Bitmap Exporter: http://www.quasimondo.com/archives/000572.php but you will need a server and it is quite slow and processor intensive to save big images this way. Tho for a desktop solution you might need a different approach, you might need Apollos File I/O or maybe Screenwaver.org has some support for it .. best uli On 4/22/07, 2 lakes <[EMAIL PROTECTED]> wrote: Hi, This was just covered recently in thread discussing a coke site. I believe the architecture used SVG inside the flash app which was exported a Java app which coverted into a bitmap. Cheers Ian On 21/04/2007, at 5:23 PM, Jason Cordial wrote: > And a screen shot won't work? I'm going to say that yes, > technically it is > physically possible to do what you're asking. I'm just not sure the > best > way. I don't think (though I could be wrong here) that flash can > spit out a > bitmap from a movieclip, or that it can really spit out images at > all. It > can, however, turn a movieclip into a bitmap in a running swf. I've > never > had to actually get the bitmap out of the swf before though, so I'm > not > sure. What's it for? > > On 4/20/07, Sumeet Kumar <[EMAIL PROTECTED]> wrote: >> >> Hi All, >> >> >> >> >> >> Can I convert a movieclip data of the flash to jpeg image?I need this >> for a desktop solution. >> >> >> >> Any idea or solution will be a great help? >> >> >> >> Thanks And Regards >> >> Sumeet Kumar >> >> >> >> >> >> >> >> >> >> ___ >> Flashcoders@chattyfig.figleaf.com >> To change your subscription options or search the archive: >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >> Brought to you by Fig Leaf Software >> Premier Authorized Adobe Consulting and Training >> http://www.figleaf.com >> http://training.figleaf.com >> >> > > > -- > Jason Cordial > VIA 2 Lab Grunt - Waist deep beneath the borderline... > Life is a euhemerism... > http://bsu.edu/blogcaster2/jason/ > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Uli Schöberl 0049.162.3814313 aplusplus.org ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] swf to jpeg
I know that you can extract the bitmap Data from a movieClip and attach it to an empty movieClip by using the BitmapData class. You cannot save, though, the movieClip BitmapData on your computer by using actionscript. You'll need a Flash expander tool as Zinc for example... It can save bitmaps from the mc's on the hardisk, in many formats. On 4/22/07, 2 lakes <[EMAIL PROTECTED]> wrote: Hi, This was just covered recently in thread discussing a coke site. I believe the architecture used SVG inside the flash app which was exported a Java app which coverted into a bitmap. Cheers Ian On 21/04/2007, at 5:23 PM, Jason Cordial wrote: > And a screen shot won't work? I'm going to say that yes, > technically it is > physically possible to do what you're asking. I'm just not sure the > best > way. I don't think (though I could be wrong here) that flash can > spit out a > bitmap from a movieclip, or that it can really spit out images at > all. It > can, however, turn a movieclip into a bitmap in a running swf. I've > never > had to actually get the bitmap out of the swf before though, so I'm > not > sure. What's it for? > > On 4/20/07, Sumeet Kumar <[EMAIL PROTECTED] > wrote: >> >> Hi All, >> >> >> >> >> >> Can I convert a movieclip data of the flash to jpeg image?I need this >> for a desktop solution. >> >> >> >> Any idea or solution will be a great help? >> >> >> >> Thanks And Regards >> >> Sumeet Kumar >> >> >> >> >> >> >> >> >> >> ___ >> Flashcoders@chattyfig.figleaf.com >> To change your subscription options or search the archive: >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >> Brought to you by Fig Leaf Software >> Premier Authorized Adobe Consulting and Training >> http://www.figleaf.com >> http://training.figleaf.com >> >> > > > -- > Jason Cordial > VIA 2 Lab Grunt - Waist deep beneath the borderline... > Life is a euhemerism... > http://bsu.edu/blogcaster2/jason/ > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Omar Fouad - Digital Emotions... Love is always patient and kind. It is never jealous. Love is never boastful nor conceited It is never rude or selfish. It does not take offense and is not resentful. Love takes no pleasure in other people's sins...but delights in the truth. It is always ready to excuse, to trust, to hope... and to endure... whatever comes. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] swf to jpeg
Hi, This was just covered recently in thread discussing a coke site. I believe the architecture used SVG inside the flash app which was exported a Java app which coverted into a bitmap. Cheers Ian On 21/04/2007, at 5:23 PM, Jason Cordial wrote: And a screen shot won't work? I'm going to say that yes, technically it is physically possible to do what you're asking. I'm just not sure the best way. I don't think (though I could be wrong here) that flash can spit out a bitmap from a movieclip, or that it can really spit out images at all. It can, however, turn a movieclip into a bitmap in a running swf. I've never had to actually get the bitmap out of the swf before though, so I'm not sure. What's it for? On 4/20/07, Sumeet Kumar <[EMAIL PROTECTED]> wrote: Hi All, Can I convert a movieclip data of the flash to jpeg image?I need this for a desktop solution. Any idea or solution will be a great help? Thanks And Regards Sumeet Kumar ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Jason Cordial VIA 2 Lab Grunt - Waist deep beneath the borderline... Life is a euhemerism... http://bsu.edu/blogcaster2/jason/ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Papervision3D Terrain Demo with USGS SDTS DEM data
http://www.overset.com/2007/04/21/papervision3d-terrain-map-of-mammoth-mountain-ski-area/ Just put together a simple proof-of-concept by taking the USGS D.E.M. (Digital Elevation Model) data in SDTS format, converted it to a huge array of Vertex3D objects and did a ghetto-fab "triangulation" of the vertices for the Face3D objects. I'd honestly LOVE to put together a SDTS DEM to papervision3d Mesh3D conversion utility to literally load SDTS data on the fly, but that will not happen too soon =[ It appears to be 3080 Vertex3D objects and 5933 Face3D objects with my ghetto-triangulation. The "wireframe" texture with doubleSided=false seems to do alright in terms of performance and falls within the 15sec script execution limitation. We'll see how this does with a texture applied, if I can even accomplish this easily. ..comments? -- Jim Palmer ! Mammoth Web Operations ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] [Partially OT] NY Area CS3 Workshop
A couple of my students have asked that I post information here about a near-free CS3 Workshop that I'm doing in New York, in which Flash topics such as AS3 migration, Suite app integration, and CS3 Components will be covered. I searched for list policies about such things and couldn't find any guidelines. This is partially on-topic because of the Flash segments, but it also covers other CS3 apps so that's not really on-point. I don't typically like reading posts in this forum that are too oriented to promoting non-Flash things, so I'd like to satisfy the request but limit the info to off-list. If you are interested, and are in the NY area, you can visit the following url to learn more about a not-for-profit (it's only $25), half-day CS3 Workshop on Sunday, May 6 at the NY Hilton. http://www.fmaonline.com/shop/ If you are interested and decide to come by, introduce yourself and mention FlashCoders. I'd like to meet some of you face to face. (I hope this limited post met any list guidelines re: Flash-related events.) --Rich Shupe ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] swfs taxing some browsers more than others?
I just thought that of course Flashers are not the only ones who have to keep an eye on the performance there might be a very simple tool to continously watch a certain process or something. This could make it pretty straightforward to detect bad perfoming code early on ... I just can't imagine all the professionals work with this task manager. best On 4/21/07, Hairy Dog Digital <[EMAIL PROTECTED]> wrote: Same here Nik, All I do is watch the percentages on the Task Manager. Not an exacting science, but I believe that it needs to be. I just need to reasonably simulate systems at different levels. There are places that specialize in QA testing and benchmarking. For projects that warrant it, they are an awesome resource -- at a price. ...Rob ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Uli Schöberl 0049.162.3814313 aplusplus.org ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] swfs taxing some browsers more than others?
Same here Nik, All I do is watch the percentages on the Task Manager. Not an exacting science, but I believe that it needs to be. I just need to reasonably simulate systems at different levels. There are places that specialize in QA testing and benchmarking. For projects that warrant it, they are an awesome resource -- at a price. ...Rob ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] [semi-OT] - Preventing Software Piracy
not just yet, we are trying to get the go ahead for a demo first, do that, spec out the app fullyand approve the budget, so it might take a while. But I'll keep it in mind. What you have in mind is dongle-less, but protecting the swf from being decomplied? Or preventing it from being copyied tro say the hard disk? Thanks, NIk On 4/21/07, Michael Mudge <[EMAIL PROTECTED]> wrote: > And me ;) ! > > How would I connect such a dongle with the app I am trying to > preotect when I am using Director and / or Flash! I think I wasted a bit of your email blabbing about security. The reality is, you don't want a dongle, it just complicates things, and hardware is generally expensive. A decent and original licensing scheme ought to work fine. I think I can come up with some solutions for this... It may be a completely in-SWF solution, or a custom Projector program (.EXE that holds your .SWF). Is it worth my time to do some feasability testing? - Kipp ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Nik C ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] swfs taxing some browsers more than others?
To be honest at this moment all I am using is the Windows task manager, though it would be great to have a simulation tool that would allow you to enter - say - the minimum spec of the machines you woudl want your swf to run smoothly. Not super urgent, but a nice to have thing. Mostly you get a pretty good idea after running a site on a few machines whether it is too slow / taxing or whether it's OK Nik Crosina On 4/20/07, Uli Schöberl <[EMAIL PROTECTED]> wrote: does anyone of you use special tools to make this kind of performance benchmarks? or is it a watch and remember technique? someone must have tought about streamlining this process ... anyone has a hint to a tool ? best uli On 4/20/07, Hairy Dog Digital <[EMAIL PROTECTED]> wrote: > > > > once I get to the ranch ...? > > Err actually my office, where I have more than my laptop available to > me. > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > -- Uli Schöberl 0049.162.3814313 aplusplus.org ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Nik C ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] How to created TextField that has word reacting on RollOver events
Hi, I didnt try but if its html text that you want to put some actions, you may call javascript when roll over and javascript can trigger a flash function. Kerem. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mirza Hatipovic Sent: Saturday, April 21, 2007 11:13 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] How to created TextField that has word reacting on RollOver events Hi, I need to trigger an event in actionscript when somebody rollsover the word in a normal textfield. with css, it cannot be done. Any ideas? Regards, Mirza -- Mirza Hatipovic - Web Developer - Flash & PHP, Flex - tel.: 00387 62 245 501 or 00387 37 226 268 - Web: http://www.kancelarijahatipovic.com/bos/mirza.html ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com __ NOD32 2209 (20070421) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] qt-pano files in Flash
Hi Coders, I got a client wanting to have his panorama-shots to be able to work in Flash instead of quicktime. He got 200 ".pano" files, so they are all working in quicktime -you can move up and down and left and right as you can imagine of a classic panorama. But is ther a way to make the pano file to somehow be able to work in a flash environment? Thanks, Martin ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] How to created TextField that has word reacting on RollOver events
Hi, I need to trigger an event in actionscript when somebody rollsover the word in a normal textfield. with css, it cannot be done. Any ideas? Regards, Mirza -- Mirza Hatipovic - Web Developer - Flash & PHP, Flex - tel.: 00387 62 245 501 or 00387 37 226 268 - Web: http://www.kancelarijahatipovic.com/bos/mirza.html ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Need help with error, PLEASE HELP ME!!!
Is your class path set up to point to the com folder or is your swf file needing the class located in the same folder as your com folder? Where the actual swf is in relation to the class becomes important at compile time. On 4/18/07, Weyert de Boer <[EMAIL PROTECTED]> wrote: Cool company name! ;) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Jason Cordial VIA 2 Lab Grunt - Waist deep beneath the borderline... Life is a euhemerism... http://bsu.edu/blogcaster2/jason/ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] swf to jpeg
And a screen shot won't work? I'm going to say that yes, technically it is physically possible to do what you're asking. I'm just not sure the best way. I don't think (though I could be wrong here) that flash can spit out a bitmap from a movieclip, or that it can really spit out images at all. It can, however, turn a movieclip into a bitmap in a running swf. I've never had to actually get the bitmap out of the swf before though, so I'm not sure. What's it for? On 4/20/07, Sumeet Kumar <[EMAIL PROTECTED]> wrote: Hi All, Can I convert a movieclip data of the flash to jpeg image?I need this for a desktop solution. Any idea or solution will be a great help? Thanks And Regards Sumeet Kumar ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Jason Cordial VIA 2 Lab Grunt - Waist deep beneath the borderline... Life is a euhemerism... http://bsu.edu/blogcaster2/jason/ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com