Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Extensions and Plugins > Components

Reply
 
Thread Tools Rate Thread Display Modes
Old 04-01-2008, 01:29 PM   #1
Pete H
Registered User
 
Join Date: Jan 2007
Posts: 19
Default Problems with flv contentPath

I'm having problems with an FLV content path.

The video works fine if I just bung an FLVPlayback component onto the stage and play it:

myFLVplayer.contentPath = "video1.flv";

But I want to do clever things with actionscript. So I've created a myPlayer movie and dropped the FLVPlayback into there. However...

_root.myPlayer.myFLVplayer.contentPath = "video1.flv";

doesn't work.

I've checked and double-checked my paths -

_root.myPlayer.myFLVplayer._visible = false;

makes the player but not the movie disappear as expected. I just can't get the video to play when I add the FLVPlayback inside a movie clip rather than dragging it onto the stage when I create the .fla

Any help appreciated - thanks!
Pete H is offline   Reply With Quote
Old 04-01-2008, 01:35 PM   #2
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073
Default

Attach your .fla.
atomic is offline   Reply With Quote
Old 04-01-2008, 01:42 PM   #3
xxneon
Super Moderator
 
xxneon's Avatar
 
Join Date: Dec 2006
Location: Amish Country, PA
Posts: 8,570
Send a message via ICQ to xxneon Send a message via AIM to xxneon Send a message via MSN to xxneon Send a message via Skype™ to xxneon
Default

is 'myPlayer' the name of your movieclip symbol.. or did you accually assign the instance on the stage an instance name of 'myPlayer'..

and also.. .is the actionscript on the same frame # as where the myPlayer is on the stage?
__________________
Always optimizing...
xxneon is offline   Reply With Quote
Old 04-01-2008, 01:58 PM   #4
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073
Default

All questions (and many more to possibly come after these ones...) that would be easily answered, by attaching a .fla!
atomic is offline   Reply With Quote
Old 04-01-2008, 02:15 PM   #5
Pete H
Registered User
 
Join Date: Jan 2007
Posts: 19
Default

Ok - my .fla has over 500 lines of actionscript - so I've trimmed a little. These two files show the problem - one has the FLVPlayback on the stage - and works on my machine. The other has it embeded in a movie clip, and doesn't.

(I've not included the movie).

Thanks!
Attached Files
File Type: zip for_forum.zip (442.0 KB, 95 views)
Pete H is offline   Reply With Quote
Old 04-01-2008, 04:58 PM   #6
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073
Default

There's a lag when attaching a mc and setting your player's content...

If you use 2 frames, this works...

1st frame:

var video:String = "video1.flv";

_root.attachMovie("video_mc", "myPlayer", 100, {_x:450, _y:90});

_root.myPlayer.myFLVplayer.contentPath = video;

Second frame:

stop();

_root.myPlayer.myFLVplayer.play(video);
atomic is offline   Reply With Quote
Old 04-02-2008, 01:49 PM   #7
Pete H
Registered User
 
Join Date: Jan 2007
Posts: 19
Default

Thanks - I will try.

Going off on a tangent slightly - I tend to create my flash movies by doing as much as I can through actionscript. Where possible, I have nothing at all on the stage, and one loooooong chunk of actionscript in layer one frame one.

This is probably because I have more of a programming head than a design head - it's also because I've recieved flash files from other flash designers that have half a dozen lines of actionscript buried here and there all over the place, and are virtually impossible to edit, even with documentation.

However, I've no idea whether this is good practice. The idea of having to start putting code in a second frame makes me nervous.

Any ideas. Any hints on good tutorials on how to structure a movie in the optimum way?

Cheers!
Pete H is offline   Reply With Quote
Old 04-02-2008, 01:57 PM   #8
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073
Default

Well, if you insist on doing it on one frame, you can always do this...

ActionScript Code:
var video:String = "video1.flv"; _root.attachMovie("video_mc", "myPlayer", 100, {_x:450, _y:90}); this.onEnterFrame = function(){     _root.myPlayer.myFLVplayer.contentPath = video;     delete this.onEnterFrame; }; stop();
atomic is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
located FLV problems elmon05 ActionScript 2.0 0 03-28-2008 04:26 PM
FLV Playback - video from library as contentPath? bushido_man Components 0 12-06-2007 01:36 AM
auto play next flv file problems jikey Components 0 07-21-2007 04:18 AM
Problems with FLV playback Gillies ActionScript 2.0 6 02-13-2007 09:16 PM


All times are GMT. The time now is 10:43 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.