Hi (excuse me if there are grammar mistakes, I'm french),
I'm a beginner in AS3 but I know a bit better Flashpunk; whatever, I have really some difficulties to code in AS3 and can't get how to insert a video in an AS3 project using FlashDevelop.
Well I found some code for what I'm looking for, insert a flv video, here : http://www.flashdevelop.org/community/viewtopic.php?f=9&t=6407
But I have some issues to get this code working... As I said before I know better Flashpunk so it's hard for me to link basic AS3 with my knowledges in Flashpunk.
I tried to organize it in classes but I know these are wrong, but please, can anyone tell me how I should do to get the code working ? I think the "addChild" is only a Sprite or Movieclip function so my FLVplayback and PlayerGfx extend Sprite, but I don't know how to add them and display them... Here is my code :
public class testMyWorld extends World
{
public var player:PlayerGfx;
public var _FLV:testFLV;
public function testMyWorld()
{
_FLV = new testFLV;
player = new PlayerGfx();
}
}
public class testFLV extends Sprite
{
public var flvPlayback:FLVPlayback;
public var player:PlayerGfx;
public function testFLV()
{
flvPlayback = new FLVPlayback();
flvPlayback.skin = "none"
flvPlayback.autoPlay = false;
flvPlayback.source = "FLVSkyrim.flv"
player.addChild(flvPlayback);
}
}
and well I didn't know what to put in it but in the link before there is a "player class" so...
public class PlayerGfx extends Sprite
{
public function PlayerGfx()
{
}
}
I'm desperately looking for help, I can't find anyone that can explain me what I should do :/ I just need to display a video in as AS3 project for school and I don't want to use FlashProfessional... But I don't understand many things, such as addChild, display a Sprite Class, etc... But if you know an other code better that I could use and that you could explain to me, I would be very grateful.
Thanks in advance !
EDIT : gosh I'm sorry idk if I saw your answers at the time I asked this. The thing is, one of my coworkers at school wrote me a pretty nice bit of code that answered exactly what I needed to do because it was a bit tricky. I can give it to anyone who may need it, but I'm not sure it would suit any "usual" situation because it was pretty personalized and explained irl. Anyway, thanks for your answers.