[Flashcoders] FLV re-sizing
Hi. I want to be able to load an FLV into my embedded video object and if it is smaller than the video object, I want to center it within the frame. If it is bigger than the video object I want to re-size it to the object size. My code follows. When I try to load a small FLV in, it expands to fit the embedded video size. videoClip is the MC, theVideo is the embedded video. Thanks in advance, JP myStream.onStatus = function(info) { flvWidth = videoClip.theVideo.width; flvHeight = videoClip.theVideo.height; if ((flvWidth != 0) (flvWidth = 320) (flvHeight != 0) (flvHeight = 240)) { videoClip.width = flvWidth; videoClip.height = flvHeight; videoClip._x = ((320-flvWidth)/2); videoClip._y = ((240-flvHeight)/2); } else if ((flvWidth != 0) (flvWidth 320) (flvHeight != 0) (flvHeight 240)) { flvWidth = 320; flvHeight = 240; videoClip._x = 0; videoClip._y = 0; } } ___ 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] ExternalInterface
Thanks. I got it working. On 4/19/06, Mike Britton [EMAIL PROTECTED] wrote: Sorry about the crappily-formatted code - I'm writing it in GMail! FLASH: import flash.external.ExternalInterface; class blah { var instance:Object = new Object(); // Function alias for JavaScript var methodName:String = goToCuePoint; // Function alias for Actionscript var method:Function = setPlayIndexByTrack; function blah() { ExternalInterface.addCallback(methodName, instance, method); } function setPlayIndexByTrack() { trace(dude, JS just called my AS!); } } JS: script language=JavaScript function getNextTrack() { thisMovie(mediaPlayer).goToCuePoint(); } function thisMovie( movieName ) { if (navigator.appName.indexOf(Microsoft) != -1) { return window[movieName]; } else { return document[movieName]; } } /script hth, Mike ___ 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] ExternalInterface
Hi, I'm trying to use the ExternalInterface class to trigger a flash function from javascript. I've checked out some tutorials but can't get it to work. Could someone troubleshoot the following code. Thanks in advance, JP ACTIONSCRIPT CODE: /* ++ */ import flash.external.ExternalInterface; function stopMovie() { gotoAndStop(2); } ExternalInterface.addCallback(stopMovie, null, stopMovie); /* +++ */ JAVASCRIPT CODE: /* +++ */ script language=JavaScript var flash; window.onload = function() { if(navigator.appName.indexOf(Microsoft) != -1) { flash = window.flashObject; alert(flash); }else { flash = window.document.flashObject; alert(flash); } } function goToFlash() { flash.stopMovie(); } /script /* +++ */ FORM BUTTON: /* +++ */ form name=flashForm input type=Button value=Go to flash name=flashButton onclick=javascript:goToFlash(); style=width:100px; / /form /* +++ */ ___ 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] FLV frame capture
Hi, I need to capture the first frame of an FLV video file and convert it to bmp or jpeg. What's the best way to do this? Is it possible? Thank you in advance, JP ___ 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] Talking to Flash from JavaScript
http://www.permadi.com/tutorial/flashjscommand/ This example isn't working in firefox for me, although it claims to have been tested in FF. Anyone else having problems with this? Thanks, JP On 4/16/06, arturo 101 [EMAIL PROTECTED] wrote: I often use a code like this example: http://www.permadi.com/tutorial/flashjscommand/ And here http://www.macromedia.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03.html you have some methods to use with JS and actionscript. - Original Message - From: Jon Robert [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Sunday, April 16, 2006 11:49 PM Subject: [Flashcoders] Talking to Flash from JavaScript Hi, I have a flash video playing in an HTML page. I want to be able to click a link in the HTML (not in the movie) and have the flash video stop. What's the best way to accomplish this? JavaScript? Thanks in advance, JP ___ 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 __ InformaciĆ³n de NOD32 1.1454 (20060321) __ Este mensaje ha sido analizado con NOD32 Antivirus System http://www.nod32.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@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