Flash module add-on: Embedded Flash Directory Path

Flash module add-on: Embedded Flash Directory Path

Jay Williams發表於
Number of replies: 2

Hi,

I've thrown this out in the general forum but haven't had any luck thus far, and even through its not directly related to the flash mod, I thought someone here might be able to help!

I have content that is designed within flash and is structured so that a flash file is loaded within the page and then that flash object calls up a number of other flash files within it. The problem I have at the moment is that I can't seem to get the initial flash file to load the other flash files from anywhere other than the root directory.

Ideally I'd like to store all the flash content - especially the files that get loaded within flash, to be stored in the moodledata folder where the rest of the course content is stored, to keep them from being too accessable but I cant for the life of me work out what directory path to place within the action script of the inital flash file and if I need to place something special in the HTML code that loads the first flash.

Many Thanks,

Jay

評比平均分數: -
In reply to Jay Williams

Re: Flash module add-on: Embedded Flash Directory Path

David Hicks發表於
> a flash file is loaded within the page and then that flash object calls up a
> number of other flash files
<snip>
> Ideally I'd like to store all the flash content - especially the files that get
> loaded within flash, to be stored in the moodledata folder

What are you writing, and how are you writing it? If you're writing your own Moodle module or block, with server-side PHP code, then you have the advantage of having access to Moodle's database structure - you can pass any values you like (such as root path strings) in to your Flash object via the FlashVars parameter of the object / embed element that shows your Flash object.

If you're writing something that's strictly client-side (i.e. an HTML page that contains a Flash movie), then you're more limited as to the information you can get. If you're literally using just an HTML page, then you can get pretty much no information out of the server whatsoever. The SCORM interface is useful, but won't give you the data you're looking for. You probably need to be using Moodle's own Flash module - this provides an interface that lets your FLash movie extract various information from the server without the palavar of you having to write any server-side code yourself. That'll probably have a function or data structure floating around someplace that'll tell you what the URL of the moodledata directory is - sorry, you'll have to go and read the Flash module documentation yourself at this point, I know next to nothing about how it actually works.

Why do your loadable Flash files need to be in the MoodleData directory? Does each user who loads your content see different things - can they upload their own loadable Flash files? If not, then I imagine you're writing your content as an HTML file and a bunch of associated Flash movies - those /should/ work fine simply uploaded into a course's file area. If the containing Flash movie is loading but not the others, try adding some debugging output to that Flash movie - use ActionScript to set the contents of a textbox to the URL of the movie, see what value you get shown. See if you can actually load up the other files in your browser - you might be getting an error page due to a typo or permissions problem that Flash wouldn't tell you about.

--
David Hicks
In reply to Jay Williams

Re: Flash module add-on: Embedded Flash Directory Path

Brody Welch發表於
I have just begun researching Moodle for a project I am working on so unfortuneately I am unfamiliar with the whole course/ project structure. That being said w/in HTML you can use the BASE attribute w/in the EMBED and OBJECT tags to point to a different directory than your root.swf is located in. This allows you to keep your paths relative while testing and at the same time allowing accessibility to the files once their are published. Below is attached a technote from Macromedia that explains the process.

http://www.macromedia.com/go/tn_12701

broD