Thanks for the tip. Most of what I've done is use a few Flex SDK classes in
Flash, custom Flash components in Flex with the kit. The only Flash component
I've ever used in Flex has been the FLVPlayback component, and I've never had a
problem with runtime exceptions related to focus. It's simple: in the apps I've
used, the FLVPlayback component doesn't accept keyboard focus, perhaps because
the UIMovieClip does not posses the required class members.

_______________________________________________________________

Joseph Balderson, Flash Platform Developer | http://joeflash.ca


Alex Harui wrote:
> OK.  I don’t know what the EULA says about your options, but keep in 
> mind that mixing fl.* and mx.* components doesn’t work for fl.* 
> components that get keyboard focus.  You’ll start getting runtime 
> exceptions.  So this might work for FLVPlayback, but I wouldn’t 
> guarantee it for other fl.* components.
> 
>  
> 
> ------------------------------------------------------------------------
> 
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *Joseph Balderson
> *Sent:* Sunday, August 10, 2008 9:34 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] Extending A Class From an External Source 
> Produces Error 1017: Base Class Not Found
> 
>  
> 
> Awesome. That did the trick! Thanks Alex.
> 
> I've since figured there are four ways to instantiate the FLVPlayback 
> component
> in Flex, which will be the topic of a few upcoming articles:
> 
> 1) Use the Flex Component Kit to wrap the FLVPlayback in a UIMovieClip (a
> well-known implementation)
> 
> 2) Reference the FLVPlayback component class in the Flash CS3 installation
> directly, though this involves a few hacks since the class is expecting 
> to find
> certain MovieClip assets which are not there if you don't use the SWC. 
> (which is
> what I was trying to do)
> 
> 3) Merge all the class files from all fl.* package locations (there are 
> four) in
> the Flash CS3 installation directory into a local src/fl/ package, 
> though you'll
> have to employ the same hacks as 2) - not my first choice, as it 
> potentially
> breaks the EULA.
> 
> 4) Just place the FLVPlayback SWC in the /libs directory from C:\Program
> Files\Adobe\Adobe Flash 
> CS3\en\Configuration\Components\Video\FLVPlaybackAS3.swc
> This is my preference, since it's clean and doesn't involve the hacks 
> necessary
> in 2) & 3).
> 
> __________________________________________________________
> 
> Joseph Balderson, Flash Platform Developer | http://joeflash.ca 
> <http://joeflash.ca>
> 
> Alex Harui wrote:
>>  Try just
>>
>>
>>
>>  C:\Program Files\Adobe\Adobe Flash CS3\en\Configuration\Component
>>  Source\ActionScript 3.0\FLVPlayback
>>
>>  ----------------------------------------------------------
>>
>>  *From:* flexcoders@yahoogroups.com 
> <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com 
> <mailto:flexcoders%40yahoogroups.com>]
>>  *On Behalf Of *Joseph Balderson
>>  *Sent:* Sunday, August 10, 2008 12:50 PM
>>  *To:* flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
>>  *Subject:* [flexcoders] Extending A Class From an External Source
>>  Produces Error 1017: Base Class Not Found
>>
>>
>>
>>  I'm creating a class which extends FLVPlayback directly, without using
>>  UIMovieClip, and implements IMXMLObject so it can be instantiated in
>>  MXML. The
>>  fl.* package where the class resides is listed as an external source,
>>  and the
>>  Flex code assist finds the package just fine.
>>
>>  Problem is, when I try to compile, I get an error "1017: The definition
>>  of base
>>  class FLVPlayback was not found." on the line 6 in FLVpb.as where the
>>  class is
>>  declared. (see below)
>>
>>  I am completely puzzled. I've used external classes before, but I am
>>  unsure why
>>  I am getting an error this time. Anyone have any ideas?
>>
>>  (I know there's a bunch of other stuff I need to include in FLVpb to
>>  make sure
>>  FLVPlayback plays well with Flex, this is just an initial prototype)
>>
>>  Here's my code:
>>  -----------------------------------------
>>  [source path] FLVPlayback-fl:
>>  C:\Program Files\Adobe\Adobe Flash CS3\en\Configuration\Component
>>  Source\ActionScript 3.0\FLVPlayback\fl
>>
>>  (Note: I could include all four places where the fl.* code resides in
>>  the Flash
>>  CS3 installation, but it doesn't seem to make a difference to this error.)
>>
>>  -----------------------------------------
>>  com.communitymx.flashflex.FLVpb:
>>
>>  package com.communitymx.flashflex
>>  {
>>  import fl.video.FLVPlayback;
>>  import mx.core.IMXMLObject;
>>  import flash.display.MovieClip;
>>
>>  public class FLVpb extends FLVPlayback implements IMXMLObject
>>  {
>>  public function FLVpb()
>>  {
>>  //TODO: implement function
>>  super();
>>  }
>>
>>  public function initialized(document:Object, id:String):void
>>  {
>>  document.rawChildren.addChild(this);
>>  }
>>
>>  }
>>  }
>>  -----------------------------------------
>>  Main.mxml:
>>
>>  <?xml version="1.0" encoding="utf-8"?>
>>  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml 
> <http://www.adobe.com/2006/mxml>
>>  <http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml>>"
>>  xmlns:ff="com.communitymx.flashflex.*"
>>  layout="absolute">
>>  <ff:FLVpb x="50" y="50" id="player"
>> 
> source="http://www.papervision3d.org/showreel/publicbeta/Papervision3D.flv 
> <http://www.papervision3d.org/showreel/publicbeta/Papervision3D.flv>
>>  <http://www.papervision3d.org/showreel/publicbeta/Papervision3D.flv 
> <http://www.papervision3d.org/showreel/publicbeta/Papervision3D.flv>>" />
>>  </mx:Application>
>>
>>  --
>>  __________________________________________________________
>>
>>  Joseph Balderson, Flash Platform Developer | http://joeflash.ca 
> <http://joeflash.ca>
>>  <http://joeflash.ca <http://joeflash.ca>>
>>
>>
> 
> 


------------------------------------

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
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/

Reply via email to