DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion Embed Flash Movie in DITA Topics

  • severin.foreman

    Embed Flash Movie in DITA Topics

    Participants 6
    Replies 7
    Last Activity 13 years, 1 month ago

    XMetaL EE 5.5

    Has anyone been able to use XMetaL to embed Flash movies into HTML files generated from DITA topics?

    DITA allows the object element, which I can add using the Insert Element list or Insert > Object menu command while in Normal or Tags On view. To get the movie to play in my HTML output, I need to add a param element as a child of object. The param element contains the relative path to the Flash file. The problem is, I cannot find a way to do it in the XMetaL Author interface and the OT installed with XMetaL does not create a param element in the HTML output.

    Does anyone know how to insert the param element inside of object? Or is there another way to set up Flash movies in DITA topics?

    Best regards,
    Severin

    Reply

    Derek Read

    Reply to: Embed Flash Movie in DITA Topics

    The way the DITA customization has been configured the element is rendered as an image, which means that you cannot see its child elements in TagsOn and Normal view or insert them there.

    The quick and easy solution is to do this in PlainText view. To treat as a regular element (not an image) so that its children can be seen and inserted will require making modifications to the CTM file for each particular DITA topic type. We'll pass this feedback along to our UI design people.

    Reply

    severin.foreman

    Reply to: Embed Flash Movie in DITA Topics

    Thanks, Derek. It would be very handy to be able to insert elements in Tags On view and also to have a Properties sheet for the common attributes.

    Reply

    Derek Read

    Reply to: Embed Flash Movie in DITA Topics

    When I was mucking around with Flash and the DITA OT a while ago (a year?) I found that because the different browsers require different tags, for IE andfor Mozilla-based, this might be tricky to do “right”.

    The DITA OT by default outputs tags but Adobe recommends the following:

    [quote=http://kb2.adobe.com/cps/415/tn_4150.html]

    I have not done any searching recently to see if someone in the DITA community (perhaps on one of the Yahoo groups) has come up with an elegant solution for this. There doesn't seem to be any feature requests at SourceForge either. Perhaps you might consider logging a feature request there (as you are probably dealing with this stuff in the real world and might be able to add insight): http://sourceforge.net/tracker/?group_id=132728&atid=725077

    Reply

    Derek Read

    Reply to: Embed Flash Movie in DITA Topics

    It might also be worth noting that I was able to (in PlainText) mark up a DITA topic using in such a way as to get a Flash movie to appear in CHM. However…

    1) This was at least a year ago and I believe Microsoft is slowly tightening their security on CHM files, so that is one thing that might break this.
    2) Because CHM content is displayed using IE (the content pane) only the tags were required in the output.
    3) In order for the SWF file to be embedded in the CHM I had to manually move the SWF file into the chm_out folder (or the foldername you are outputting to) and referenced it in the topic using a relative path because the DITA OT by default does not recognize this as an image file to copy over during the build process.

    So, it was possible to do CHM containing SWF at some point. The same content worked identically in IE (which makes sense because CHM content is basically the same as the HTML produced by the OT). I don't seem to have any of these files. If I have time to recreate this I'll give it a try at some point.

    Reply

    Derek Read

    Reply to: Embed Flash Movie in DITA Topics

    I've just found some old stuff that seems to contradict at least some of what I just posted at least with the state things are in now with browsers. I'll test and put it up as a sample if it turns out to be useful.

    Reply

    Derek Read

    Reply to: Embed Flash Movie in DITA Topics

    OK, here's a set of demo files. They show how it is possible to reference 4 different types of files in the element in a DITA topic and have the DITA OT generate HTML that is viewable in both FireFox (ver 3) and IE (ver 7).

    1. Save attached file embedding4types.zip
    2. Unzip to an empty folder on your local machine such as: C:tempembeddingtest
    3. Launch XMetaL Author Enterprise (I tested with 5.1).
    4. Open C:tempembeddingtestobjectElementTest.ditamap
    5. Select the File menu item Generate Output for DITA Map…
    6. Select “Multiple HTML” as the deliverable type and generate the output to the default folder: C:tempembeddingtestmultiple_html_out
    7. Not all of the referenced file types will have been copied to the output folder because the DITA OT doesn't recognize them (embedded.html is recognized). So, copy the missing files from the folder you created in step 2 into the output folder before opening the file objectelementtest.html in your browser.

    You should have the following files in the output folder before you open the topic#.html files in your browser so the browser will find them (the last 4 files listed here):

    C:tempembeddingtestmultiple_html_outcommonltr.css
    C:tempembeddingtestmultiple_html_outcommonrtl.css

    C:tempembeddingtestmultiple_html_outobjectelementtest.html

    C:tempembeddingtestmultiple_html_outtopic1.html
    C:tempembeddingtestmultiple_html_outtopic2.html
    C:tempembeddingtestmultiple_html_outtopic3.html
    C:tempembeddingtestmultiple_html_outtopic4.html

    C:tempembeddingtestmultiple_html_outembedded.html
    C:tempembeddingtestmultiple_html_outembedded.pdf
    C:tempembeddingtestmultiple_html_outembedded.swf
    C:tempembeddingtestmultiple_html_outembedded.txt

    For other file formats searching the 'net for the proper type attribute value (basically a mime type) supported by the various browsers will give you the value you need to put into the DITA element's type attribute value (they map 1 to 1 in this case).

    Now, to get this coded into your HTML the recommended Adobe way for SWF (by including thetags) would probably require DITA OT changes. It seems that current browsers don't require that any longer though, at least in my testing with IE7 and FireFox 3, so I guess you'll need to figure out if that's really necessary or not (do you want valid strict XHTML, HTML 4.01, HTML 5, etc…). As for thestuff, my testing seems to suggest that this is not really required, but perhaps there are somesettings that control various aspects of the particular file type's viewer that you might wish to control.

    Reply

    severin.foreman

    Reply to: Embed Flash Movie in DITA Topics

    Hi Derek,

    Thanks very much for your responses and for posting the files. I generated your samples and found that the flash movies played well in Safari, FF and Chrome, but did not play at all in IE 7. When I added the param element (similar to Adobe's recommendations above), the movie played in IE 7. However, adding the param element caused an issue in the other browsers. The movie played, but it no longer streamed; it had to be downloaded before it would run.

    I found an article that does a good job of explaining the various elements needed to embed flash movies and proposes a technique to optimize embedded flash movies in several browsers. I'm not sure I want to use the technique discussed, but I will post the link for anyone who is interested.

    http://www.alistapart.com/articles/flashsatay

    Best regards,
    Severin Foreman

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support