Extending a function over various frames?

hi, this cursor follow works in a single frame on the main timeline with a stop action :
// kisses start and follow cursor
addEventListener(Event.ENTER_FRAME, start_kisses); 
function start_kisses(event:Event) { 
staged_kiss_mc.x = stage.mouseX;
staged_kiss_mc.y = stage.mouseY;
staged_kiss_mc.gotoAndPlay(start_kissin);
MovieClip(this).stop();
How can this same function be called in various frames throughout the main timeline? 
For instance, say the above code is on frame one and the "staged_kiss_mc" is extended from frames 1 to 10.  On all frames there is also a stop action (along with additional code, content, etc.)
How can the function "start_kisses" be activated on each of the 10 frames in the same way it is on frame 1 ?
Is it necessary to add a new Event Listener? 
Do new functions need to be coded for each frame, such as start_kisses1, start_kisses2, etc.?  --Or can the same original function be reused?
Thank you

Thank you that is interesting...so code can be "extended" down a timeline in the same way a movie clip can...until the next keyframe? 
But if on layer A code is extended from frame 1 to frame 10...what happens when there are stop actions on each of the keyframes between 1 and 10 on layer B.  (Especially if in this case the code meant to be extended on frame 1 of layer A is an Enter Frame action...?) 
Can a function such as:
function dothis(event:Event) { 
dosomething;
be "called" on subsequent keyframes on layer B -- each has stop actions on each keyframe -- by using something as simple as:
dothis();
Is that possible?  To declare a function on frame 1 and then activate it again further down the timeline?
If I rename the function slightly in each keyframe to avoid "duplicate function" errors, it seems like an excessive amount of code:
[frame 1]
function dothis1(event:Event) { 
dosomething;
[frame 2]
function dothis2(event:Event) { 
dosomething;
etc
That's not the correct approach...right?  (Can functions triggered by ENTER_FRAME events even be extended down a timeline? ...)
Thanks for your time, very, very appreciated....

Similar Messages

  • Extended Rebate functionality (and its use)

    Iu2019m currently working at an international customer with operations in Europe. They sell products in almost all countries in Europe, which are being sourced normally from one single plant.
    They are using the intercompany billing process.
    They are currently using the standard Rebate functionality, including Rebate settlement.
    They are facing with an issue with the Rebate settlement process.
    They setup the rebate agreement with an element of a material, e.g. the material pricing group, since the product portfolio is too large to use a material in the rebate agreement.
    Normally a product is delivered from one source (one single plant), but occasionally the product will be delivered from another plant (in another country)
    The issue in the rebate settlement is the proper determination of the tax code and therefore the proper tax percentage. This since the products can be from several source (delivering plant) in several countries.
    It is impossible to create all combinations in a rebate agreement, including the delivering plant, since there could be over 30 of them.
    We have already thought of the fact to include the material tax classification in the setup of the rebate agreement.
    Currently we are looking at the following options
    Implement Vistex u2013 a (fairly) expensive proposition
    Do nothing u2013 this will mean, that the Finance department will need to use a (custom) BW report to make financial posting and Credit Memou2019s
    Made enhancements in the current process u2013 this will mean a long time for analysis and a longer time to made the enhancement and even a longer time to properly test all changes.
    Implement Extended Rebate functionality. We have been looking at this and have a couple of questions on this:
    Can we turn on the extended rebate functionality for existing agreement types?
    Should we create new agreement types and use Extended Rebate functionality on the new agreement types?
    The configuration of the Variable keys u2013 are there any hidden u201Cissuesu201D we should be aware off?
    Any comment, documentation, link to documentation, remark, suggestion is welcome.
    Thanks and regards,
    Jan Pel

    Hi Jan Pel,
    Did manage to find a solution for your problem?
    We are facing a similar issue but the situation is more difficult since we don't use standard sap to determine the tax. Instead we use an external system and due to this we don't have more than 2 tax codes maintained (they are meaningless really).
    I'm also trying to understand the standard sap behavior for tax determination on the rebate settlements. Since the settlement is creating an item per condition record, how is the correct tax applied (and multiple documents/items created if different tax applicable). Is standard sap creating different settlement invoices/items in the settlement invoice if there are different tax codes in the underlying billing documents in scope of the rebate agreement?
    I would appreciate your feedback.
    Thanks and best regards,
    Kevin

  • Help Needed With "Extend Marker" Function Not Working

    I have several Clips and used the "DV Start/Stop Detect" function to find the time code breaks, which seems to work well. I've now got a clip full of Segment markers.
    The problem arises when I try to use Extent Markers "Option + `" to make subclips. When I put the play head on a subsequent marker, the Marker/Extend function is grayed out.
    Extending a marker that I have created using the M key works perfectly.
    Why can I not use the Extend function on Segment Markers?
    Any help on this is greatly appreciated. I have 30 odd clips that I need to set up segments for, and doing it manually will add hours to my workload.
    Thanks
    Gary
    Dual G5 2.5 GHz Dual Core, 2.5 GB RAM, 500 GB HDD   Mac OS X (10.4.3)   Final Cut Studio FCP 5.0.4

    Thanks for the reply.
    I am completely aware of items 1 through 3, and never Extend markers in the Timeline. Only the Viewer.
    To perform an Extend Marker and avoid headaches, load the captured clip - the one with the video icon in the Browser - into the Viewer. Then, as you scrub along in the Viewer, Option-` as needed.
    That is precisely what I am doing.
    To Extend the marker I first double click the clip to load the entire clip into the Viewer, where all the Section markers are displayed. I then check Mark>Markers>Extend and the function is grayed out. However, if I move the playhead one frame prior to the Section marker, the previous Section marker extends to the frame prior to the new play head position.
    If I do this with manually entered markers (using the M key, creating Marker 1, 2, 3.... in sequence on the Viewer timeline), then the Previous marker is extended to the frame immediately prior the the current play head position - i.e. from Marker 1 to Marker 2. I do not have to move off the Marker 2 position to be able to extend Marker 1.
    Also, simply selecting all your Markers and either dragging them to another bin (or pressing Command-U) does not produce the needed subclips?
    Of this I am also aware. I find the Command-U process just confuses the issue, creating more clips to manage (others may disagree). I prefer to simply drag the "Subclips" directly from the Main clip into a Timeline.
    Because you're doing all this to get subclips, right? Or wrong?
    If I understand your reply correctly, I think you misunderstood my problem. I have been using subclips for several years, and find them VERY useful, especially with multi-camera shoots. So, I am quite familiar with creating and extending markers.
    I just started experimenting with the Detect feature and find it works quit well (most of the time). My problem is that the Segment markers created by the Detect process, do not perform the same as manually place markers, as far as the Extend marker function is concerned, anyway.
    BTW - By using the TC display in my Panasonic PV-GS400 Camera, and sending the FCP video via Firewire to the camera, the camera displays the TC on the captured clip, which I then rename the marker to for TC reference. As long as the Date/Time on the cameras are properly synced, syncing clips in the Timeline is a breeze!!
    Anyway, to clarify, my process is as follows:
    1. Capture a clip.
    2. Display the clip in the Viewer
    3. Select "DV Start/Stop Detect" and watch as the section markers appear in the Viewer.
    4. In Viewer, place play head on the first Section marker
    5. Press the M key to Edit Marker.
    6. Change the Name of the marker to the timecode of the Marker now displayed in the Camcorder window.
    7. Use Shift-Down Arrow to move to the next Section Marker
    8. Press Option+` to Extend the previous marker - which does not work and is grayed out in the Mark>Markers>Extend menu.
    9. Back to step 5.
    This process works perfectly with manually created markers. Because the Extend works if I move the play head one frame prior to the current Section marker, this tells me there is something "special" about the Section marker that disables the Extend function, unlike a manually created marker.
    BTW - If I delete the Section marker, and create a manual marker at the same frame, the Extend marker function works again. Again, indicating that Section markers are different somehow from manual Markers.
    Hopefully, this wordy explanation of my process clarifies my problem.
    Aside: The clips are supplied to me by a customer on a 500GB FW800 drive. FCP5 was used to capture the clips from the original Tapes (which I do not have access to). I am the editor for the project.
    Thanks again for the reply. It is greatly appreciated. If there is any other info that I have missed that will help figure this out, please let me know and I will post a response a quickly as possible.
    Gary

  • Flash CC to canvas and spreading code over several frames

    I know about the relationship between flash and CreateJS, and I know that I could step away from the flash interface for A LOT of what I'm after and simply use it to create a nifty library of assets and have all my javascript as external files. That's not what I'm after (although using a text editor with proper syntax highlighting would be wonderful!). I wish to keep as much of my workflow as possible inside of the Adobe Flash CC interface.
    The question comes in two parts, the second being a followup question:
    1) Where I before used to save code in external as files, since now the external javascript gets created (combined) when publishing the flash project, I thought I'd better keep all my code inside of flash. Is this a mistake? I'm after ease of use and keeping my projects structured.
    2) If I keep my code inside of flash I'd never nest it in movieclips. I'd keep it all on the main timeline strictly. Back in the golden flash days for decent but smaller apps I'd put general helper functions and imports on the first frame, then maybe some preloading graphics on frame 2 with minimal code for that. Finally "the app" on frame 3 with more specific code to manage the interface. This made everything load quickly and I could spread the app functionality naturally over a few frames to make it easier to visualise and manage. But exporting for canvas/javascript I can't even get code on one layer to recognise the functions on another. Do I really need to scope main timeline functions on creation to get it to work?
    I'm really after basic advice on workflow and project structuring.
    Thanks!

    1) that's a strange question considering you prefaced it by saying you want to keep everything in flash.  so yes, given that requirement (ie, you want to put everything, if possible, in flash), put all your code inside flash.
    2) you need to scope everything. there's no problem (from flash/exportJS) spreading code over different frames/layers, if that's what you want to do.  you probably just need to be more careful with your scoping if think code in one layer won't recognize functions in another layer.  ie, in your top layer, use:
    var tl = this;
    // and then use tl to reference the main timeline in your functions (and elsewhere).

  • Adobe Acrobat X: Attachments and Extended Reader Functions...

    All,
    after adding attachments (e.g. PDF documents) to a PDF document and saving the document with "Extended Reader Functions" an error is shown in the Java debugger window:
    SyntaxError: missing ) after argument list
    10:Document-Level:ADBE::FileAttachmentsCompatibility
    Adobe creates a document-level javascript function called "FileAttachmentsCompatibility" within ADBE.
    Looking into the source code, the error can be easily seen
    app.alert("Dieses Dokument hat Dateianlagen. zum Anzeigen der Anlagen klicken Sie auf "Speichern", um eine Kopie des...
    (a part of the German version is shown)
    As one can see, the highlighting "Speichern" (saving) is inside of double quotation marks.
    This can only be solved by - again - saving the newly created document as a copy. Opening this document, one can edit the faulty script
    Find below the corrected version:
    var v = app.viewerVersion;
    if (v < 7)
    var n = 0;
    if (this.dataObjects != null)
      n = this.dataObjects.length;
    if (v >= 5 && v < 6 && n > 0 && (app.viewerVariation == "Full" || app.viewerVariation == "Fill-In"))
      if (this.external)
       app.alert("Dieses Dokument hat Dateianlagen. Zum Anzeigen der Anlagen klicken Sie auf "Speichern", um eine Kopie des Dokuments zu speichern. Öffnen Sie die Kopie in Adobe Acrobat, und wählen Sie "Datei" > "Dokumenteigenschaften" > "Eingebettete Datenobjekte".", 3, 0);
      else
       app.alert("Dieses Dokument hat Dateianlagen. Zum Anzeigen der Anlagen wählen Sie "Datei" > "Dokumenteigenschaften" > "Eingebettete Datenobjekte".", 3, 0);
    else if (v >= 6 && v < 7)
      if (n == 0)
       var np = this.numPages;
       syncAnnotScan();
       for (var p = 0; p < np && n == 0; ++p)
        var annots = this.getAnnots(p);
        if (annots != null)
         for (var i = 0; i < annots.length; ++i)
          if (annots[i].type == "FileAttachment")
           n = 1;
           break;
      if (n > 0)
       if (this.external)
        app.alert("Dieses Dokument hat  Dateianlagen. Zum Anzeigen der Anlagen klicken Sie oben in der vertikalen Bildlaufleiste des Dokumentfensters auf das schwarze Dreieck und wählen "Dateianlagen".", 3, 0);
       else
        app.alert("Dieses Dokument hat Dateianlagen. Zum Anzeigen der Anlagen wählen Sie "Dokument" > "Dateianlagen".", 3, 0);

    The script was automatically created by the Adobe Acrobat software...
    I know the issue, but is there any bug-fix available? I don't want to correct it for every document!
    Correction: Above you find the automatically created document.
    A corrected possibility is shown below:
    var v = app.viewerVersion;
    if (v < 7)
    var n = 0;
    if (this.dataObjects != null)
      n = this.dataObjects.length;
    if (v >= 5 && v < 6 && n > 0 && (app.viewerVariation == "Full" || app.viewerVariation == "Fill-In"))
      if (this.external)
       app.alert("Dieses Dokument hat Dateianlagen. Zum Anzeigen der Anlagen klicken Sie auf 'Speichern', um eine Kopie des Dokuments zu speichern. Öffnen Sie die Kopie in Adobe Acrobat, und wählen Sie 'Datei' > 'Dokumenteigenschaften' > 'Eingebettete Datenobjekte'.", 3, 0);
      else
       app.alert("Dieses Dokument hat Dateianlagen. Zum Anzeigen der Anlagen wählen Sie 'Datei' > 'Dokumenteigenschaften' > 'Eingebettete Datenobjekte'.", 3, 0);
    else if (v >= 6 && v < 7)
      if (n == 0)
       var np = this.numPages;
       syncAnnotScan();
       for (var p = 0; p < np && n == 0; ++p)
        var annots = this.getAnnots(p);
        if (annots != null)
         for (var i = 0; i < annots.length; ++i)
          if (annots[i].type == "FileAttachment")
           n = 1;
           break;
      if (n > 0)
       if (this.external)
        app.alert("Dieses Dokument hat  Dateianlagen. Zum Anzeigen der Anlagen klicken Sie oben in der vertikalen Bildlaufleiste des Dokumentfensters auf das schwarze Dreieck und wählen 'Dateianlagen'.", 3, 0);
       else
        app.alert("Dieses Dokument hat Dateianlagen. Zum Anzeigen der Anlagen wählen Sie 'Dokument' > 'Dateianlagen'.", 3, 0);

  • Help and some explanation how to get a Microsoft.Office.Tools.Excel.Worksheet host item that extends the functionality of the current Microsoft.Office.Interop.Excel.Worksheet object

    Hello,
    I would use some help and more info about how to get host object that extends the functionality of my current Interop.Excel.Worksheet object. I read this artical: https://msdn.microsoft.com/en-us/library/ee794671.aspx where I can call this function
    GetVstoObject to get host object. But I see that here I need to pass the Globals.Factory object as second parametar. Can someone give me more details about that parameter and how to access it? I would like to get host object so I can access extension
    property, since my interop excel worksheet doesn't have it.  
    I am using Visual Studio 2013 for developing Excel addin. Using Excel 2010.
    Thanks in advance for help.
    Regards,
    Zeljka

    Hi Zeljka,
    >>I am using the Microsoft Office PIAs, so my question is how to access this automatic generated class Globals in my case?   <<
    Sorry, I am not able to understand the application you were developing exactly. From the orgnal post, you were developing an application level add-in, however based on the description above, it seems that you were building an console or Windows form application
    to automate Office application.
    If you were developing Office automation, the host item can't work for this secnario since it should run under the VSTO runtime.
    If I misunderstood, please feel free to let me know.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Extended Rebate Functionality with Variable Keys

    Hello All,
    I am trying to find information on extended rebate functionality in 4.7. I have looked though white pages G72, G63, and G64 but have yet to find what I am looking for.
    Basically I want to be able to spread a rebate settlement (credit memos) to multiple partners in a customer hierarchy evenly based on their individual sales volume (instead of one Rebate recipient per agreement I want many based on customer hierarchy node).
    I also would like to spread the settlement against multiple materials.
    I have heard this is may be possible using the variable keys and structure S469 but for the life of me I cannot figure out if it is possible to do what I am asking.
    I really appreciate any help that can be extended to me.
    Thanks,
    Lance

    Hi Lance,
    thr price-conditions ( values or rabates ) are stored in Tables like S+++ ( S469).
    You want to have an access to a pricing table with other keys as you found in the standard system.
    Therefor : make you own S9++.
    there are the following steps:
    Check, if your key is in the selected keys for pricing - if not, add it there.
    The field must be in an apend of structure KOMG ( generally ) and KOMP ( for position fields ) or KOMK ( for header fields ).
    Create your own S9++ -- ( in Pricing, i have about 150 own pricing tables ).
    Next : go to the Customizing of the ?? German = Zugriffsfolge ?? for the condition.
    Here you can add up to 99 Zugriffe to get the condition. Here you need your new S9++ and you have to connect it with the fields.
    ( i have had problems with the 'little' number of 99. for one Condition i need up to 160 Zugriffe - i have split it up into 2 Conditions ).
    In one S9++ you can connect several fields to one Condition table.
    The customer - numer and the hierarchi - number and the recipienst-number - all fields are of the sae kind.
    In the Zugriffsfolgen, you can do  several Zugriffe for the same Table S9++ - but in the connection of the fields, you can variate the souce fields -- first Zugriff : Customer - number / secons Zugriff : Hierarchy 1 / ....
    With this method, you can also add customer fields of VBAP or VBAK into your pricing module.
    I hope, youve got an idea, where t go. see also in the SAP documentation - in german, i have picked many things out of the documentation.
    Hans

  • Is DIAdem script with Extended Classification functionality of DIAdem Professional executable by DIAdem Base?

    The Professional license adds 3D model data mapping and Extended Classification functionality to DIAdem. If I make a script that uses the 3D model data mapping functionality in DIAdem Professional it is possible to use this same script on a PC with only DIAdem Base (according to http://sine.ni.com/ds/app/doc/p/lang/nl/id/ds-263)
    Is this also true for the Extended Classification functionality? Is it possible to make a script with DIAdem Professional and execute this same script on a PC with only DIAdem Base to generate a report?
    Thanks,
    Roger

    Hi Roger,
    My understanding is that the VBScript you create that uses the extended classification function will work fine in DIAdem Base.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Block the creation of vendors via the "extend vendor" function

    Is it possible to block the creation of vendors via the "extend vendor" function?  Currently, a number of vendors have been created in this way and are 'shared' across different markets.  This has created a control risk on master data, so I am investigating if it is possible to restrict the process.
    Please suggest
    Thanks
    Mani

    Hi:
               Initially your requirement was just to detain user from creating vendor using reference vendor as given in XK01 under reference (Vendor number and co code & Purchasing organization). Through SHD0 you were able to suppress these three fields ( if i am right? correct me here). If its Ok then system has stopped you from creating vendor using reference of another already created vendor. As far main vendor number and co code and purchasing org fields are concerned that appears on the top of XK01 please note that Vendor number field is only used when you use external number range for this vendor account group ( check number range assigned to the vendor account group in OBAS and then check it in XKN1 if is set as external or internal number range). If you have activated internal number range then nothing needs to be given in Vendor number field and system will generate vendor number internally and this can be suppressed otherwise if you are using external number range the system will create vendor as given by you in Vendor in main screen of XK01. Hence it depends on the process you are using in your company for vendor master data creation.
    Regards

  • Send back to author issue in HCMFP with extended notification functionality

    Hi,
    We are using HCM Forms and Processes in our project .When the Form is sent back to author by the manager, author receives the email using extended notification functionality where the author clicks on the link provided in the notification email to open the form.Till here everything working fine, but when the author sends  the form again for approval with required changes , the approver  could not see the latest changes in the form. He still see the old data. Please note standard Task TS04000020: PD Form Is Edited Again by Author is used in the workflow.
    We tried the same scenario, where author access the form through UWL, make necessary changes and send the form for approval. In this case,latest changes can be seen by approver without any issue.But, as per business we can not provide UWL and should use extended notification functionality only..
    Please help in resolving the issue with extended notification functionality as early as possible.
    Thanks,
    Pavan.

    Hi Viji,
    Regarding your question.. here is the business requirement.
    1. Author fills the HCM form , hit check and send button, so that workitem goes to approver's UWL.Author do not have portal, but performs this process from SAP GUI itself using the webdynpro link as shown below.
    https://  pint01.xxx.net:8043 /sap/bc/webdynpro/sap/asr_pd_process_execute?sap-wd-configId=ZXX_PD_PROCESS_EXECUTE
    2. Approver has buttons on the form to approve, reject or send back to author.
    3. When author hits the "send back to author" button, the work item (task TS04000020) will be created for the author.
    4. The notification email will be sent to author using the program SWN_SELSEN.The email contains a link as shown below to open, edit,check and send it again for approval.
    https:// pint01.xxx.net:8043 /sap/bc/webdynpro/sap/asr_process_execute?WI_ID=000000052545
    The problem here is, when the author makes changes and send the form for approval, the approver still see the old content only in the form.
    Thanks,
    Pavan.

  • Problem with externalURL function over sandboxbridge

    I have a simple application that I am running , I have run items through the sandbox bridge without any issue until I try to run the openExternalURL command, that one will not run, I am posting my client and the page here in hopes that someone might have come across this and have a fix for it , I am pretty sure that the fix is simple and that I am probably overlooking something small with this one LOL .
    If I call any of the other functions they work like a charm but if I call openExternalURL , it won't work so I am pretty sure the problem is the function openExternalURL
    Any ideas would be helpfull
    -R
    **************AIR CLIENT*********************************************************************
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <script src="AIRAliases.js"></script>
    <script language="javascript">
    function openExternalURL(href) {
    var request = new air.URLRequest(href);
    try {           
    air.navigateToURL(request);
    catch (e) {
    function testFunction(T){
    alert(T);
    function getUrlVars(){
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for(var i = 0; i < hashes.length; i++)
    hash = hashes[i].split('=');
    vars.push(hash[0]);
    vars[hash[0]] = hash[1];
    return vars;
    function noLogin(){
    alert('Your login information was incorrect, please try again');
    top.location.href="login.html";
    var Exposed = new Object();
    Exposed.openExternalURL = openExternalURL;
    Exposed.getUrlVars = getUrlVars;
    Exposed.noLogin = noLogin;
    Exposed.testFunction = testFunction;
    function doLoad() {
    var frame = document.getElementById('viperframe').contentWindow.parentSandboxBridge = Exposed;
    setIframeHeight('viperframe');
            </script>
    </head>
    <body onload="doLoad();" onresize="setIframeHeight('viperframe');" onfocus="setIframeHeight('viperframe');" bgcolor="#222222">
    <iframe src="processlogin.html" id="viperframe" name="viperframe" frameborder="0" scrolling="no" width="100%"></iframe>
    </body>
    </html>
    ********************************END AIR CLIENT*********************************************
    *******************************PAGE CALLING FUNCTION**********************************
    <script language="javascript">
         parentSandboxBridge.openExternalURL('http://www.google.com')
    </script>
    ****************************END PAGE CALLING FUNCTION********************************

    Hi
    Could not find exact FM for your requirement but I have one logic which I also used for similar rquirement
    Table MCHB contain the batch and 'clabs' is the field for quantity,
    Just write your own logic and get the desired result.
    Hope this helps.
    Regards
    Bikas

  • GRE function over MPLS

    Hello,
    Has anyone here implemented "GRE function over MPLS"?
    Would it be possible to point to some links discussing advantages/disadvantages and some design aspects of the same?
    Thanks
    Cheers,
    ~sultan

    Hello Harold,
    Thanks for replying, actually just thought about it, considering the existing customer (P2M) who's running GRE on IPLC links, they want to continue the same after migrating to MPLS, just curios to know whether this implementation has been implemented by anyone and whether it could be improved further.
    Thanks
    Cheers,
    ~sultan

  • How to extend the functionality of Smtp through servlets

    hi
    will some one tell me how to extend the functionality of SMTP server through servelts
    bye

    [samreenkazi],
    Here's some code that might help you get a servlet to send e-mails out by using the sun.net.smtp.SmtpClient class:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import sun.net.smtp.SmtpClient;
    public class SendMailMessageServlet extends HttpServlet {
    static final String to = "[email protected]";
            public void doGet(HttpServletRequest req, HttpServletResponse res)
                                            throws ServletException, IOException {
                    res.setContentType("text/html");
                    PrintWriter out = res.getWriter();
                    //grab the values of each field
                    String name = req.getParameter("name");
                    String feedback = req.getParameter("feedback");
                    String mailfrom = req.getParameter("mailfrom");
                    //Notify the sender of his/her feedback
                    out.println("<HTML>");
                    out.println("<HEAD><TITLE>Mail sent successfully</TITLE></HEAD>");
                    out.println("<BODY>");
                    out.println("Your e-mail has been sent successfully");
                    out.println("</BODY></HTML>");
                    //Send an e-mail
                    SmtpClient smtp = new SmtpClient(); //assume localhost
                    smtp.from(mailfrom);
                    smtp.to(to);
                    PrintStream msg = smtp.startMessage();
                    msg.println("To: " + to); // mailers will display the To: address
                    msg.println("From: " + mailfrom); //mailers will display the From: address
                    msg.println("Subject: Hello World !");
                    msg.println();
                    msg.println("Hello World");
                    smtp.closeServer();
    }Note that the sun.net.smtp.SmtpClient class has limited capabilities. A better alternative is to use the JavaMail API and when you download the JavaMail packages, there are some sample example code that may help you.
    HTH.
    Allen Lai
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • Extending iCal Functionality

    Does anyone have any ideas as to how to extend the functionality of iCal. I would like to be able to open my own window when an appointment in a particular calendar is double-clicked.
    Thanks for any advise

    Welcome to Apple Discussions,
    1. . *Preparatory Tasks*: Perhaps the biggest request I would have. Many appointments in a calendar require some form of preparation. Examples might include a client briefing meeting (requiring presentation preparation for example) or a lecture/tutorial (requiring reading and prep work). If iCal could automatically prepare tasks with a deadline before the appointment it stems from, this would be immensely helpful!
    You could set an alarm prior to the event to remind yourself to do these task. Within an event set an alarm "ON DATE" and then choose the desired earlier point in time.
    3. *Custom week numbers*: Many institutions (corporations, universities etc.) use their own system of numbering weeks. It would be nice if iCal could have a setting for specifying the first week number and number of weeks in (and therefore institution) in a given calendar, without creating separate week-long events named by the week number. This would also be very useful for repeating tasks.
    There is a weekly calendar available here: http://www.apple.com/downloads/macosx/calendars/
    With your descriptions I can see why these features might be useful.
    Consider letting Apple know what you are looking for: http://www.apple.com/feedback/ical.html
    You might want to look around to see if there are other organization programs out there that might meet your needs. There are professional project management applications (rather than calendar which is what iCal is) out there that include many of the features you mention.
    Cheers.

  • Stoping a timeline for set durations at various frames (AS3) ?

    Hi Guys,
    I'm wondering how to stop the root timeline at a given frame using action script 3 in flash CS4
    With AS2 I used this kind of script that worked all the time.
    this.createEmptyMovieClip ("timer",50);
    timer.onEnterFrame = function () {
        if (this.startTime > 0) {
            var difference = getTimer () - this.startTime;
            if (difference > this.timerLength) {
                this.target.play ();
                this.startTime = 0;
    function pauseFor (theTime) {
        stop ();
        timer.timerLength = theTime;
        timer.startTime = getTimer ();
        timer.target = this;
    And I called the pause duration from the frame that needed it, etc.
    Any ideas for AS3? (I've been away from flash for a year and it shows...ouch! but I'm a n00b to as3)
    Thanks in advance!!

    Hi Thali-Hoo,
    What you're going to want to do is take advantage of the timer class here, use a document class for your FLA and use an undocumented method addFrameScript. I've written up a sample of how to do all of this and posted it in a zip file. Basically here's what I've done though:
    package
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.events.TimerEvent;
        import flash.utils.Timer;
         * @author Jesse Nicholson
        public class PauseTimeline extends MovieClip
            public function PauseTimeline()
                if (stage) {
                    init();
                }else {
                    addEventListener(Event.ADDED_TO_STAGE, init);
            private function init(e:Event = null):void
                trace(totalFrames);
                addFrameScript(30, frame30);
            private function frame30():void
                //The playhead has just hit frame thirty. This is the same as having a script on a frame icon in the IDE
                trace("Hello, frame thirty");
                stop();
                var delayTimer:Timer = new Timer(5000, 0);
                //It's not the best thing to throw a function right into the handler reference but in this case it's short and sweet. See below on how you'd write the function out proper
                //This is how you would do the listener normally
                //delayTimer.addEventListener(TimerEvent.TIMER, frameThirtySleepTimerExpired);
                delayTimer.addEventListener(TimerEvent.TIMER, function(TimerEvent):void { gotoAndPlay(1); } );
                delayTimer.start();
            private function frameThirtySleepTimerExpired(e:TimerEvent):void
                //Check and see if the timer listener is on the currentTarget (the delayTimer object) and remove it if exists
                if(e.currentTarget.hasEventListener(TimerEvent.TIMER) == true){
                    e.currentTarget.removeEventListener(TimerEvent.TIMER, frameThirtySleepTimerExpired);
                //Do whatever you want to do in here (when your timer has expired/completed)
                 gotoAndPlay(1);
    So, to explain. The FLA has 50 frames on the root timeline. On init (which is when the stage is present, which means that the class has fully initialize and the constructor has been processed etc blah blah) I use addFrameScript and attach the method frame30 to frame 30 on the root timeline. This is the same as just going to frame 30 in the IDE, making a keyframe and writing on the timeline.
    So when the play head lands on frame 30, it calls the frame30 function. Inside that function we stop the playing of the timeline, create a timer object with a delay of 5 seconds and instead of passing in a reference to a handler function I just write a function on a single line right in there. Not the best way but for this example it's short and clean, but I still included a sample of how to do it normally commented out.
    When the timer is started, the clock starts ticking. When the timer has finished counting through it's delay, it will fire an event to the listener handler function which only has the code "gotoAndPlay(1)" to restart playing from frame 1, looping the whole process. I think this is what you're looking for but if not or if you have any questions let me know. In my job I try to work with AS3 as much as I can but sometimes (like today) they force me to go back to AS2 and.. well basically I can sympathize with you so let me know if you need any other help transitioning to AS3! lol Hope this works for ya,
    Jesse
    PS - DL The example here! http://ascensionsystems.ca/Pause Timeline.zip

Maybe you are looking for

  • Smart phones not working

    I recently went from a windows 3002 server housing exchange 2007 (everything working fine including smart phone connectivity) to a new box, Windows 2008R2 housing Exchange 2013 this past weekend. Every thing is working but the smartphone connections.

  • System not picking data correctly in S_PL0_86000030

    I am trying to process report S_PL0_86000030 . While trying  to view the call up report for particular GL a/c in a particular fiscal year and co code, we are getting the data for period 1 to 3 for line item reports . The data displayed is correct in

  • Move position of calculated item in pivot table

    Hi experts, I have done the pivot table in the table above: http://www.2shared.com/photo/MB3J5caU/image1.html The item sum 2005-2006 is the sum of the value of commission amount for the years 2005 and 2006. I need to move this item after the value 20

  • How do I install Mapature Pro plug-in into Aperture 3.4.3?

    I have MaperturePro.dmg but can't get Aperture to recognize it. I know that it worked fine on my old MBP.  Thanks!!!

  • Subclassing java.util.logging.LogManager

    i am trying to subclass the LogManager class and have tried adding the following System property as mentioned in the Java API :- java.util.logging.manager = CustomLogger where, CustomLogger is the name of my subclass of LogManager. Still, when I ran