Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Flex Flex is a highly productive, free open source framework for building and maintaining expressive web applications that deploy consistently on all major,how to,learn.

Flex Thread, Using the Flash FLVPlayback Component in Flex 2.01 in Web Technology; Categories: FMS , Flex Flexbuilder (FB) can be used to write AS3 code for Flash apps. It took a little ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=299


Reply
LinkBack Thread Tools Display Modes
Using the Flash FLVPlayback Component in Flex 2.01
 
 
Choose
SABRAWY's Avatar

Reply With Quote
 
Join Date: Aug 2007
Posts: 1,893
18-11-2007, 02:38 PM
 
Categories: FMS , Flex


Egypt.Com EnForum

Flexbuilder (FB) can be used to write AS3 code for Flash apps. It took a little effort to set it all up but once that first hurdle was taken things were running smoothly. And to be honest who'd want to use Flash's code editor after having used FB for a while? Not long ago Adobe released the Flex Component Kit for Flash CS3 on Labs. The kit allows you to use Flash content as components in Flex. I've seen that the kit is now part of Flex 3this patch applied (although I am not sure if the patch is needed).

One thing that is clearly lacking in Flex right now is a good set of video components. There's the VideoDisplay component but to be honest I never use it because it's quite restrictive. However I do like Flash's FLVPlayback component so I wnet ahead and created a Flash file which contains the AS3 based FLVPlayback component. I had a go at this exact same excercise a while ago but had no joy then. I'm glad to say that this time it worked, but I had some funky problems. However I think those problems were self inflicted so I won't detail them here.
Anyway, I created a SWC as detailed in the component kit's docs and added it to my Flash project library. I was then able to access the FLVPlayback component and all its methods, events and properties in Flex. Neat.
Long story short, I am posting all my files here in case someone will find them useful.
There are a few things to note however:
- you need to use the boundingBox MC in Flash (like I did) or the FLVPlayback component will break its boundaries in Flex due to the hidden seekbar being veeeery long (but invisible)
- if I resize the FLVPlayback component in Flex it scales the skin as well as the video. Someone got a workaround for that? - you need to 'dig' one level down to get at the FLVPlayback component itself from Flex. So instead of using player.source for example you need to use player.pb.source (pb being the name I gave the component in Flash, you may call it whatever name you see fit)
- I am not sure if FLVpb.as (the class used with Flash) is needed. I think it's left over from another exercise, you may be able to ignore it (plus the SWC is there for you anyway now)
Hopefully this makes sense. The video player can be seen here and sources are available here or via right click on the Flex app. Hopefully the files are not too jumbled up, it was not a normal Flex project as the Flash files were mixed into it in a FLA folder.
 
 
 
 
Moderator

Reply With Quote
 
Join Date: Sep 2007
Posts: 992
20-11-2007, 04:16 PM
 
Thanks Sabrawy
I will try to use it
__________________
Think More before Write one Word
 
 
 
Reply

Flex Thread, Using the Flash FLVPlayback Component in Flex 2.01 in Web Technology; Categories: FMS , Flex Flexbuilder (FB) can be used to write AS3 code for Flash apps. It took a little ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=299


Bookmarks

Tags
201, component, flash, flex, flvplayback

« - | - »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adobe Flex Builder 2.0.1 Developer Software and Programs 0 14-11-2008 11:43 PM
Lesson : Window Component Developer Articles 0 23-10-2008 02:43 AM
Implementing Click-To-Seek For The FLVPlayback Component SABRAWY Flash Media Server 0 17-09-2008 08:29 AM
Pro Desk Support [Joomla Component] Developer Extensions 0 18-08-2008 09:24 PM
i-flex solutions plans to open a support centre in Egypt SABRAWY News 0 21-11-2007 08:42 PM