Skip to main content
February 21, 2009
Question

I am a Flex/AS3 coder who is puzzled about basic Flash

  • February 21, 2009
  • 1 reply
  • 296 views
Hi there,
I am a FLEX coder with 6 months experience by way of Flex Builder. Coding business apps in AS3 is no big deal to me. The thing is, is that I am on a new project that uses Flash... and I am confused so I am looking for a bit of help.

Others on this project have created FLV movies - that is, the ones like you see on Youtube. They created them by shooting the content with a digital video camera and encoding it into FLV. What I need to do add some logic to the movie, such as detecting where in the movie it has been played to.

Do I need to create a new Flash program to load that movie? If so, how do I load it? Would I need to create a new interface to run that movie in, or can I just use the existing movie as the interface?

I understand that if a movie has "labels" at particular points in time, I can add an eventHandler to respond to the labels being triggered. But can I add "labels" to an existing movie?

Would I compile my Flash program with mxmlc, like I do in Flex?
This topic has been closed for replies.

1 reply

ghost31379
Inspiring
February 21, 2009
Hrmmm.....not quite sure I get your stand point and I'm kind of new to Flex :D.....
As for as the Playing FLV movies you can use the flvplayback component or create your own video component......
In flash you can write your scripts on a frame in the timeline......but once you get into complex scripting you will need to write classes in .as files
Detecting where in the video? Not too sure about your aim or purpose for detecting.....but I suppose you can use Timers and event handlers.....
to do certain tasks at a given time or run functions....etc.....
Your first step is to just get an flv to play....then you graduate....depending upon where you're at with flash :D

...thelegendaryghost
ghost31379
Inspiring
February 21, 2009
just in case you never got an flv file working in flash......here's some code.....jus copy and paste on the first frame of the main timeline....ie....open new fla.....select first frame.....press F9...(shortcut for actions panel) paste this code:


var video:Video = new Video();
addChild(video);
// pass null object cus you're not connecting to a server.....if you are....put in address
var connection:NetConnection = new NetConnection();
connection.connect(null);
var stream:NetStream = new NetStream(connection);
video.attachNetStream(stream);

stream.play("smoke.flv");
//the end

Change that smoke.flv....to whatever file thats on your computer and save file as whatever you call it....and run file...
if you dont know how to run.......just hit (ctrl+enter)
........ewww....its sleepy time for me.....
...any other questions....while i'm on :D