problem linking to flash swf files in html editor

problem linking to flash swf files in html editor

by Robert Barone -
Number of replies: 7

When I link to swf flash files with the Moodle HTML editor, instead of to jpeg files, for instance, the movie/video works perfectly, but it is always surrounded by a great deal of white space. The entire frame bloats unnecessarily. The movie files look as I though painted them into a center of a large canvas. Is there any way I can control this excessive margin space? I don't think it depends on the flash file, but I'm not very expert in the matter. Thanks for any help.

Average of ratings: -
In reply to Robert Barone

Re: problem linking to flash swf files in html editor

by Jamie Pratt -

Are you using img or a or object tags to link to the movie, sounds like you might be using the embed image button on the html editor? How are you linking to the movie exactly?

You might be linking directly to the movie and not to an html file that embeds the movie (normally generated by the Flash authoring environment). If you linked instead to an html file then you would have more control over appearance.

Jamie

In reply to Robert Barone

Re: problem linking to flash swf files in html editor

by Andrea Bicciolo -
Robert, if you want to embed a flash file inside a Moodle HTML editor generated page, you could try to use the iFrame tag. In ither word, create a page wich embeds the flash, upload it in Moodle, then from within the Moodle HTMLeditor create the page you want and in the place where you want to put the flas, use the iFrame tag. iFrame allows you for control over the generated viewport.
Average of ratings: Useful (1)
In reply to Andrea Bicciolo

Re: problem linking to flash swf files in html editor

by Robert Barone -

Thanks to both Jamie and Andrea. That was my first letter to Moodle and it's very encouraging to get such good answers. I have been working with Moodle for only a few weeks, but notwithstanding my lack of experience, I have been made responsible for the administration of Moodle in two faculties of my University. So I'll guess you will be hearing from me.

1) I will try Jamie's approach of linking to an html page and not to the swf file in the hopes that I can change the size of the white border that surrounds my swf file. (I tried just inserting html code in the Moodle editor but it remains there as plain text.) This leads me to another question for Jamie. Can I use a similar procedure for embedding a flv file in the html text. Flv needs other files but if I put them in one place and then put a link to the html page, can it work?

2) Andrea your approach makes me think that this iFrame solution could also be used for other purposes as well, sounds interesting, but where can I find out what an iFrame is and how to use it. Have tried Google without much success -- lots of references but nothing basic enough to start with. Perhaps you can just point me in the right direction.

Ciao,

Robert

In reply to Robert Barone

Re: problem linking to flash swf files in html editor

by Andrea Bicciolo -

Very basic iFrame:

<iframe src="http://yourserver.com/moodle/file.php/8/afolder/anim01.html" width="600" height="500" />

where anim01.html embeds a flash file and "8" is a course number. Change width and height to fit your display needs.

Essentially iFrame tag does a Server Side Include in the HTML page where you put the tag, with the advantage of selecting the viewport size. Other attributes: frameborder (0|1) ; scrolling (yes|no|auto) matters only if your viewport is smaller than the html page to embed.

Average of ratings: Useful (1)
In reply to Andrea Bicciolo

Re: problem linking to flash swf files in html editor

by karthik natarajan -

I have a problem in viewing my video. I have .swf and html file to run a video

Problem 1: I can able to upload only the .swf file in moodle

problem 2: I am getting the white space when i am applying the code between <OBJECT><OBJECT> tags into compose web page by clicking the <> option

NOTE: I know to run my video i need .swf and html.... In my first problem 100% got failed. But in my 2nd Problem i thing there is a some possibilities but i couldn't achieve that.

Can any one help me to solve my problem

Thanks in advance


Attachment ProbInVideo.JPG
In reply to Robert Barone

Re: problem linking to flash swf files in html editor

by Tony Hursh -
(I tried just inserting html code in the Moodle editor but it remains there as plain text.)

Robert, if you're using the WYSIWYG editor you'll need to switch to HTML source code view before entering HTML directly.

To do that, click the button that has <> on it.
Average of ratings: Useful (1)
In reply to Tony Hursh

Re: problem linking to flash swf files in html editor

by Jamie Pratt -

Hi Robert,

To embed the .swf directly in your web page do as Tony suggests. Click the <> button and then you can paste the code that the Flash author generates in 'yourmovie.html' into the htmlarea. You want just the bit of the code that starts in <object ..............> and ends </object>

I think if you want to include video in your page you will use the same method to embed a .swf file. This .swf file will load your .flv file?? Or possibly the flash player can load the .flv file directly these days, I'm not totally sure.

Anyway if you load external files into your .swf file then Flash needs to know where to look for them. If your .swf loads the files with a full url eg. http://yoursite.org/blahblah/yourmovie.flv then all is well. If however you are loading data from a relative url eg. 'movies/yourmovie.flv' or 'yourmovie.flv' then you may have a problem. The .swf will look for your movie file relative to the .html file it is loaded in not the .swf. So if you post your .swf in a forum it will be looking for your .flv file in mod/forum/, your .swf and .flv file are probably in your site or course files folder though.

If you want to use relative addresses to load content such as .flv, .jpg, .mp3 files into your .swf file then you can use an extra parameter in your object and embed tags 'BASE' to tell FLash where relative links are relative to. See this tech note on the Macromedia site for more info.

Hope this helps,

Jamie

Average of ratings: Useful (1)