# Tag Info

41

This is not the full answer but I've solved most of the problems. The hardest one, with sound, remains. Embedded version without music bobthechemist's points Quality is not a problem anymore since here nothing is rasterized. White edges are due to "features" with Texture, I've fixed that using strange VertexTextureCoordinates. I can't handle this ...

31

This is the sequence of commands that I use to create my CDFs. testCDF := DynamicModule[... some nice code] nb = CreateDocument[{testCDF} ,Visible -> False ,WindowTitle->"Export Test" ,WindowMargins->Automatic ,WindowSize->Automatic ,WindowElements->{"VerticalScrollBar","HorizontalScrollBar"} ,ShowCellBracket->...

25

Here is a list of the most important differences: webMathematica is a server side technology (the Mathematica code runs on the server) while Mathematica code contained in a CDF-Document runs on the client, either in the standalone player or the browser-plugin. This of course has many important consequences, see the sections below for more details. The UI ...

22

You can install the LiveWeb plugin for PowerPoint which allows to embed a live webpage into a slide. Now you should prepare an HTML page with emdedded CDF object (here and here you can find old instructions how to do this, but probably there is easier way now) and embed it into a PowerPoint slide. People say that it works surprisingly well and you maintain ...

21

There are some doubts about using SaveDefinitions (1), (2), so let's implement a brute force approach which may be later used automatically. Outline Needs @ yourPackage (*a*) CDFDeploy @ With[ { source = Import[packagePath] (*b*) } , DynamicModule[ { ... } , ... , Initialization :> ( Get @ StringToStream @ source ) ] (a). You have to call ...

18

I had contacted tech support at Wolfram about one of my demonstrations, and got a reply from Ed Pegg (one of the editors at the Wolfram Demonstration site) which included this: "Mathematica 10 turned out to be incompatible with the server our Demonstration site runs on, so we're needing to do a major upgrade. But it's taking longer than expected. The ...

17

Maybe it is worth mentioning that webMathematica sites can be viewed without downloading and installing the 197 MB plugin. A lot of users (in companies, banks, institutions) just are not allowed to install anything at all and IT departments do not like big uncertified plugins. Furthermore a webMathematica page you can view on a any tablet or mobile phone. ...

13

This seems to be a very easy way to bite yourself in the foot (non-flexible programmers this is not for you). I also have the habit of doing those blocked set-based definitions. It's probably time to change the habit now. It seems to me that SaveDefinition extracts the definitions of the symbols required by the Manipulate, as you entered them. If you used :=...

13

Edit with a more compact code: CellPrint @ Cell[ BoxData[ StringReplace["$CellContext" -> ""] @ ToString[ ToExpression @ Get[pathToYourCDF][[1, 1, 1, 1]] , InputForm ] ] , "Input" ] Old answer: Open your cdf in Mathematica. Then open new Notebook and evaluate: Select[Notebooks[], ("DocumentType" /. NotebookInformation[#]) =="... 12 I use this sequence of commands to generate Enterprise CDF: (*Export to CDF*) nb=CreateDocument[{myCDFGenerationFunction[]} ,WindowTitle->"My Title" ,WindowMargins->Automatic ,WindowSize->Automatic ,WindowElements->{"VerticalScrollBar","HorizontalScrollBar"} ,ShowCellBracket->False ,Deployed->True (*,... 12 You can't. You can combine CDFs and content generated by other tools on web pages, though. From Frequently Asked Questions about the Computable Document Format (CDF) (Wolfram Research): Do CDFs plug in to Microsoft Office documents or PDFs? Currently, the CDF Player plugin only supports web browsers. We are exploring the same capabilities for a number of ... 11 CDFDeploy["G:\\tmp\\test.cdf", manip, Method -> "Standalone"] does what is needed. It also supports setting the WindowSize option. Unfortunately this introduction to CDF does not mention CDFDeploy as a function. One has to arrive here to find this. 11 Using InputForm on your Manipulate reveals (like it did in my SaveDefinitions Considered Dangerous post) that it contains the following: Manipulate[f[a, b], {a, -1, 1}, {b, -1, 1}, Initialization :> {f[x_, y_] = x + y, x = 1}] So, it actually stores two definitions, one for f and one for x. This actually makes sense, as SaveDefinitions's task is to ... 10 Some of what I say concerns notebooks (e.g. saving a notebook) and not CDFs, but most applies to both. DynamicModule initialization Here is a simple DynamicModule. One can imagine that the dynamic output below containing further Dynamics or only parts of the output being wrapped in Dynamic. Ignoring Global symbols, there are three places initialization ... 10 There is no need to use Javascript to include CDF in a web page. (but better to use Java script, please see end of post) Upload the CDF file (source.cdf) and the HTML page (index.htm) into a folder on the server. Keep both files in same folder for simplicity. Edit the index.htm file using a text editor and type this line in the HTML anywhere you want the ... 10 Try the following: Style[Graphics3D[Sphere[]], ShowSelection -> False] 9 Perhaps this will get you started... nb = CreateDocument[ DynamicModule[{n}, n = 0; Dynamic[Refresh[ Image[Import[dir <> imgfiles[[Mod[n++, Length[imgfiles], 1]]]], ImageSize -> {1280, 720}], UpdateInterval -> 5, TrackedSymbols :> {}]], Initialization :> (SetDirectory[dir]; imgfiles = FileNames[])], ... 8 Quiet[<<AuthorTools] NotebookRestore[] Just copy and paste the above two lines in a new mathematica file. When you will execute it, a dialogue box will open. Choose the file which has been corrupted. Mathematica will automatically restore the program. Save it with some new name. 8 This should do: nb = Import["path/to/BriggsCochraneCalculus.cdf"]; nb = NotebookPut@nb; SetOptions[nb, Deployed -> False, Editable -> True] You can now save it as .nb somewhere. Why Options Inspector does not work? I must say I don't know but here's a guess. One could expect that nb = NotebookOpen @ "path/to/BriggsCochraneCalculus.cdf" SetOptions[... 7 I believe that this Wolfram video is exactly what you want. From Wolfram support: Essentially, the steps are as follows: 1) Place all of the symbol definitions that you would like to obfuscate into a Mathematica package file. 2) For each of these symbols, use the Attributes function to set the Locked, Protected, and ReadProtected attributes ... 7 This free video course available from Wolfram Training site goes through details of CDF web embedding: Computable Document Format: Deploying Ideas to the Web Word Press CDF embedding and some other platforms are discussed in detail. sites.google needs to be checked - but if it does work, then it will use same ideas as explained in the course. Most ... 7 Of course this is just an academic technical exercise and cannot be really used due to legal restrictions of the CDF license. On Linux and Windows with JLink this seems to work easily: [rolfm@localhost cdffun]$ cat CDFFun.java /******************************************************** * CDFFun.java * *******************************************...

7

Animate seems to be useless here, so even while one could use TransitionEffect -> "Fade" ... : Animate[PaneSelector[Thread[Range[Length[pics]] -> pics], Dynamic@i, TransitionEffect -> "Fade"], {i, 1,(*Length[pics]*)5, 1}, DefaultDuration -> 3, Initialization :> (pics =(*Import["G:\\pics\\*.jpg"]*) Table[Plot3D[Sin[x^...

7

I probably have an idea how to turn a Button into want you require with the help of JLink. The trick includes to use the java methods to open a link in the system browser. The following is a small working example without catching any exceptions and testing whether opening an URL is even supported. If I export this Manipulate as an embedded CDF, open it ...

7

My reading of this page is that you are free to create and share your CDFs for as long as you are willing to license them under the Creative Commons Attribution-ShareAlike License (FreeCDF). This means that you'd allow anyone to do anything with your CDFs for as long as derivative works give you credit and do not change the license. This also means that if ...

7

Here's one without teeth, but it does have eyebrows, the eyes can change size, and the mouth smiles (or not): Manipulate[ eyeMat = {{1/(eyeRadius - pupilRadius/2), 0}, {0, 1/(0.15 + eyes - pupilRadius/2)}}; If[Norm[eyeMat.(pup - eyeCenter[[left]])] < 1, pupNow = pup - eyeCenter[[left]];]; If[Norm[eyeMat.(pup - eyeCenter[[right]])] < 1, ...

7

Completely define your demonstration in a Manipulate or DynamicModule by making use of the Initialization and/or SaveDefinitions options. Copy and paste only the output cell into a new (or existing) notebook. Export this notebook as CDF. For example, the following Manipulate is completely defined by using Initialization. So by performing steps 2 and 3 a ...

6

This may do what you want: InputField[Dynamic[x, (x = #^2 - 1) &]]

6

John Fultz's comment: The security issue is caused by the presence of the symbol DeveloperPackedArrayForm in the interpolating function objects. The Player FE, unfortunately, does not understand that this is a perfectly safe symbol to evaluate and locks down security as a result. I haven't yet come up with a good way to work around this, but I'm still ...

6

For this specific example you want to "register" the styling function once but then make the styled stext static from then on -- if I understand you correctly. If that is the case then just use Refresh with None. So with your styling function defined as a kernel function you would implement it this way: ClearAll[st1]; DynamicModule[{}, Dynamic[Refresh[st1@"...

Only top voted, non community-wiki answers of a minimum length are eligible