Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-28-2007, 02:54 PM   #1
RandyS
Member
 
Join Date: Apr 2005
Posts: 39
Default FLVPlayback in externally loaded .swf in sub directory

Greetings all,

I'm having an FLVPlayback issue. I have a main.swf file that load slides in a subdirectory. Some slides have video and some have audio. Like this.

projectdirectory/main.swf
projectdirectory/slides/slide_01.swf
projectdirectory/slides/video_01.flv

When I author and test slide_01.swf the FLVPlayback component works flawlessly. Its set to autoplay.

When I run main.swf and load slide_01.swf then video_01.flv does not play and I get an error 1000 can't connect to server.

Is this a path issue? If the FLVPlayback component is in the timeline of slide_01.swf and links simply to video_01.flv, does that get broken somehow when main.swf loads it from one directory above?

TIA,
RandyS
RandyS is offline   Reply With Quote
Old 06-28-2007, 08:01 PM   #2
PainBehindMyEye
Registered User
 
PainBehindMyEye's Avatar
 
Join Date: Mar 2005
Location: Canada
Posts: 7
Default

Your actionscript and component required for the FLVPlayback needs to be in that slide swf and the path would likely need to be relative to the main swf's location (?)

Seeing how you initiate and load would help.

- PBME

Last edited by PainBehindMyEye; 06-28-2007 at 08:03 PM. Reason: got my wires crossed there for bit.
PainBehindMyEye is offline   Reply With Quote
Old 06-28-2007, 09:24 PM   #3
RandyS
Member
 
Join Date: Apr 2005
Posts: 39
Default

Hi, thanks for your reply.

projectdirectory/main.swf
projectdirectory/slides/slide_01.swf
projectdirectory/slides/video_01.flv

// slide_01.swf contains FLVPlayback component
// contentpath set to "video_01.flv"
// this works if I call it on its own during testing (ctrl-enter)

// script in main.swf
// in main timeline I call ... LoadSlide("slide_01.swf")

// and this function loads the external clip
// it works as it does load "slide_01" but the video doesn't play.
// if I put video_01.flv in same directory as main.swf it works
// but for organization purposes I want the media resources in sub directories
// (its a CD project).

// Maybe something is wrong with my path name concatenation?

function LoadSlide(pFileName) {

// sub directory "slides"
var tFilePath = "slides/" + pFileName;
trace("LoadSlide " + pFileName +" "+ tFilePath);
var _mcl:MovieClipLoader = new MovieClipLoader();
var _listener:Object = new Object();
_listener.onLoadInit = function(_slideClip:MovieClip) {
trace("Done loading...");
};
_mcl.addListener(_listener);
this.createEmptyMovieClip("_slideClip", this.getNextHighestDepth());
_mcl.loadClip(tFilePath, _slideClip);
}

TIA,
RandyS
RandyS is offline   Reply With Quote
Old 06-29-2007, 09:14 AM   #4
RandyS
Member
 
Join Date: Apr 2005
Posts: 39
Default

projectdirectory/main.swf
projectdirectory/slides/slide_01.swf << has FLVPlayback component
projectdirectory/slides/video_01.flv

Well I kind of answered my own question.

Ideally I wanted to be able to build and test individual slides .swf files as I went along. Then have one main file load them as needed. Plus I wanted to keep the slides_xx.swf files in sub directory.

When I set the contentPath to "video_01.flv" it works but not when loaded from main.swf, one directory above.

If I set the contentPath to /slides/video_01.flv the component itself will complain that it can't find the file. Save it anyway and load from main.swf and it works.

It just seems that I can't have it both ways. There's gotta be a way though.

Cheers,
RandyS
RandyS 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
External .swf loaded into main .swf bradb1920 Other Flash General Questions 3 02-19-2008 01:35 PM
changing var in main MC from externally loaded .swf? gratnells ActionScript 2.0 4 06-12-2007 09:43 AM
Navigate Scenes in a loaded .swf mnapiork ActionScript 2.0 2 08-21-2005 12:10 AM
path to a .swf loaded into main movie Balus ActionScript 2.0 6 07-18-2005 06:25 AM
Preloading external .SWF If Frames/Bytes loaded - Mac vs. PC Problem spz8aso ActionScript 1.0 (and below) 1 02-23-2002 01:54 AM


All times are GMT. The time now is 11:30 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.