Tip: The use of JavaScript with Breeze presentations

Hi all

One of the recurring comments our alpha testers was that there was no "Close" button on the last slide of our Breeze presentations. Of course, Breeze is no obvious ways to close the browser window, other than by clicking on the 'x' in the upper right. But, as the Breeze Viewer is contained in an HTML shell, the solution is really very simple: use the 'fscommand' overall in Actionscript to activate a script embedded in the HTML page.

Operating instructions
(1) make a simple Flash animation, with a button. In this case, ours consisted of a small button that says "quit". In the first frame of the movie, add the following actionscript event handler:

btnName.onRelease = function () {}
fscommand ("quit");
}


(2) insert file *.swf to this button in the proper PowerPoint slide and the Breeze presentation.

(3) find the "index.htm" file out of the breeze and open it in Notepad.

(4) find the "Sub SlideContent_FSCommand" function in vbscript section and add the following code to the function "to select":

case "quit" window.close

(5) in case you are using something that does not include vbscript (and I hope you ) add the following function at the top of the javascript section:


function SlideContent_DoFSCommand (command, args)
{
Window.Close ();
}


Save the index.htm file, and then reopen it in your browser as always. When the user clicks on the button in the presentation of the breeze, it sends the command "quite" in the browser, which will handle either vbScript or JavaScript.

Most of the time, we leave on the vbScript completely so that all fscommands are dealt with by a large declaration "case" in JavaScript. The only real issue I ran into that it is than some JS methods for the Window object (and some methods of Document, such as. write()) tend to fail.



See you soon!

~ Marc B

Hi all

A better way to run commands small JavaScript (for a Flash module) is to use the getURL command:

btnButtonName.onRelease = function () {}
getURL ("javascript: window.close ();");
}

In this way, you don't need to fiddle around with any page, the Viewer is embedded in the HTML code.

Tags: Adobe

