Here's what I think is part of the solution but I need to know how to do this in Koolmoves.
1. I try this : flv.netStream.play(rtmp://url.com/directory/vid.mp4)
2. But I need to break this up and access the NetStream and NetConnection
objects to format the rtmp and make it use the correct server port which I am hearing it port 443.
3. I'm seeing info that says connect to the directory and not the video at
first with :
the letters before :// really are there to tell a browser of other program what protocol to use, it seems unlikely to me that you'll be able to do this. Since it's probably not a KM related issue you could try posting in the flash video forum, http://board.flashkit.com/board/forumdisplay.php?f=66
the letters before :// really are there to tell a browser of other program what protocol to use, it seems unlikely to me that you'll be able to do this. Since it's probably not a KM related issue you could try posting in the flash video forum, http://board.flashkit.com/board/forumdisplay.php?f=66
This is the solution for AS3 or AS2 :
var connection_nc:NetConnection = new NetConnection();
connection_nc.connect("rtmp://rtmp.myserver.com/path/folder");
var stream_ns:NetStream = new NetStream(connection_nc);
my_video.attachVideo(stream_ns);
stream_ns.play("my_video");
How do I do that in Koolmoves 6.0?
That code does nothing if I try it in koolmoves.
These rtmp files are playing fine in examples I've seen that were made with adobe flash with AS3.
You should be able to make things work with KM also.
Unfortunately I have no experience at all with Flash Media Server.
What's different compared to Flash is that the actual Video object is embedded in a MovieClip when you import a flv file.
var connection_nc = new NetConnection();
connection_nc.connect("rtmp://rtmp.myserver.com/path/folder");
var stream_ns = new NetStream(connection_nc);
my_video.attachVideo(stream_ns);
stream_ns.play("my_video");
var connection_nc = new NetConnection();
connection_nc.connect("rtmp://rtmp.myserver.com/path/folder");
var stream_ns = new NetStream(connection_nc);
my_video.attachVideo(stream_ns);
stream_ns.play("my_video");
Yes, I tried it so many ways that I'm sure I invented AS4 and AS5 in the process.
I'm missing some knowledge because I was not able to play a regular http video that way either.
The only way I personaly can get a video to play is to import a .flv;
lets name it "inflv" then just enter only these lines of code:
And that works great except for when I try to play rtmp://some.flv
Maybe I don't understand the attachVideo part.
I tried "inflv.attachVideo(stream_ns);" but didn't work.
So I thought maybe I need this also "inflv = new Video();".
Still didn't work.
Then I tried to make the inflv a symbol; but Koolmoves doesn't allow a flv
to be a symbol.
I wouldn't try all that if I really new how it was supposed to work.
Has anyone personally used the netConnection code above to play a video in Koolmoves? If so then can you tell me what part I'm missing.
I think the code will work but I'm probably not setting up the objects correctly.
I'm missing some knowledge because I was not able to play a regular http video that way either.
Has anyone personally used the netConnection code above to play a video in Koolmoves?
Yes. Check out all the FLV players on http://necromanthus.com (including those embedded into NecroForum)
Now comming back to FMS (2 or 3) and RTMP.
The AS1 approach using Adobe Flash (8,9 or 10 beta) is the following:
Be sure the Flash Media Server is installed & running, create a single keyframe movie, insert a Video object (flv1) and set this script in the main timeline:
netConn = new NetConnection();
netConn.connect("rtmp://localhost/vod/");
netStream = new NetStream(netConn);
flv1.attachVideo(netStream);
netStream.play("sample");
stop();
That's all.
The above script does NOT work in KoolMoves, because the Video object is not full supported:
1) You cannot insert an empty Video object.
You have to import an external FLV in order to get a Video object.
Unfortunately, every time you do that, the following (invizible) piece of code is included in that keyframe:
var netConn = new NetConnection();
netConn.connect(null);
var netStream = new NetStream(netConn);
flv1.attachVideo(netStream);
netStream.setBufferTime(5);
netStream.play("whatever.flv");
2) You cannot use netConn.connect("some URL here").
Only netConn.connect(null); is supported.
I'm sure the Video object is going to be improved in the upcoming KM version(s).
Yes. Check out all the FLV players on http://necromanthus.com (including those embedded into NecroForum)
Now comming back to FMS (2 or 3) and RTMP.
The AS1 approach using Adobe Flash (8,9 or 10 beta) is the following:
Be sure the Flash Media Server is installed & running, create a single keyframe movie, insert a Video object (flv1) and set this script in the main timeline:
netConn = new NetConnection();
netConn.connect("rtmp://localhost/vod/");
netStream = new NetStream(netConn);
flv1.attachVideo(netStream);
netStream.play("sample");
stop();
That's all.
The above script does NOT work in KoolMoves, because the Video object is not full supported:
1) You cannot insert an empty Video object.
You have to import an external FLV in order to get a Video object.
Unfortunately, every time you do that, the following (invizible) piece of code is included in that keyframe:
var netConn = new NetConnection();
netConn.connect(null);
var netStream = new NetStream(netConn);
flv1.attachVideo(netStream);
netStream.setBufferTime(5);
netStream.play("whatever.flv");
2) You cannot use netConn.connect("some URL here").
Only netConn.connect(null); is supported.
I'm sure the Video object is going to be improved in the upcoming KM version(s).
Thanks!
That is what I was thinking but I didn't know for sure. I had already decided that if I was going to do this I would have to use adobe flash.
I'm still trying to figure adobe flash out.
It's been 3 days so far.
After downloading Koolmoves and going to your site, I built a FLV player in
less than an hour!!
I like using Koolmoves over adobe; it just makes the whole process smoother
and easier at least for a beginer.
The ease of getting things done in Koolmoves is not exagerated at all.
KM7 is probably going to be "the bomb"!
the following (invizible) piece of code is included in that keyframe:
var netConn = new NetConnection();
netConn.connect(null);
var netStream = new NetStream(netConn);
flv1.attachVideo(netStream);
netStream.setBufferTime(5);
netStream.play("whatever.flv");
2) You cannot use netConn.connect("some URL here").
Only netConn.connect(null); is supported.
I'm sure the Video object is going to be improved in the upcoming KM version(s).
What if you changed that code to this :
var netConn = new NetConnection();
netConn.connect(KMOVERRIDEHTTP);
var netStream = new NetStream(netConn);
flv1.attachVideo(netStream);
netStream.setBufferTime(5);
netStream.play("whatever.flv");
Then the action script in Koolmoves to play other than http would be :
Here is a workaround (tested with FMS 3).
Have FUN.
AHHHHHH! MANNNNNNN!
Why didn't you wait until I posted my solution so I could feel smart.
We both got to the same point a little different so there is still one issue.
It works as long as rtmp is only shown in that player.
If switching between http and rtmp I think it's going to require that two
imported flv files be embeded in two different .swf files.
So when swithing from http to rtmp the .swf with the player init will
be removed and the other swf loaded. I haven't tried that yet so
I'm not claiming that's a fix.
For some reason I didn't get my code to work in the main action script
so I put code in the impoted flv. I notice the loop in your solution so
that may have been why I didn't get it to work your way.
This is what I gotto work:
import some.flv
Select the imported flv which should be named "flv1".
Right click flv1
Select "edit movie clip frames"
Select actionscript
add this exact action script to flv1.
myurl = _proto;
var mynetConn = new NetConnection();
mynetConn.connect(myurl);
var mynetStream = new NetStream(mynetConn);
flv1.attachVideo(mynetStream);
mynetStream.setBufferTime(5);
If switching between http and rtmp I think it's going to require that two
imported flv files be embeded in two different .swf files.
So when swithing from http to rtmp the .swf with the player init will
be removed and the other swf loaded.
Forget about that, it's not needed.
I just make a new netconnection when the http switches to rtmp etc...
and that works.
For some reason I don't have the picture anymore just the sound.
Just a bug in all the changes I was making for sure. Probably left
some bad code in somewhere and need to take it out.