How to invoke a java application in the middle of the process

In the middle of one process, I want to invoke a java application. After the java application, the process will continue and select a path based on the result of the java application. Which activity can be used to invoke a java application in the middle of the process?
Thanks

BPM Changes:
1. Under 'External Resources' create a new resource of type 'Server Configuration'. Specify the host port and path of your servlet here. This will be invoked from your process. Lets name this configuration as 'myExternalConf'.
2. Create an interactive activity say 'InvokeMyApplication' in your process. The main task of this application should be external task. (Implementation Type = External)
3. Create the prepareMethod method say 'prepareExternal'. Set the arguments for this method as output arguments. These arguments will be available to you in your external servlet.
4. Create the commit method say 'commitExternal'. Set the arguments as input arguments. The external servlet will return these arguments back to the process.
5. Check the 'Use configuration' checkbox for your main task (external task). Select 'myExternalConf' here.
Servlet changes:
When the user executes your 'InvokeMyApplication' activity, he will be taken to the external servlet of your external application. You will be passed the currentActivity, currentParticipant, instanceID and one more argument (which I dont remember :( ) as url parameters.
1. In this servlet, open a PAPI/PAPI WS session for the participant passed to the servlet as url parameter
2. Use the currentActivity ( passed in url parameter), to call prepare method on this activity. This will return you with the arguments defined in 'prepareExternal' method.
3. Using these argumets, or otherwise, you can do whatever you want in this servlet. When done prepare the arguments to pass back to BPM.
4. call papiService.activityCommit and return the arguments.
5. Flow goes back to your BPM application
Some code that might help:
Servlet calling prerpare:
ProcessServiceSession papisession = null;
try{
papisession = initializePapi();
fuego.papi.Arguments args = fuego.papi.Arguments.create();
args = papisession.activityPrepare(activity, instanceId, args);
Map<String, Object> argsMap = args.getArguments();
return argsMap;
protected ProcessServiceSession initializePapi(){
Properties configuration = new Properties();
try {
InputStream inputStream = getClass().getClassLoader().getResourceAsStream("bpm.properties");
if(inputStream == null)
throw new IOException();
configuration.load(inputStream);
} catch (IOException ex) {
log.log(Level.WARNING, "Could not load bpm.properties", ex);
return null;
Servlet calling commit:
public void commitToALBPM(Map parameters){
try{
papisession = initializePapi();
fuego.papi.Arguments args = fuego.papi.Arguments.create();
Set s = parameters.keySet();
Iterator propNames = s.iterator();
while (propNames.hasNext()){
String key = (String)propNames.next();
String val = (String)parameters.get(key);
args.putArgument(key, val);
papisession.activityCommit(activity, instanceId, args);
catch (OperationException e)
HTH
Satinder

Similar Messages

  • Invoke one java application from another?

    Hello,
    Can anyone tell me how to Invoke one java application from another?
    Suppose I have a small java application say, Hello.java which has its own main() method and
    I also have another java application, say World.java which has its own main() method too.
    What I want to do is invoke or startup World.java from Hello.java.
    If possible kindly give code examples?

    main is just a normal method so Hello can invoke the main method of World just as it would invoke any other method.
    Kaj

  • How to make a Java application that will change the client box's IP address

    HI how to make a Java application( that application would be run on the client ) that will change the client box's IP address ( IP address of itself )

    If you can do that through the command line, then use Runtime.getRuntime().exec(...) to execute your command.

  • How to invoke a java class dynamically?

    Hi all,
    In my usecase I need to invoke a java class dynamically using any of the components like Button or link in jdeveloper.
    How could we invoke a java class which has a main method in it dynamically.
    Kindly come up with your help.
    Thanks,
    Phani.

    public class BackingBean {
    public BackingBean() {
    super();
    public void cb3_action() {
    File fileObj = new File("C:\\Jdeveloper software\\new.doc");
    IDocument myDoc = new Document2004();
    myDoc.addEle(Heading2.with("===== Headings ======").create());
    myDoc.addEle(Paragraph.with("This doc has been generated by the unit test testJava2wordAllInOne() in the class DocumentTest2004Test.java.").create());
    Table tbl = new Table();
    tbl.addTableEle(TableEle.TH, "Name", "Number of gols", "Country");
    tbl.setRepeatTableHeaderOnEveryPage();
    tbl.addTableEle(TableEle.TD, "Arthur Friedenreich", "1329", "Brazil");
    tbl.addTableEle(TableEle.TD, "Pele", "1281", "Brazil");
    myDoc.addEle(tbl);
    PrintWriter writer = null;
    try {
    writer = new PrintWriter(fileObj);
    } catch (FileNotFoundException e) {
    e.printStackTrace();
    String myWord = myDoc.getContent();
    writer.println(myWord);
    writer.close();
    Hi john,
    these are my Backing bean and action now at the run time when I am pressing a button which has to invoke cb3_action() method.
    When I am clicking the button at the runtime I am getting the below error
    Error 500--Internal Server Error
    javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: word/w2004/Document2004
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
    In the above code if you observe I have used "IDocument myDoc = new Document2004();" line. Here this Document2004 is a class which is in one of the external
    jar files. xstream-1.3.1.jar , java2word-3.0_2011Aug02.jar , log4j-1.2.15.jar .
    these are the jar files I found in net using which I can create a word file and add all the components like table and format the txt etc..
    These jar files works in Tomcat, Jboss ,Struts
    I can even run this class and got the file created.
    But when I try to bind the method in ADF i am getting the error mentioned above.
    Kindly help me on this. Sorry for posting similar question two times on the blog.
    Sorry again if this question is wierd.
    Thanks,
    Phani.

  • How to invoke a Java Program from Oracle 10g?(uRGENT)

    Hello.
    I've a query, that i have a program, that basically retreives the records from the
    oracle table and then parser this information and then insert the values in corresponding database base tables. I want that, whenever the new program is inserted, a Trigger should fire and pass the most recently entered record to the Parser Program, means
    1) Firing a Trigge
    2)Storing the most latest data and pass it to the Parser PROGRAM
    Can someone tell me how to do this? How to invoke a Java Program from within the database? Please if anyone has examples provide me. Its very urgent and tell me what is the basic mechanism.
    Thankyou.
    Ben

    With Java Stored Procedures Java may be caleed from a database.
    http://www.oracle.com/technology/tech/java/jsp/index.html

  • How to schedule a java application via Windows Scheduler

    I can't figure out how to schedule a java application using the Windows Scheduler. Do I schedule the java application with the .class file as a parameter? How do I pass arguments to it?
    To execute FileCopy.class, my best guess was:
    Start | Control Panel | Performance and Maintenance | Scheduled
    Tasks | Add Scheduled Task | Browse | Program Files | Java |
    jre1.5.0_06 | ... Advanced Properties
    Under the Task tab:
    Run: "C:\Program Files\Java\jre1.5.0_06\bin\java.exe"
    Start In: "MyDocuments\Eclipse_Workspace\Java_File_Copy
    FileCopy"
    This does not work. How do I schedule the FileCopy.class java application, and how can I pass arguments to it? Can this be done without specifying a password?
    TIA,
    John

    Suppose that your class is FileCopy (has no package name) and is located under MyDocuments\Eclipse_Workspace\Java_File_Copy folder, then you should have:
    Run: "C:\Program Files\Java\jre1.5.0_06\bin\java.exe" FileCopy
    Start In: "MyDocuments\Eclipse_Workspace\Java_File_Copy"
    And yes you must provide a user password to execute the task.
    Best way to do this is to create a special user (with password) for executing this task.
    Regards

  • Getting the error " [java] Problem invoking WLST - java.lang.RuntimeException: Could not find the OffLine WLST class " while building the O2A 2.1.0 PIP

    Getting the error " [java] Problem invoking WLST - java.lang.RuntimeException: Could not find the OffLine WLST class " while building the O2A 2.1.0 PIP. I am using the Design Studio 4.3.2 for building the O2A 2.1.0 PIP. Please let me know how to resolve this issue. Here I am enclosing the log file .

    We have basically the same issue when we try to create the interpreter using the embedded method..
    I was able to use the interpreter embedded in a java client as long as the weblogic jars were located in a weblogic install if I tried to use them from a maven repository no luck at all...
    All of this worked easily in 9.2 now in 10.3 it seems more error prone and less documented.
    I have seen close to a 100 posts on issues related to this so is there a document which outlines specifics....
    We / I have used weblogic now for almost 10 years and moving from 8.1 to 9.2 was painful and we expected the move from 9.2 to 10.3 not to be soo bad but its proving to be as painful if not more painful than moving to 9.2. We seem to spend a good bit of our time working around issues in the next new release that were not in the previous one..
    Any help would be appreciated I think we will open a support case but even that is more painful...
    Any help would be greatly appreciated..
    PS: We confirmed that all jars in the startweblogic classpath were in the startup. The server we have the embedded wlst instance is a managed server and we are using the component in a war... Are there any restrictions which we are unaware of.
    Error we get is
    1 [ERROR] com.tfn.autex.order.weblogic.QueueMaintenanceUtility.addQueue():217 Error Adding Queue wowsers JNDI Name wowsers Exception: Invocation Target exception while getting the WLSTOffLineScript path

  • How can i run java application at system startup just liks as services

    How we can run java application at the time of system
    starts up just like as services.

    Hi,
    At first you have to create an exe of the class file.
    for that go to the site www.duckware.com/java2exe.html
    Click on the j2exe23c.exe(75k) download it and install in ur system. convert the class file to windows exe.
    The put the exe in the startup folder in windows.
    If ur not able to find that folder search for it and put that exe in that folder.

  • Does anyone know how I can retrieve this.  Somehow my cat moved ITunes to the middle of the desktop and I now get this message and cannot open it. You can't open the application iPhoto because it may be damaged or incomplete.

    Does anyone know how I can solve this.  My cat managed to move iphoto tab to the middle of the screen and now I cannot open it and get this message.
    You cannot open the application iphoto because it may be damaged or incomplete
    Any help appreciated

    You need a more technically saavy cat, for a start.
    To re-install iPhoto
    1. Put the iPhoto.app in the trash (Drag it from your Applications Folder to the trash)
    2a: On 10.5:  Go to HD/Library/Receipts and remove any pkg file there with iPhoto in the name.
    2b: On 10.6: Those receipts may be found as follows:  In the Finder use the Go menu and select Go To Folder. In the resulting window type
    /var/db/receipts/
    2c: on 10.7 or later they're at
    /private/var/db/receipts
    A Finder Window will open at that location and you can remove the iPhoto pkg files.
    3. Re-install.
    If you purchased an iLife Disk, then iPhoto is on it.
    If iPhoto was installed on your Mac when you go it then it’s on the System Restore disks that came with your Mac. Insert the first one and opt to ‘Install Bundled Applications Only.
    If you purchased it on the App Store or have a Recent Mac you can find it in your Purchases List.

  • When trying to launch a Java preferences get this message:  Cannot launch Java application A static initializer of the main class threw an exception: java.lang.NullPointerException"

    I have an IMac 10.5.8 and I am having problems with Java. I have tried todownload Java for Mac OS X 10.5 Update 4 and it looks as if it is doingsuccessfully, but I cannot see where it has put it and get this message when trying to launch Java preferences:
    Cannotlaunch Java application
    A static initializer of the main class threw an exception:java.lang.NullPointerException"
    Couldyou please help?

    Hmm, only way I know would be a relatively painless Archive & Install, which gives you a new/old OS, but can preserve all your files, pics, music, settings, etc., as long as you have plenty of free disk space and no Disk corruption, and is relatively quick & painless...
    http://docs.info.apple.com/article.html?artnum=107120
    Just be sure to select Preserve Users & Settings.

  • How do i completly center my swf in the middle of the page?

    ok i made a flash, but it wont center to the middle of my page it centers horizontally on the top, but it wont vertically center to the middle of the page... what am i doing wrong? (please post a html fix for this problem with maybe a explaintaion with what i did wrong... sorry drunk)
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>intro2</title>
    </head>
    <body bgcolor="#000000">
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <!--
    100%
    100%
    100%
    100%
    100%
    100%
    100%
    100%
    100%
    100%
    100%
    100%
    100%
    100%
    100%
    -->
    <!-- saved from url=(0013)about:internet -->
    <p align="center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="500" height="281" id="intro2" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="movie" value="intro2.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="intro2.swf" quality="high" bgcolor="#000000" width="500" height="281" name="intro2" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>
    </p>
    </body>
    </html>

    Read through this: http://www.ddg-designs.com/howTo/FlashInAWindow/controllingSize.html It will explain how you can control the positioning of the .swf inside the browser window.

  • HT5055 Just updated to lion and my cctv access has stopped functioning all I get is a white screen in the middle of the control panel where the camera shots should be.  I think it is caused by JAVA but am confused as when i view on snow leopard it works 

    Just updated to lion and my cctv access has stopped functioning all I get is a white screen in the middle of the control panel where the camera shots should be.  I think it is caused by JAVA but am confused as when i view on snow leopard it works  can you help

    Open "Java Preferences" either from spotlight or your utilities folder...it's probably going to say you need to install a java runtime. Then just click install!

  • How do I reposition image scroller bar from middle to the right

    I am customising an image thumb scroller. and trying to follow up previously developed code.
    All worked fine until the last moment when thumbnails bar is positioned as if its starting point is in the middle of the screen. I suppose it was developed for the flash screen layout with centered coordinates. My stage probably has them set to the upper left corner.
    I can not make the bar move.
    My stage size is 1024 x 768
    Where do I do my math in the code so the thumbnails will be located in the middle of the screen rather than in its right hand.
    Here are the code snippets responsible for the thumbnails build up:
      const _THUMB_WIDTH:Number = 50;
      const _THUMB_HEIGHT:Number = 64;
      const _IMAGE_WIDTH:Number = 860;//550;original #
      const _IMAGE_HEIGHT:Number = 500;//355;original #
      const _THUMB_GAP:Number = 2;
      const _SCROLL_SPEED:Number = 12;
      const _SCROLL_AREA:Number = 150;
    var _progressBar:MovieClip;
    var _arrowLeft:MovieClip;
    var _arrowRight:MovieClip;
    var _slides:Array;
    var _curSlide:Slide; //Slide that is currently displaying
    var _loadingSlide:Slide; //only used when a Slide is supposed to show but hasn't been fully loaded yet (like if the user clicks "next" many times before all the images have loaded). We keep track of the one that's in the process of loading and should be shown as soon as it finishes, then we set _loadingSlide back to null.
    var _imagesContainer:Sprite; //the Sprite into which the full-size images are placed (this helps manage the stacking order so that the images can always be behind everything else and yet we can addChild() each image so that it shows up on top of the previous one)
    var _thumbnailsContainer:Sprite; //the Sprite into which the thumbnail images are placed. This also allows us to slide them all at the same time.
    var _destScrollX:Number = 0; //destination x value for the _thumbnailsContainer which is used for scrolling it across the bottom. We don't want to use _thumbnailsContainer.x because it could be in the process of tweening, so we keep track of the end/destination value and add/subtract from it when creating our tweens.
    var _minScrollX:Number; //we know the maximum x value for _thumbnailsContainer is 0, but the mimimum value will depend on how many thumbnail images it contains (the total width). We calculate it in the _setupThumbnails() method and store it here for easier/faster scrolling calculations in the _enterFrameHandler()
    _thumbnailsContainer = new Sprite();
    addChild(_thumbnailsContainer);
    //_thumbnailsContainer.x = -550;//moves x position of thumbnails, instead done in line 273 thumbnail.x = curX - 590;
    _thumbnailsContainer.y = _IMAGE_HEIGHT;//moves y position of thumbnails
    _thumbnailsContainer.alpha = 0; //we want alpha 0 initially because we'll fade it in later when the thumbnails load.
    _thumbnailsContainer.visible = false; //ensures nothing is clickable.
    var xmlLoader:XMLLoader = new XMLLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/data.xml", {onComplete:_xmlCompleteHandler});
    xmlLoader.load();
    function _xmlCompleteHandler(event:LoaderEvent):void {
    _slides = [];
    var xml:XML = event.target.content; //the XMLLoader's "content" is the XML that was loaded.
    var imageList:XMLList = xml.image; //In the XML, we have <image /> nodes with all the info we need.
    //loop through each <image /> node and create a Slide object for each.
    for each (var image:XML in imageList) {
    _slides.push( new Slide(image.@name,
    image.@description,
    new ImageLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/thumbnails/appThmb_imgs/" + image.@name + ".jpg",
    name:image.@name + "Thumb",
    width:_THUMB_WIDTH,
    height:_THUMB_HEIGHT,
    //centerRegistration:true,
    //x:260, y:320,//doesn't work here but works in line 69
    scaleMode:"proportionalInside",
    bgColor:0x000000,
    estimatedBytes:13000,
    onFail:_imageFailHandler}),
    //loops through all the thumbnail images and places them in the proper order across the bottom of the screen and adds CLICK_THUMBNAIL listeners.
    function _setupThumbnails():void {
    var l:int = _slides.length;
    var curX:Number = _THUMB_GAP;
    for (var i:int = 0; i < l; i++) {
    var thumbnail:Sprite = _slides[i].thumbnail;
    _thumbnailsContainer.addChild(thumbnail);
    TweenLite.to(thumbnail, 0, {colorTransform:{brightness:0.5}});
    _slides[i].addEventListener(Slide.CLICK_THUMBNAIL, _clickThumbnailHandler, false, 0, true);
    thumbnail.x = curX;
    thumbnail.y = -234;//defines y position of the thumbnails row
    curX += _THUMB_WIDTH + _THUMB_GAP;
    _minScrollX = _IMAGE_WIDTH - curX;
    if (_minScrollX > 0) {
    _minScrollX = 0;
    function _enterFrameHandler(event:Event):void {
    if (_thumbnailsContainer.hitTestPoint(this.stage.mouseX, this.stage.mouseY, false)) {
    if (this.mouseX < _SCROLL_AREA) {
    _destScrollX += ((_SCROLL_AREA - this.mouseX) / _SCROLL_AREA) * _SCROLL_SPEED;
    if (_destScrollX > 0) {  //this number is 1/2 the stage size, previously was at 0 it defines the left position of the thumbnails scroll end, has to be indentical to the number below
    _destScrollX = 0;    //this number is 1/2 the stage size, previously was at 0 it defines the left position of the thumbnails scroll end, has to be indentical to the number above
    TweenLite.to(_thumbnailsContainer, 0.5, {x:_destScrollX});
    } else if (this.mouseX > _IMAGE_WIDTH - _SCROLL_AREA) {
    _destScrollX -= ((this.mouseX - (_IMAGE_WIDTH - _SCROLL_AREA)) / _SCROLL_AREA) * _SCROLL_SPEED;
    if (_destScrollX < _minScrollX) {
    _destScrollX = _minScrollX;
    TweenLite.to(_thumbnailsContainer, 0.5, {x:_destScrollX});

    Hi, thanks for taking a look at my problem.
    I assume that the code was difficult to read due to an unusual line brakes, which somehow I got when pasting on this site.
    Please take a look I am pasting the code anew in it entirety:
    (please let me know if you would like me to separate the areas which I believe give me troubles to address my previously describe problem:
    All worked fine until the last moment when thumbnails bar is positioned as if its starting point is in the middle of the screen. I suppose it was developed for the flash screen layout with centered coordinates. My stage probably has them set to the upper left corner.
    I can not make the bar move.
    My stage size is 1024 x 768
    Where do I do my math in the code so the thumbnails will be located in the middle of the screen rather than in its right hand.)
    (Also wanted to mention that there an external file Slide.as which is not responsible for the construction and positioning of the thumbnails)
              import com.greensock.*;
              import com.greensock.loading.*;
              //import com.greensock.events.LoaderEvent;
              import com.greensock.loading.display.*;
              //import com.greensock.TweenLite;
              import com.greensock.events.LoaderEvent;
              //import com.greensock.loading.ImageLoader;
              //import com.greensock.loading.SWFLoader;
              //import com.greensock.loading.LoaderMax;
              //import com.greensock.loading.XMLLoader;
              import com.greensock.plugins.AutoAlphaPlugin;
              import com.greensock.plugins.ColorTransformPlugin;
              import com.greensock.plugins.GlowFilterPlugin;
              import com.greensock.plugins.BlurFilterPlugin;//i added this filter to blur the progressBar
              import com.greensock.plugins.TweenPlugin;
              import flash.display.MovieClip;
              import flash.display.Sprite;
              import flash.events.Event;
              import flash.events.MouseEvent;
              //public class SlideshowExample extends MovieClip {
                          const _THUMB_WIDTH:Number = 50;
                          const _THUMB_HEIGHT:Number = 64;
                          const _IMAGE_WIDTH:Number = 860;//550;original #
                          const _IMAGE_HEIGHT:Number = 500;//355;original #
                          const _THUMB_GAP:Number = 2;
                          const _SCROLL_SPEED:Number = 12;
                          const _SCROLL_AREA:Number = 150;
                         var _progressBar:MovieClip;
                         var _arrowLeft:MovieClip;
                         var _arrowRight:MovieClip;
                         var _slides:Array;
                         var _curSlide:Slide; //Slide that is currently displaying
                         var _loadingSlide:Slide; //only used when a Slide is supposed to show but hasn't been fully loaded yet (like if the user clicks "next" many times before all the images have loaded). We keep track of the one that's in the process of loading and should be shown as soon as it finishes, then we set _loadingSlide back to null.
                         var _imagesContainer:Sprite; //the Sprite into which the full-size images are placed (this helps manage the stacking order so that the images can always be behind everything else and yet we can addChild() each image so that it shows up on top of the previous one)
                         var _thumbnailsContainer:Sprite; //the Sprite into which the thumbnail images are placed. This also allows us to slide them all at the same time.
                         var _destScrollX:Number = 0; //destination x value for the _thumbnailsContainer which is used for scrolling it across the bottom. We don't want to use _thumbnailsContainer.x because it could be in the process of tweening, so we keep track of the end/destination value and add/subtract from it when creating our tweens.
                         var _minScrollX:Number; //we know the maximum x value for _thumbnailsContainer is 0, but the mimimum value will depend on how many thumbnail images it contains (the total width). We calculate it in the _setupThumbnails() method and store it here for easier/faster scrolling calculations in the _enterFrameHandler()
                         //function SlideshowExample() {
                                  //super();
                                  //activate the plugins that we'll be using so that TweenLite can tween special properties like filters, colorTransform, and do autoAlpha fades.
                                  TweenPlugin.activate([AutoAlphaPlugin, ColorTransformPlugin, GlowFilterPlugin, BlurFilterPlugin]);//i added BlurFilterPlugin at the end
                                  _progressBar = this.getChildByName("progress_mc") as MovieClip;
                                  _arrowLeft = this.getChildByName("arrowLeft_mc") as MovieClip;
                                  _arrowRight = this.getChildByName("arrowRight_mc") as MovieClip;
                                  //////////my additions to make progress bay blurry
                                  TweenLite.to(progress_mc.progressBar_mc.gradientbar_appLoader_mcPopUp_mc, 0, {blurFilter:{blurX:21, blurY:8}});//i added this line to make ProgressBar_mc to blur
                                  TweenLite.to(progress_mc.rectangleGray, 0, {blurFilter:{blurX:21, blurY:8}});//i added this line to make ProgressBar_mc to blur
                                  _arrowLeft.visible = _arrowRight.visible = false;
                                  _imagesContainer = new Sprite();
                                  this.addChildAt(_imagesContainer, 0);
                                  _thumbnailsContainer = new Sprite();
                                  addChild(_thumbnailsContainer);
                                  //_thumbnailsContainer.x = -550;//moves x position of thumbnails, instead done in line 273 thumbnail.x = curX - 590;
                                  _thumbnailsContainer.y = _IMAGE_HEIGHT;//moves y position of thumbnails
                                  _thumbnailsContainer.alpha = 0; //we want alpha 0 initially because we'll fade it in later when the thumbnails load.
                                  _thumbnailsContainer.visible = false; //ensures nothing is clickable.
                                  var xmlLoader:XMLLoader = new XMLLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/data.xml", {onComplete:_xmlCompleteHandler});
                                  xmlLoader.load();
                         function _xmlCompleteHandler(event:LoaderEvent):void {
                                  _slides = [];
                                  var xml:XML = event.target.content; //the XMLLoader's "content" is the XML that was loaded.
                                  var imageList:XMLList = xml.image; //In the XML, we have <image /> nodes with all the info we need.
                                  //loop through each <image /> node and create a Slide object for each.
                                  for each (var image:XML in imageList) {
                                            _slides.push( new Slide(image.@name,
                                                                                                        image.@description,
                                                                                                        new ImageLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/thumbnails/appThmb_imgs/" + image.@name + ".jpg",
                                                                                                                                                          name:image.@na me + "Thumb",
                                                                                                                                                          width:_THUMB_W IDTH,
                                                                                                                                                          height:_THUMB_ HEIGHT,
                                                                                                                                                          //centerRegist ration:true,
                                                                                                                                                          //x:260, y:320,//doesn't work here but works in line 69
                                                                                                                                                          scaleMode:"pro portionalInside",
                                                                                                                                                          bgColor:0x0000 00,
                                                                                                                                                          estimatedBytes :13000,
                                                                                                                                                          onFail:_imageF ailHandler}),
                                                                                                        new SWFLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/images/" + image.@name + ".swf",
                                                                                                                                                  name:image.@name + "Image",
                                                                                                                                                  width:_IMAGE_WIDTH,
                                                                                                                                                  height:_IMAGE_HEIGHT,
                                                                                                                                                  //centerRegistration:true,
                                                                                                                                                  x:-420, y:-260,
                                                                                                                                                  scaleMode:"proportionalInside",
                                                                                                                                                  bgColor:0x000000,
                                                                                                                                                  estimatedBytes:820000,
                                                                                                                                                  onFail:_imageFailHandler})
                                  //now create a LoaderMax queue and populate it with all the thumbnail ImageLoaders as well as the very first full-size ImageLoader. We don't want to show anything until the thumbnails are done loading as well as the first full-size one. After that, we'll create another LoaderMax queue containing the rest of the full-size images that will load silently in the background.
                                  var initialLoadQueue:LoaderMax = new LoaderMax({onComplete:_initialLoadComplete, onProgress:_progressHandler});
                                  for (var i:int = 0; i < _slides.length; i++) {
                                            initialLoadQueue.append( _slides[i].thumbnailLoader );
                                  initialLoadQueue.append(_slides[0].imageLoader); //make sure the very first full-sized image is loaded initially too.
                                  initialLoadQueue.load();
                                  _setupThumbnails();
                         function _initialLoadComplete(event:LoaderEvent):void {
                                  //now that the initial load is complete, fade out the progressBar. autoAlpha will automatically set visible to false once alpha hits 0.
                                  TweenLite.to(_progressBar, 0.5, {autoAlpha:0});
                                  //fade in the thumbnails container
                                  TweenLite.to(_thumbnailsContainer, 1, {autoAlpha:1});
                                  _setupArrows();
                                  //setup the ENTER_FRAME listeners that controls the thumbnail scrolling behavior at the bottom
                                  this.stage.addEventListener(Event.ENTER_FRAME, _enterFrameHandler, false, 0, true);
                                  //now put all the remaining images into a LoaderMax queue that will load them one-at-a-time in the background in the proper order. This can greatly improve the user's experience compared to loading them on demand which forces the user to wait while the next image loads.
                                  var imagesQueue:LoaderMax = new LoaderMax({maxConnections:1});
                                  for (var i:int = 1; i < _slides.length; i++) {
                                            imagesQueue.append( _slides[i].imageLoader );
                                  imagesQueue.load();
                                  //now start the slideshow
                                  _showNext(null);
                        //loops through all the thumbnail images and places them in the proper order across the bottom of the screen and adds CLICK_THUMBNAIL listeners.
                         function _setupThumbnails():void {
                                  var l:int = _slides.length;
                                  var curX:Number = _THUMB_GAP;
                                  for (var i:int = 0; i < l; i++) {
                                            var thumbnail:Sprite = _slides[i].thumbnail;
                                            _thumbnailsContainer.addChild(thumbnail);
                                            TweenLite.to(thumbnail, 0, {colorTransform:{brightness:0.5}});
                                            _slides[i].addEventListener(Slide.CLICK_THUMBNAIL, _clickThumbnailHandler, false, 0, true);
                                            thumbnail.x = curX;
                                            thumbnail.y = -234;//defines y position of the thumbnails row
                                            curX += _THUMB_WIDTH + _THUMB_GAP;
                                  _minScrollX = _IMAGE_WIDTH - curX;
                                  if (_minScrollX > 0) {
                                            _minScrollX = 0;
                         function _setupArrows():void {
                                  _arrowLeft.alpha = _arrowRight.alpha = 0;
                                  _arrowLeft.visible = _arrowRight.visible = true;
                                  _arrowLeft.addEventListener(MouseEvent.ROLL_OVER, _rollOverArrowHandler, false, 0, true);
                                  _arrowLeft.addEventListener(MouseEvent.ROLL_OUT, _rollOutArrowHandler, false, 0, true);
                                  _arrowLeft.addEventListener(MouseEvent.CLICK, _showPrevious, false, 0, true);
                                  _arrowRight.addEventListener(MouseEvent.ROLL_OVER, _rollOverArrowHandler, false, 0, true);
                                  _arrowRight.addEventListener(MouseEvent.ROLL_OUT, _rollOutArrowHandler, false, 0, true);
                                  _arrowRight.addEventListener(MouseEvent.CLICK, _showNext, false, 0, true);
                         function _showNext(event:Event=null):void {
                                  //if there's a _loadingSlide we should assume that the next Slide would be AFTER that one. Otherwise just get the one after the _curSlide.
                                  var next:int = (_loadingSlide != null) ? _slides.indexOf(_loadingSlide) + 1 : _slides.indexOf(_curSlide) + 1;
                                  if (next >= _slides.length) {
                                            next = 0;
                                  _requestSlide(_slides[next]);
                         function _showPrevious(event:Event=null):void {
                                  //if there's a _loadingSlide we should assume that the previous Slide would be BEFORE that one. Otherwise just get the one before the _curSlide.
                                  var prev:int = (_loadingSlide != null) ? _slides.indexOf(_loadingSlide) - 1 : _slides.indexOf(_curSlide) - 1;
                                  if (prev < 0) {
                                            prev = _slides.length - 1;
                                  _requestSlide(_slides[prev]);
                         function _requestSlide(slide:Slide):void {
                                  if (slide == _curSlide) {
                                            return;
                                  //kill the delayed calls to _showNext so that we start over again with a 5-second wait time.
                                  TweenLite.killTweensOf(_showNext);
                                  if (_loadingSlide != null) {
                                            _cancelPrioritizedSlide(); //the user must have skipped to another Slide and didn't want to wait for the one that was loading.
                                  //if the requested Slide's full-sized image hasn't loaded yet, we need to show the progress bar and wait for it to load.
                                  if (slide.imageLoader.progress != 1) {
                                            _prioritizeSlide(slide);
                                            return;
                                  //fade the old Slide and make sure it's not highlighted anymore as the current Slide.
                                  if (_curSlide != null) {
                                            TweenLite.to(_curSlide.image, 0.5, {autoAlpha:0});
                                            _curSlide.setShowingStatus(false);
                                  _curSlide = slide;
                                  _imagesContainer.addChild(_curSlide.image); //ensures the image is at the top of the stacking order inside the _imagesContainer
                                  TweenLite.to(_curSlide.image, 0.5, {autoAlpha:1}); //fade the image in and make sure visible is true.
                                  _curSlide.setShowingStatus(true); //adds an outline to the image indicating that it's the currently showing Slide.
                                  TweenLite.delayedCall(5, _showNext); //create a delayedCall that will call _showNext in 5 seconds.
                         function _prioritizeSlide(slide:Slide):void {
                                  TweenLite.to(_progressBar, 0.5, {autoAlpha:1}); //show the progress bar
                                  _loadingSlide = slide;
                                  _loadingSlide.imageLoader.addEventListener(LoaderEvent.PROGRESS, _progressHandler);
                                  _loadingSlide.imageLoader.addEventListener(LoaderEvent.COMPLETE, _completePrioritizedHandler);
                                  _loadingSlide.imageLoader.prioritize(true); //when the loader is prioritized, it will jump to the top of any LoaderMax queues that it belongs to, so if another loader is in the process of loading in that queue, it will be canceled and this new one will take over which maximizes bandwidth utilization. Once the _loadingSlide is done loading, the LoaderMax queue(s) will continue loading the rest of their images normally.
                         function _cancelPrioritizedSlide():void {
                                  TweenLite.to(_progressBar, 0.5, {autoAlpha:0}); //hide the progress bar
                                  _loadingSlide.imageLoader.removeEventListener(LoaderEvent.PROGRESS, _progressHandler);
                                  _loadingSlide.imageLoader.removeEventListener(LoaderEvent.COMPLETE, _completePrioritizedHandler);
                                  _loadingSlide = null;
                         function _completePrioritizedHandler(event:LoaderEvent):void {
                                  var next:Slide = _loadingSlide; //store it in a local variable first because _cancelPrioritizedSlide() will set _loadingSlide to null.
                                  _cancelPrioritizedSlide();
                                  _requestSlide(next);
                         function _progressHandler(event:LoaderEvent):void {
                                  _progressBar.progressBar_mc.scaleX = event.target.progress;
                         function _clickThumbnailHandler(event:Event):void {
                                  _requestSlide(event.target as Slide);
                         function _rollOverArrowHandler(event:Event):void {
                                  TweenLite.to(event.currentTarget, 0.5, {alpha:1});
                         function _rollOutArrowHandler(event:Event):void {
                                  TweenLite.to(event.currentTarget, 0.5, {alpha:0});
                         function _enterFrameHandler(event:Event):void {
                                  if (_thumbnailsContainer.hitTestPoint(this.stage.mouseX, this.stage.mouseY, false)) {
                                            if (this.mouseX < _SCROLL_AREA) {
                                                      _destScrollX += ((_SCROLL_AREA - this.mouseX) / _SCROLL_AREA) * _SCROLL_SPEED;
                                                      if (_destScrollX > 0) {  //this number is 1/2 the stage size, previously was at 0 it defines the left position of the thumbnails scroll end, has to be indentical to the number below
                                                                _destScrollX = 0;    //this number is 1/2 the stage size, previously was at 0 it defines the left position of the thumbnails scroll end, has to be indentical to the number above
                                                      TweenLite.to(_thumbnailsContainer, 0.5, {x:_destScrollX});
                                            } else if (this.mouseX > _IMAGE_WIDTH - _SCROLL_AREA) {
                                                      _destScrollX -= ((this.mouseX - (_IMAGE_WIDTH - _SCROLL_AREA)) / _SCROLL_AREA) * _SCROLL_SPEED;
                                                      if (_destScrollX < _minScrollX) {
                                                                _destScrollX = _minScrollX;
                                                      TweenLite.to(_thumbnailsContainer, 0.5, {x:_destScrollX});
                        //if an image fails to load properly, remove it from the slideshow completely including its thumbnail at the bottom.
                         function _imageFailHandler(event:LoaderEvent):void {
                                  var slide:Slide;
                                  var i:int = _slides.length;
                                  while (--i > -1) {
                                            slide = _slides[i];
                                            if (event.target == slide.thumbnailLoader || event.target == slide.imageLoader) {
                                                      slide.dispose();
                                                      _slides.splice(i, 1);
                                                      _setupThumbnails();
                                                      return;

  • How can I set a passcode that is only required at certain times of the day. Ie: my child needs access for school use, but don't want her playing iPad in the middle of the night. I cannot identify a way to have the iPad turn off or require a password

    I cannot find a way to enable my child's iPad to require a passcode only at certain times of the day.
    Yes I have used the clock/timer/ countdown - great to restrict how many minutes of iPad usage they get a day.
    But as my child requires the iPad in school for class lessons the usage at school varies maybe 30 mins 1 day and a few hrs on other days
    I want the ability to say set the iPad to not work between say 7pm and 7am, ( unless a passcode is entered) so my child isn't playing games on it in the middle of the night...
    Apple I cannot see anything in the settings that performs this function
    Help

    You can Remote Lock his iPad with Find My iPad using a computer at whatever time you like.
    http://support.apple.com/kb/PH2700
    Note: The iPad may be disabled if he tries the passcode too many times.

  • Can anyone tell me how to fix my iPod. I was updating it and I turned it off in the middle of the update. I tried to put it through a recovery on the iTunes but it keeps giving me 3194.When I turn it on it will go to a light blue screen.

    Can anyone tell me how to fix my iPod.I was updating it and I turned it off in the middle of the update. I tried to put it through a recovery on the iTunes but it keeps giving me 3194.When I turn it on it will go to a light blue screen.

    See the action for that error included here:
    iTunes: Specific update-and-restore error messages and advanced troubleshooting

Maybe you are looking for

  • Long delay when trying to save print as PDF

    For some reason, there is a long delay, usually up to five minutes, before the system will allow me to save a print as a PDF. I ran disk utility and no issues arose. Anyone know why this is happening?

  • Photosmart 7350

    HP Photosmart 7350 will not print color with my new MAC OSX 10.9.4. Tried loading printer driver but get the message that Power PC applications no longer supported. Does this mean I need to get a new printer to work with my MAC. 

  • Dreamweaver wont open any files in Mac OS 10.6.3

    I just reinstalled CS4 on my Mac becasue every time I try to open any file, the window panels all blink (refresh) and then nothing happens. The reinstall did not help...nothing has helped. Even when I go to the "Info" panel for any file and try to do

  • Download of PDFs Not Working Correctly

    Ever since installing Mavericks and the new version of Mail a couple weeks ago, PDFs fill a page in Safari with gobbledygook. Everytime this happens, I try the old trick of holding down the Option key as I start the download. This works maybe 20% of

  • Acrobat Pro XI says update reqd while CC install says all OK?

    Should I ignore the update requests outside of CC or ?