Hyperlink in SWF file published from captivate does not work - hyperlink

I have published a Captivate 6 file in swf format. In one the slides is a button, that when clicked executed a small piece of javascript code to open a url , using the window.open command. This link opens fine, when i publish the project as a html5 output, ie mp4 file. however , when I publish it as swf, nothing happens on clicking the button. I read somewhere that flash security settings need to be updated and you need to add the folder where swf file is , as a trusted folder. I did that but still it does not work. Then I read that this problem comes only while developing since the flash player blocks access to local files and folder, so I published this swf on a web server on , but again same problem. Would be very grateful if anyone can provide some way to solve this. Thanks.

I'm using Captivate 7 and have had countless problems with javascript, but anyways... I'll avoid ranting about that.
When you publish it as an swf are you loading it from the .htm file? I've noticed that JavaScript only "worked"(haha, if you could...ok, no ranting..) by loading it in the .htm file. When I loaded the swf directly locally or from a web server it wouldn't work.
There are three or four files in Captivate 7: swf, htm, css, and js file.
When I put all of those on the web server, and load the .htm file JavaScript... uh, "worked'.. yeah

Related

Display docx or ppt in browser with ruby

I'm currently working on a intranet webapp for a company.
I've created it so the administrators of the site are able to upload files
(.docx, .pdf, .xlsx, .ppt etc) up to the webapp, to provide easier access
to documents for the employees. It works very well, however my client wasn't
too fond of having to download the files, and wanted it to pop up in the browser,
or open up the file-spesific program instead of download.
I was playing with some ideas:
1. Somehow parse the files to JSON at upload, and then show the content in browser with html.
2. Generate a pdf from the uploaded file (which automatically launches in the browser).
3. Somehow use a previewer to show the filecontent in the browser
4. Clients computer launches the uploaded file automatically on download, however I think this is a bit more tricky...
What would be the best and most time-efficient way to go about this?
It feels like what you actually want/need is a javascript document viewer (only) such as http://viewerjs.org/.

Cordova iOS: Load videos with downloaded html's and video files