Similar Questions

  • The use of JavaScript with the desgin-time properties

    Hi all

    I have a form with a few text fields. I would like to be able to update their legends by programming using JavaScript at design time.

    I don't know how to approach the design time objects.

    Any help would be much appreciated.

    Kamil

    At Design time you genrally cannot run JavaScript in the designer.

    The only option would be a macro, that requieres Designer ES2 or the designer of the ADEP.

    A macro is a javascript file, which is stored in a subfolder of the program folder, which can be performed at the time of design.

    Here's a macro with a flex dialog box I designed to manipulate fields at design time:

    http://thelivecycle.blogspot.com/2011/06/field-designer-macro.html

  • The use of JavaScript with radio buttons selected to assign a variable a value

    Hey everyone, a little new in Java and try to create a form for my work to request leave.  My problem is that I'm trying to assign a variable a value if the user clicks on a radio button or another.  Currently, they are incompatible with the following information:

    Name: Radio

    ToolTip: choice

    Button Style: check

    Radio button choice: Yes (this is the value of exports, that I think that I'm not sure how to use it correctly)

    nor is checked by default, but if a box is checked, I would have a variable defined on the "Approved" text, and if the other radio button is checked I would define the variable contains "disapprove".

    Here is my code now and thanks in advance for all the help:

    var S_auth;

    function auth() {}

    If (Radio.value == 'Yes') {}

    var S_auth = "approved";

    }

    else {}

    var S_auth = 'denied ';

    }

    }

    var employees = this.getField("Emp_Name").value;

    Supervisor of var = this.getField("Supervisor").value;

    var Leave_Type = this.getField("Dropdown2").value;

    var cToAddr = [email protected];

    var cCCADDr = this.getField("Email").value;

    var cBenAddr = this.getField("Sup_Email").value; If (cBenAddr! = "") cCCADDr += ';' + cBenAddr;

    var cSubline = "Re: leave request form for" + "" + employee + ', ' + Leave_Type + ', Status: "+ S_auth;"

    cbody var is 'your request for leave was' + S_auth + 'by' + supervisor. \n' + 'save the attachment of e-mail for your records. \n » ;

    this.mailDoc({)

    bUI: true,

    cTo: cToAddr,.

    cCc: cCCAddr,.

    bassujetti: cSubLine,

    CMSG: cbody

    });

    I honestly just want to have the subject line and the body to be able to show approved or disapproved according to which radio button, the project manager chooses.

    Yes, your script is now correct and should work.

  • What is the last recommendation on the use of Aperture with El Capitan system software?

    What is the last recommendation on the use of Aperture with El Capitan system software? I'm sure to BONE 10.11.x since I was a big user of Aperture?

    TIA,

    If you need a feature that has opening but Photos doesn't work, click here and follow the instructions.

    (141652)

  • I have a power shot sx HS 40 & need information about the use of filters with this camera? Thank you ~.

    I have a power shot sx 40 & would like information on the use of filters with this device?

    Thank you ~.

    Hi Rainlily,

    You will need the # model Canon adapter filter f-DC67A to use filters on this camera, which costs about $25.00. Bower makes one for about $9.00 available in B & H and Bower products work well with the Canon. This adapter uses 67 mm filters. If you have not yet all filters, I would recommend Hoya or Tiffen filters as they are of high quality at reasonable prices. Do not get the expensive filters because in general they can cause color casts that may be difficult to view the process on. Have fun!

    Steve M.

  • The use of devices with Windows 8

    Hi all

    I saw many problems for people with questions about the use of Bluetooth with Windows 8 devices, especially after the upgrade.

    Take a look at this document, which covers:

    I hope that this document provides assistance.

    Good luck!

  • The use of SSL with IE via httpService

    Hello

    I read the Wired article http://weblogs.macromedia.com/lin/archives/flex/security/index.cfm on the use of SSL with THE de Lin Lin, however I am confused as how to implement the changes that she mentions. Basically, she mentioned a couple of the reasons why the httpServices would not be able to load data in the event of connection via SSL. I've read about the Adobe TechNote at http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=fdc7b5c & SSP = rss_flashplayer_fdc7b5 c , but it was not clear either.

    1. How can I change the settings of the server have the correct header information?
    2. can I change something in the compiler Flex for SSL and IE?

    It works perfectly in FireFox and Safari, and retrieves the data without any problem. All ideas, information would be appreciated.

    Re 2) in my opinion, there is nothing that you can do on the side of Flex, there seems to be a problem with IE passing data to the FlashPlayer.

    (topic 1), depends on how you generate data on the server. We use Java servlets and the solution is to _not_ set non-cache on the answer when
    dealing with IE.

    R.

  • Advice on the use of APEX_JSON with a CLOB in the body as a string

    Hello all and thanks for any help in advance.

    I have the task of liaising with a 3rd party API via JSON to send information to our database.  First warning is the HOST for us is not and race so I have no way of properly this test until tomorrow, but I wanted to ask this question to try to overcome a potential problem.

    In the body of the JSON object, we must add a chunk of xml (already created/kept or can be created on the fly) and it must be validated on as a long string.  Now, this question is that the string can be up to 20000 characters long so when its processed is stored as a CLOB in the database (not made by me).

    Now my thoughts early to do this was to create a procedure allowing certain parameters get the relevant piece of data and xml stored as a CLOB.  Then and that's where I maybe need some tips, follow these steps.

    This host requires JSON in this format

    {

    'batchcode': 1234562,

    'XML string': 'THIS WILL BE a MASSIVE XML STRING',

    ""bounding ":" ",".

    "ID": "123456465",

    'field1 ':

    .

    .

    etc.

    }

    We currently have a few apex applications so I got a good look at the documentation and allows to generate the required using JSON:

    Thus to collect information of input parameters

    APEX_JSON. INITIALIZE_CLOB_OUTPUT;

    APEX_JSON. OPEN_OBJECT();

    APEX_JSON. WRITE ("batchcode," value from database");

    APEX_JSON. WRITE ("XML string ', our xml database that is stored as a CLOB string");

    APEX_JSON. WRITE (bounding "," value of database");

    APEX_JSON. WRITE ('ID', 'Value of database');

    .

    .

    .

    etc.

    APEX_JSON. CLOSE_OBJECT();

    Then validate using endpoint:

    APEX_WEB_SERVICE. () MAKE_REST_REQUEST

    p_url = > 'URL of the end point. "

    p_http_method = > 'MESSAGE ',.

    p_username = > API_USER,

    p_password = > API_KEY,.

    p_body = > apex_json.get_clob_output

    );

    Now assuming that my method is correct only the APEX_JSON. WRITING literally accept its entry as a type CLOB and he will be able to properly analyze or will it arrive at a mansion that will actually write the string itself?

    Edit I found that if I APEX_JSON. WRITE ("XML", "CLOB table column") that it exported the CLOB but not in the format I want.  This is due to the fact that my CLOB has characters like <>etc in II and the output is burning out in unicode, so for example <? XML version = "1.0" encoding = "UTF-8"? "> as stored in the object CLOB becomes \u003C?xml version=\"1.0\ ' encoding =------"UTF - 8\ '? \u003E\n in the output using APEX_JSON. To write.

    The only other way to do it, I think it is so divided in pieces as follows:

    SELECT ROWNUM as XML_PIECE_NO, TO_CHAR (SUBSTR (a.xmldoc, (ROWNUM-1) * 4000, 4000)) AS SECTION

    Of ast_xmldata one

    CONNECT (ROWNUM-1) * 4000 < = LENGTH (a.xmldoc)

    Then maybe concat in the JSON long xml string field.

    I hope I have explained what I want to do but if not please respond any help will be greatly appreciated.

    Concerning

    Post edited by: K4E

    EDIT I CAME FROM WITH a SOLUTION

    Post edited by: K4E - found solution 02/04/2016

    Thanks for the response of Christian, logical exit that way.

    Through some trial and error, I found a solution to my problem that seems effective enough without having to worry about unicode characters written.  There is seemingly a procedure without papers in the APEX_JSON package called apex_json.write_raw that does what it says.  All I had to do then was to use escape characters in my CLOB for things like "then I get a few good valid JSON in the format of the API, I work with love."

    Hope this helps someone else with the situation.

    K4E

  • cpEIGetValue - the use of Javascript on a button

    What I'm doing:

    The user works with the content and the input of information in a number of places.  At the end of the content entered information are formatted specifically in a legend of test using the associated variables.  I need to also be able to provide this information in a way where they can select and copy the text, which is not possible in a SWF or out of HTML5.  My solution was to add a button to a page and use JavaScript to open a new browser window/tab and displays the output.  It comes to Cp8.

    The code works well (except for Cp components in a javascript interpreter, but doesn't seem to work at all in the Cp.  I activated the Flash security so that objects will run.

    The JavaScript in question isn't pretty, but it will do the job.

    create a window

    var winout = Window.Open ();

    connect to Cp

    var cp = document. Captivate;

    get the value of Text_Entry_Box_1

    T1 var = cp.cpEIGetValue ("m_VarHandle.Text_Entry_Box_1");

    create the output

    output var = "< html >".
    output += '< body > ";
    output += ' < h1 > your problem statement < / h1 >. "
    output += '< p > you can select and copy your statement of the problem of this window and paste into Word or PowerPoint to continue to refine your problem statement. < /p > ";
    output += '< p > ';

    output += t1;

    output += ' < /p > < / body > < / html > "

    the output display
    WinOut.document.Write (output);

    If I remove the Cp-specific code, it works in the javascript interpreter.  If I fix this code to a button by setting the action "Execute JavaScript" and insert the code in a javascript window and publish, the result is odd.  When I launched my published file and press the button to run the javascript code, IE displays the "File download" dialog box and tries to save the file without a name.  It is a problem of javascript code, but I can't understand it.  If I can get this working, I can add the rest of the variables and this fact.

    Thank you

    Chris

    Wrap your original script in a function:

    function openPopup()

    {

    create a window

    var winout = Window.Open ();

    connect to Cp

    var cp = document. Captivate;

    get the value of Text_Entry_Box_1

    T1 var = cp.cpEIGetValue ("m_VarHandle.Text_Entry_Box_1");

    create the output

    var = exit"";
    output & ="";
    output & ="

    Your statement of the problem

    ";
    output & ="

    You can select and copy your statement of the problem of this window and paste into Word or PowerPoint to continue to refine your statement of the problem.

    ";
    output & ="

    ";

    output += t1;

    output & ="

    ";

    the output display
    WinOut.document.Write (output);

    }

    then the button call javascript:

    openPopup();

    You could even do a little more dynamic and send the variable in the function, so you can use it again and again.

    function openPopup (myText)

    {

    create a window

    var winout = Window.Open ();

    create the output

    var = exit"";
    output & ="";
    output & ="

    Your statement of the problem

    ";
    output & ="

    You can select and copy your statement of the problem of this window and paste into Word or PowerPoint to continue to refine your statement of the problem.

    ";
    output & ="

    ";

    output += myText;

    output & ="

    ";

    the output display
    WinOut.document.Write (output);

    }

    then the button call javascript:

    var cp = document. Captivate;

    getText var = cp.cpEIGetValue ("m_VarHandle.Text_Entry_Box_1");

    openPopup ("getText");

  • The use of JavaScript in the Flash script and createJS, trouble, referencing the element on the stage

    Hello

    Relatively new to JavaScript, so don't know if it's too complicated to remove in the Flash timeline. I have a question on the stage with the name of the instance "myBox". I'm trying to take it to the coordinate x of a touch on the iPad. The JS looks like this

    / * js

    document.addEventListener ('touchmove', Function {}

    Event.preventDefault ();

    touch var = e.touches [0];

    this.myBox.x = touch.pageX;

    (}, false);

    */

    Is it possible to "myBox" from inside the function of reference? this.myBox does not work when I publish Toolbox for createJS. I am able to get the coordinate x of the key event when I try to alert (touch.pageX);

    Thanks for the help!

    you lose the scope of this function.  Try:

    / * js

    function moveBox (obj) {}

    obj.x = 600;

    }

    moveBox (this.myBox);

    */

    or, more generally, you can pass a reference to "this":

    / * js

    var tl = this;

    function moveBox (obj) {}

    obj.myBox.x = 600;

    }

    moveBox (tl);

    */

    p.s. Please check the useful/correct.

  • The use of JavaScript to extend the height of a DIV at the height of a document or a page.

    Hi all

    How to use JavaScript to dynamically resize a DIV on a page, so that the div extends vertically to the size of the page or document.

    I did experiences throughout the evening with different methods, some do not work yet.

    Thank you all!

    WE

    This question is asked several times a week.

    SAME HEIGHT CSS COLUMNS

    Option 1. Start the project with equal height CSS Layout
         http://matthewjamestaylor.com/blog/equal-height-columns-cross-browser-CSS-no-hacks

    Option 2. Use the Faux column method (vertical tiled background image)
         http://forums.Adobe.com/message/2653416#2653416

    Option 3. Use of JavaScript
         http://www.Projectseven.com/Tutorials/CSS/pvii_columns/index.htm

    Each solution has advantages and disadvantages.  Use the one that best meets your needs.

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB

  • Failed to create the menu popup JavaScript with to display the context Menu with the help of add behaviors

    Whenever I load a page with this added behavior and test it with my link, I get a message "error on Page".

    Here's what I do:

    Create a new HTML page in Dreamweaver 8.0.2 and save it.

    Add a hyperlink in the Insert-> menu hyperlink. Do not put anything in it except a few example of text; "THIS IS a TEST", or something.

    Select the hyperlink and choose "Show the context Menu" in the tag behaviors menu tab ' + '. The dialog box will appear.

    Add a single item and add a link to a page. Do not change the other options. Click OK to close the dialog box and the code will be added to the page.

    Save the HTML page again and press F12 to load the page on your test server and display them in a browser.

    Hover your mouse over the link to test. Nothing happens and there is a message in the status bar at the bottom of the browser, "error on Page".

    OK, it works. I saw the source file that are listed there, but I assumed that Dreamweaver would be to download the file with the HTML file to test on my test server. Usually, I'm prompted to download all the dependent files. Is there an exhibitor or dreamweaver do not miss this link?

    I'm sold on convictions explained in the rants you have linked, but only after I see that Dreamweaver menus don't work. It is not entirely necessary for my completely dependent users of my menus, they are only a feature of page layout.

    Since I have the ear, maybe you could tell me something before my attempt it: is it possible to generate the JavaScript using PHP? I would like to include JavaScript in the context of records with PHP MySQL. Is there another possible solution from PHP? I guess that ASP is a solution already and maybe Flash too.

    This is the kind of page I'm working on that:

    http://www.symbiota.com/MiloTrial/witnesses.php

    I would like to see a drop down menu for each trial where the number of witnesses is less than 10 to save someone the trouble to open a new page just to see a list of ten names.

  • The use of recovery with satellite Pro 300 disks?

    Hello
    I have a 300 satellite with recovery disc Pro, I want to give this to my daughter I copied all I need her and want to wipe it.
    would be very grateful if you could give me instructions step by step how use the recovery disc.

    Thank you

    To use the recovery disk is very simply.
    Just to follow up:

    -Start your laptop and press F12
    -When the boot menu appears recovery media in the optical disc drive
    -Choose the CD/DVD drive on the list and press ENTER
    -Follow the on-screen menu
    -There is nothing, you can choose or define. Just follow the menu and confirm with OK

    After the installation of recovery image let cell phone to complete the installation.
    Please note: recovery procedure will erase entire HARD disk and all data will be deleted. So, before you start installation save all your important data.

    All that s!

  • Question about the use of foil with HARD drive

    Hi all
    Please can someone tell me what a sheet of aluminum covering the hard drive for laptop for?
    I guessed that it's temperature.
    But some information I found says the opposite.

    "
    My Seagate hard drive hot enough during long extensions CD writing/Back Up...
    Everyone recommends the use
    the foil of Food Grade to dissipiate heat?
    In my experience, things hot wraped in paper Aluminium gets cooled quite quickly... »

    My old man was a problem of partition table, I got a new and reluctant to cover it with a sheet.

    What do you think about this?

    Sombatk

    Hello

    I have replaced several hard drives on some laptops but I have never used any further papers of aluminum and I have no problem with the temperature.
    In my opinion, it is not necessary.
    The cooling modules must be able to manage the temperature of the HARD drive.

  • The use of tables with void / vi

    Hello!

    I have a question about the correct method for the use of a Subvi to update an array of integers. How to pass the array to the Subvi, without creating a second table to the output (or what is returned)?

    It is for the calculation of the histogram data. Basically, I have a set of input values are evaluated to determine which bin location (array index) to increment the counter on. I then want to use the same Subvi to update table (let's call it "BinsIn", for the sake of discussion) and return to the main VI. Think in terms of textual programming I want to pass the array of reference, so I'm not wasting resources.

    I read a few posts that deal with using Ctl Refnum, but I don't know if that's what I want to do...

    Any help would be appreciated.

    Thank you

    Shaun

    Don't think in textual languages.  There is no difference in passing by reference and by value.  If the compiler determines that the input array can be reused as the output array, and then she'll do.  You can give him some advice that he should do by writing your code to perform operations "on the spot" (search for this term on this forum) and avoiding the functions requiring a copy the table as delete table.  Best thing to do is probably to write your code to make it work, then download it here so that other contributors can comment and help to make it more effective.

Maybe you are looking for