A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: interactive flv and alpha

  1. #1
    Junior Member
    Join Date
    Aug 2009
    Posts
    2

    interactive flv and alpha

    Hi, I am new in this forum. I would like ask if anyone can help me with some code advice about using code for video with as2.

    I am using AttachVideo() function for external flv videos and play them with play function play(urlvideo). My videos are some 3d animations rendered as avi with black background .

    Can anyone help me about the following:

    1. I would like to replace the black backgrounds on the external flv with some flash action scripted graphics as mc, while the flv video is running. Is there a way to use action script to simulate alpha channel for the black backgrounds (to make them transparent) on the rendered flv. ? Can you give me some code advice ?

    2. Can I play/stop or pause external videos during their play?
    (something similar to gotoAndPlay() function for the mc)
    For example:

    - I would like to avoid the first part my video and make it to start from its 100 frame or just to stop on the 100 frame on its duration.
    - Can I play my external video from end to begin (similar to Backwards Effect)
    I would appreciate you answers with some code advices or samples.

    Thanks of lot.

  2. #2
    Dignitary rynoe's Avatar
    Join Date
    Jan 2003
    Location
    Earth
    Posts
    760
    You can use cuepoints to do this.
    [SIGPIC][/SIGPIC]

  3. #3
    Senior Member
    Join Date
    Apr 2008
    Location
    Nottingham, UK
    Posts
    348
    to add to what the previous poster says: you can add cuepoints at rendertime and access them by creating a listener for the cuepoint metadata event.

    you can pause() a netstream object, and resume() when you need to.

    Not sure about playing a netstream in reverse though - it may well be best to do as much compositing as possible in your compositing package before rendering out your video, this includes any temporal changes you may wish to make.

    finally, render your video with an alpha/matte channel. the on2 vp6 flash codec will detect the alpha and you can use this in flash as per usual.

    a word of caution though: even with AS3 and the new flash 10 player, streaming a video with an alpha channel and playing animation or another video in the background requires a LOT of processing power. make sure you remember to test your work to death on a crappy machine/user test machine (of course this is one and the same thing, heh) because I guarantee you will be disappointed if you don't.

    Dan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center