SIGN IN
::
SPONSORS
::
ABOUT US
::
CONTACT US
FORUMS
TUTORIALS
MAGAZINE
TRAINING
VIDEOS - REELS
PODCASTS
EVENTS
SERVICES
NEWSLETTER
NEWS
BLOGS
ADOBE FLASH:
Home
Flash Forum
Flash Tutorials
Flash Video Tutorials
Web Streaming Forum
Adobe Flash
Podcast
Re: NetConnection Question
Cow Forums
:
Adobe Flash
VIEW POSTS
•
ADD A NEW POST
•
SEARCH
•
CHANGE FORUM
Respond to this post
•
Return to posts index
•
Read entire thread
Re: NetConnection Question
by
Amy Lee Walton
on Jan 11, 2009 at 5:26:20 am
Hi there,
Null is the value you always use unless you're using a Flash Media Server, has nothing to do with the button.
On the stage, just have your button and have it named appropriately... mine is playBtn. In this code I basically open the net connection, put in a netstream, set the client to stage, plug in the flv, attach it to a video object, then to stage, then pause it and add an event that detects when the button is click and plays the movie. you may want to add a still image of the movie to represent it and make that the button or something cool like that. either way the below code should work.
Good luck!
Amy Lee
-----------------
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.client = this;
ns.play("videos/yourvideoname.flv");
var vid:Video = new Video();
vid.attachNetStream(ns);
addChild(vid);
vid.x = 110;
vid.y = 90;
playBtn.addEventListener(MouseEvent.CLICK, playHandler);
ns.pause();
function playHandler(e:MouseEvent):void {
ns.resume();
}
Respond to this post
•
Return to posts index
•
Read entire thread
Current Message Thread:
NetConnection Question
by shawn eyre on Jan 9, 2009 at 7:18:02 pm
Re: NetConnection Question
by Amy Lee Walton on Jan 11, 2009 at 5:26:20 am
Re: NetConnection Question
by shawn eyre on Jan 12, 2009 at 4:56:37 pm
Re: NetConnection Question
by Amy Lee Walton on Jan 12, 2009 at 6:44:06 pm
Re: NetConnection Question
by shawn eyre on Jan 12, 2009 at 7:49:07 pm
Re: NetConnection Question
by shawn eyre on Jan 12, 2009 at 10:20:32 pm
Re: NetConnection Question
by Amy Lee Walton on Jan 14, 2009 at 3:33:25 am
Re: NetConnection Question
by shawn eyre on Jan 15, 2009 at 3:33:21 pm
Related Threads:
NetConnection issues...
|
can the netConnection....
Note:
If you are a registered user please
click here to login
before posting.
Your post will not be accepted if your name and email address are not registered in our database. Click
here
if you do not have an account.
Name
E-Mail Address
Subject
E-Mail me when someone responds
Just This Message
Entire Thread
None
Message:
Note:
The following are HTML characters and may cause parts of your post to disappear if not used correctly: < > &
To include any portion of the post in your response, highlight the desired text and hit the "Q" key.
Read more...
Add your message signature
Note:
By clicking "Post Direct" button above, you are agreeing to the Creative Cow's
Code of Conduct
.
FORUMS
•
TUTORIALS
•
MAGAZINE
•
TRAINING
•
VIDEOS - REELS
•
PODCASTS
•
EVENTS
•
SERVICES
•
NEWSLETTER
•
NEWS
•
BLOGS
©
CreativeCOW.net
All rights are reserved.
[
Top
]