I have the following issue:
I have an iOS Cordova Application.
The application download a zip file and decompress it in "cdvfile://localhost/persistent/content/myfolder" by ussing the following Cordova plugins: org.apache.cordova.file-transfer, org.apache.cordova.file and https://github.com/MobileChromeApps/zip.git
Inside the zip there is an "index.html" file with "video tags" on it.
I was able to succesfully load and execute the "index.html" file, but the video doesn't load.
I know that the video file was decompressed successfully because:
I check the file inside my iPad.
I embed the video in the index of the cordova app (not the downloaded one) in the following way and it works:
var videocontainer = document.getElementsByTagName('video')[0];
var videosource = document.getElementsByTagName('source')[0];
var newmp4 = cordova.file.documentsDirectory + 'content/myfolder/videos/myvideo.mp4';
videosource.setAttribute('src', newmp4);
videocontainer.load();
videocontainer.play();
But, the video is not loaded/played inside the downloaded HTML file. To understand what I'm doing, I have to develop an application that will be updated by downloading its contents from zips, and the contents includes pages with videos embeded on them. It works on PC and Android, but not in iOS.
I tried the following things:
Loading the page in "_self". The page is displayed but not the video.
Loading the page in an iframe. Same result.
Loading the page within an inAppBrowser (plugin). Same result.
Video tag with source src="videos/myvideo.mp4" (works in Web and Android). Same result.
Video tag with source src="./videos/myvideo.mp4" (works in Web and Android). Same result.
Video tag with source src= cordova.file.documentsDirectory + 'content/myfolder/videos/myvideo.mp4' (with JS, by passing the path in a query string, same path that works in the root index.html as I described before). Same result.
Video tag with source src= cordova.file.documentsDirectory + 'cdvfile://localhost/persistent/content/myfolder/videos/myvideo.mp4'. Same result.
All the combination of previous things. Same result....
Loading the downloaded resources in a DIV is not an option, because the resources (images, css, javascripts, audios, videos, etc.) are downloaded on other iOS device's folder: the app's Documents' folder (cdvfile://localhost/persistent/).
I thing I tried almost everything... Why is not trivial to play a video tag, inside an html, that are both in the app's Documents' folder???
:-(
EDIT 1: Cordova Version = 3.6.3
Solution Founded!!
In almost all the android and iOS examples, downloaded content is being executed from "cordova.file.documentsDirectory".
Then, when you link this content in a or (by using AJAX), everything works fine (CSS, images, links) but media tags ( and ).
Again, I dont know why, but almost all the examples downloads and unzip contents by using this path.
After several days being blocked with this issue (I found lots of forums where the devs have to modify all their projects by using plugins like Cordova Media, jaeger25 Html5Video, etc, etc), I tried by using the following path: "cordova.file.dataDirectory"
I download, unzip and execute the HTMLs from this path and everything works with no parsing/modifications to the HTML files (that in my case were thousands). 100% compability with and tags with relative sources' path in an IFRAME!!!!!!
I guess you code the video links into the index.html inside the zip you decompress on the device.
Those links need to get "updated" with some javascript parser, BEFORE you actually load or navigate to this page in your phonegap app.
If your example is caused in Android, you definetly need to include the HTML5 Video plugin here:
https://github.com/jaeger25/Html5Video
On iOS the tag will work for local files. But the links need to be absolute.
And the links will change if you recompile your app or reinstall it.
The files will be available, but the APP ID will have changed and the absolute path also.
Example of an iOS path:
/var/mobile/Applications/<application UUID>/Documents/path/to/file
Hope you solved your problem.

How can i turn a local website (directory on my PC) stored in a filder into a .webarchive file?

I have a full website html, css, images, javascripts and video on my local hardrive all contained in a folder.
the website works great on my PC but i need to transfer it to an iPad, i was thinking that this should be easy ... well its not since i cant just copy the site over and run it like on my PC.
so my next step was to try and make a .webarchive of the site but since it has a lot of jquery and video files i cant just use safari since it wont include any of the video files and so on.
was hoping someone knows of a tool or a method to convert a folder into a webarchive.
Just open the website over safari and then Save As... web archive.
My currently unsolved issue is exactly the reverse one.

SWF file extraction

If I have a link to a SWF file - for example here http://redletterdaysb2b.co.uk/swf/our-video.swf
how can I extract it for use on another website?
I have downloaded the swf, but just get an error#2044 when I try and play it. does it need to go in some sort of wrapper?
thanks guys
You're trying to load a swf that in turn loads and displays a .flv using the FLVPlayback component. I'm guessing our-video.swf loads fine, but it probably keeps a relative reference to the .flv.
I can think of two ways to handle this:
Simple add a new FLVPlayback (or any other video player) on the other site but tell it to load the .flv file from the original site.
Try to copy the .flv file in the same folder as the new .swf on the new site.
With the FLVPlayback component there's another part that could cause the error: the skin which on the original site is here.
The #2024 IOError should also include an URL.
This is your best hint to how the our-video.swf is trying to load the .swf file (using a relative(./swf/redletterdays.swf) or an absolute(/swf/redletterdays.swf) path).
Based on this, if you decide to load the player from the original site (not just the .flv file), you can work out where to place the skin (i.e. in the in a folder named swf on the root of the new site)

open an excel file located on the server instead of download it MVC

I'm building a Reporting web application right now with MVC3 and I've come up to a couple problems.
My goal is to have it able to generate and view Crystal Reports, SSRS reports, and Excel documents.
Right now I'm working on the Excel segment and I'm running into more trouble than I thought I would. First off, when I link directly to the file, it either opens inside the browser or it downloads it from the server and if the user makes changes it doesn't actually save it to the true file on the server.
I've tried both linking to the file directly using Razor and a ViewModel with the path to the document as well as directing it to an action that returned a File.
I've also tried linking it to a shortcut to the actual file thinking that if I could open the shortcut it would open the file the way I wanted it to and unfortunately it didn't really open at all.
The users already have access to the files on the server through a network drive, so as of right now they can go into the server, open the excel document, edit and save it no problem. I want to duplicate this effect through a link. The program already has a file browser built, so I can browse between the files and make links to the reports.
Thanks in advance!
Since they are apparently on a network drive, you can just link to the files directly, relative to the user?
For example: a link to file://///SERVERNAME/folder/
I tested it between two computers on the network, and that seems to work. However, you still get a popup asking that you want to do with the file, open or save. (both in firefox and IE)
Note: Yes, that many slashes seem necessary, lol

Resources