Loading multiple applets

Dear users,
I am using Gemplus Cards. I am trying to
load multiple applets with same package ID but
not able to load. Please can any body
let me know a set of clean steps or any source of Information
Docs/Tutorials etc..
Thanks
Aslam

hi!
I was facing the same problem as you and had it fixed recently. You must change the code from your cardconvert batch file accordingly.
Keeping in mind the command for the creation of a jca file should remain like this -->
converter <options> package_name package_aid major_version.minor_version
So we just change the <options> code to accomodate the additional applets. All else remains unchanged. Hope it helps =)

Similar Messages

  • Loading multiple applets synchronously

    Greetings,
    I am looking for a workaround for bug 6258268:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6258268
    we have user-defined web-pages, that contains more than one applet. To align them easily, we put these applets into a html-table (I know, that is not good html, but it's easy). This results in an asynchronous load of the applets, which means, that all applets are loaded at the same time and under some circumstances this behaviour results in the above mentioned bug (ClassCastException in new JTextArea()).
    Does anyone know a better way to easily align applets in rows an columns and load them one after the other to prevent this bug? To avoid a software-update I would like to replace the html-table rather than changing the java-code. I tried to use <div>s and stylesheets, but I could not align the applets in a row
    Cheers,
    Michael

    Add some JavaScript to the webpage that controls the applet load, maybe introducing a small delay after the first load?

  • Loading an Applet Multiple Times

    I'm using the JNLPAppletLauncher to load an applet that is used in several web pages across my site. Whenever I load the applet, the jnlp extension for the url of the JNLP file changes to something slightly different due to authorization logic. The first page that loads the applet functions correctly, and the applet itself functions exactly as it should. However, if I navigate to any other page that has the applet, the load fails with the following error:
    java.lang.IllegalArgumentException: jnlpExtension parameters do not match previously loaded appletSeeing as how the url of the jnlp file is the only extension I'm specifying, is there any way to make the AppletLauncher not flip out whenever it encounters a url that isn't exactly the same as the last one used? In other words, can I specify to the AppletLauncher not to store that information?
    Any help is greatly appreciated.

    Why does authentication change your url? I guess you're sending the session id to the client and it's sending it back in the query string (you're not behind basic auth).
    If it's not and it's because of some other weird thing, an application proxy may work.
    Point to an unprotected servlet and in this servlet:
    - check for user auth (it's still there if user has authenticated),
    - open an HttpURLConnection to the actual jnlp (where you should set the dummy servlet in the href)
    - read it and send it back (headers included) to the client
    No quick idea otherwise.
    Bye.

  • Loading multiple-package applet from JAR

    Hi, apologies in advance if this has been dealt with in this forum already. I've got two questions:
    Question one: I have written two packages, evolve and fences. I would like to run fences.Fences.class which is an applet. I went to my classpath directory and typed
    jar cf mystuff.jar evolve fences
    (each package lives in its own directory off the classpath.)
    then made a web page that said
    <html><body>
    <applet code=fences.Fences.class archive=mystuff.jar>
    </applet>
    </body></html>
    I then piped the HTML file and mystuff.jar up to a remote server to make sure I wasn't reading my local fences package, made them world readable, and tried to load the web page. On my local machine, a Linux box running Galeon 1.2.5 (Mozilla, basically), I could load the applet. On a separate box running IE 5 I got the error in the status bar "load: class fences.Fences not found" . I'm not sure how to open the Java console in IE so I can't give any more info than that.
    I suspect that perhaps my local box is still somehow using my local classes or an old copy of the applet and is not loading from the archive, but I can't be sure.
    Question two: Until stumbling upon the answer in this forum, I wasn't sure how to run an applet that used more than one user-created package. I see that I can package both into one archive; but I thought that I could also have separate .jar files for each package and then specify both in the "archive=" <applet> parameter. It didn't seem to work. Anybody know if there's a way to do this?
    Thanks in advance for any help!

    yes, i've seen that since i originally posted, tried it - didn't work. I've since tried another even simpler test, to try to isolate the problem. I wrote this code in a file called Tester.java:
    import javax.swing.*;
    class Tester extends JApplet {
      public void init() {
        getContentPane().add(new JButton("Hi"));
    }I compiled this class and put it at http://www.cs.uga.edu/~gundlach/jartry/Tester.class . I then created a webpage in the jartry/ directly that says:
    <html><body>
    <applet code=Tester.class width=55 height=68></applet>
    </body></html>
    Then, using Mozilla to go to http://www.cs.uga.edu/~gundlach/jartry/test.html , I get the applet with the single button. When I open it in IE 5, it says "load class Tester not found" when I mouseover the applet.
    What the heck am I doing wrong?
    Thanks
    Michael

  • Loading an applet in tomcat 4.x

    Hi,
    I have been reading the forums for a while trying to find an explanation to the problem I am having with no success.
    The problem is that I have an applet that has a dynamic number of parameters. The number of parameters is determined by the contents of an application bean which is part of the environment.
    The problem is that I can't get the applet to work using the <applet> tag. It seems that no matter what I set the codebase parameter to, I always get the dreaded "ClassDefNotFound Exception: FacilityApplet" in IE 6.0 or "ClassFormatError: Bad Major Version Number" exception in Netscape 4.79.
    I am using JDK 1.4_0_01 and Tomcat 4.1.12 and my application (oam), context is organized as follows:
    webapps/
    oam
    WEB-INF
    classes
    lib
    applets
    facility
    jsp
    html
    index.html
    I have jarred the applet into a file called FacilityApplet.jar and stored it into the oam/applets/facility directory. The contents of the jar file follows:
    META-INF/
    META-INF/MANIFEST.MF
    FacilityApplet.class
    common/DataEvent.class
    common/Facility.class
    common/Link.class
    DialogBox/
    DialogBox/DialogBox$CloseDialog.class
    DialogBox/DialogBox$CloseWindow.class
    DialogBox/DialogBox.class
    The following is the contents of my jsp page that attempts to load the applet.
    <html>
    <head>
    <!-- Ensure the HTTP Server Does Not Save this Page in Cache -->
    <meta HTTP-EQUIV=Pragma CONTENT=no-cache >
    <title> Status Page </title>
    </head>
    <%@ page import="javaBeans.SettingsBean" %>
    <jsp:useBean id="settings" class="SettingsBean" scope="application" />
    <body BGCOLOR="honeydew" LINK="Blue" TEXT="black" VLINK="Red">
    <h1>
    Application Status
    </h1>
    <%
    // Make sure we have a good bean to work with
    if (settings.getTotalFacilities() != 0) {
    %>
    <applet
    archive="FacilityApplet.jar"
    codebase="http://localhost:8080/oam/applets/facility"
    code="FacilityApplet.class"
    width="300" height="150" >
    <param name="PORT" value="8939" >
    <%
    for (int i = 0;i < settings.getTotalFacilities();i++) {
    %>
    <param name="FAC_<%= i %>" value="<%= settings.getFacilityName(i) %>">
    <param name="STATE_<%= i %>"
    value="<%= settings.getFacility(i).getState() %>">
    <% } %>
    </applet>
    <% }
    else {
    %>
    <h2 align="center"> No Facilities to Display </h2>
    <% } %>
    </body>
    </html>
    Here are the values for codebase that I have tried so far:
    codebase="<%= request.getContextPath() %>/applets/facility"
    codebase="http:localhost:8080/oam/applets/facility"
    codebase="../applets/facility"
    I also expanded the jar file under the applets/facility directory with the same results. I also copied all the class files in the same directory as my jsp file, codebase="facility", with the same results.
    Now, if I use the <jsp:plugin> tag the applet loads with no problems using codebase="<%= request.getContextPath() %>/applets/facility", but that does not allow me to set my applet parameters dynamically. It works fine if I hardcode my parameters inside the <jsp:param> tag. However, I can explain this since it will require the JSP compiler to do multiple passes over the source code, and I don't think it does that.
    My PC has the latest version of the JRE plugin 1.4.X.
    Any help will be greatly appreciated.
    Maizo

    Folks,
    I hate to follow up my own posting but I figured out the problem. My browser was using its own JVM, which of course was an old one.
    Sorry to waste these resources
    Maizo

  • Reinitialization of static data by multiple applets

    Hi,
    I have a problem with initialization of shared static data by multiple applets. I have three applets running inside of different HTML frames in a multi-frame HTML framework. Applets are loaded as JAR files. In addition, every applet has one or two 3rd party JARs listed in the APPLET tag. Applets share the same codebase and run inside the same JVM.
    I use static data to perform the inter-applet communication. This is simply a static list of applet references that is being maintained in the base applet class (all applet classes are inherited from that class). The problem is that when applets get constructed, the static data in the base class sometimes gets reinitialized multiple times. As I understand, the static data should be initialized just once on initial load of the base applet class (applets have the same codebase).
    This problem seems to be caused by the race condition (applets initialize on different threads launched by the browser). Under some circumstances (I change the number and order of JARs, etc.) everything works fine. I can reproduce this problem on both Explorer 5.x and Netscape 4.7 (did not try others). I run applets using native browser's JVM.
    Has anybody had such problem before? Is it caused by the large number of JARs ? Is there any way to guarantee that static data will be initialized once in the multi-applet environment ?
    Thanks,
    hparfen

    Hi,
    Did you find something to solve your problem because I have exactly the same.
    Tony

  • Plugin reloading too slow of multiple applets per page

    Hi,
    I want to share a problem with this community and try to shed some light on this.
    We all know that an applet loads slow when the JVM loads for the first time or when an applets JAR gets loaded. Fine and not the problem here.
    However, applets load too slow when loaded again during the same browser session. Why is this important? Well, in an AJAX-like intranet application you may use multiple applets per page which are loaded again and again as you navigate. The applets could enrich the user experience much the way AJAX does -- if only the applets would not slow down loading of pages.
    For example: we have pages with about 10 applets which take about 4 seconds to reload, or 400 ms per applet. This is disappointingly slow because there is no technical excuse for this -- everything is up and running on the Java side and Flash prooves that loading ActiveX can be fast, too. Moreover, it became slower and slower from 1.1 to 1.5.
    Nobody at Sun or elsewhere seems to care about this. And therefore, the plugin has now became problematic in Ajax-like intranet scenarios.
    This is a pitty and we would very much welcome any kind of activity to improve this.
    Anybody knows why this is slow and what is planned to improve this?

    There is one known optimization (which may be useful for the readers of this topic):
    One may try to keep at least ONE applet with the given EXACT (IDENTICAL archive string) classpath active, e.g., in a frame. This keeps the classloader referenced all the time and avoids reconstruction of the class loader.
    However, we already apply this technique and the question is how to get reloading of applets with a ready classloader as fast as FLASH...

  • Loading Java Applet...  error

    Hi!
    When I try to run the Sun demo SwingSet2, IE(5.0) hangs.
    First I installed JRE 1.3.1(on advice of the demo site.)
    Then it all end up with the text "Loading Java Applet..."
    in the grey box.
    I have also tried to install different JRE versions but I just can't run a Sun demo applet (neither my own applets).
    I would be very happy if someone could solve this problem.
    /Jonas
    InternetExplorer: 5.00.3315.1000
    Windows 2000

    Hi:
    I just have a comment and one last suggestion.
    First, I am able to run the SwingSet2Plugin.html with both IE5.0 and IE5.5 on Windows 98SE. I am currently using JDK/JRE1.3.1. A few months ago, I upgraded to 1.3.1_02 and found that some of my applets stopped working for no apparent reason, so I went back to 1.3.1.
    If your applets stopped working because of an upgrade in JDK or JRE and you're using Windows, I suggest that you make sure that the previous version of the JDK/JRE were cleanly removed from the system. You can verify this by going to the Control Panel and click on Add/Remove Program to see if there are multiple versions of the software. Also, click start, run REGEDIT and look in the following folder for any remaining references to the JDK/JRE:
    HKEY_LOCAL_MACHINE-->Software-->Microsoft-->Code Store Database-->Distribution Units
    look for something with {...} or the prefix {CAFE...  and remove any remaing older versions (I know most people wouldn't touch regedit with a ten-foot pole but this may be the only way to solve the problem).
    I use a lot of applet and am particularly interested in cases where ppl have problems with using applet and find out how the problems are resolved.  If my suggestions worked or if you find out what caused the problem, I would appreciate your sharing the info.
    Good Luck!
    V.V.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How do I use edge commons composition loader to load multiple compositions with a next and back button?

    I am working on an interactive book and have set up each page as a separate composition in edge.
    I am using  the edge commons JS library to load multiple compositions into a main composition.
    You can see how this works here: Edge Commons - Extension Library for Edge Animate and Edge Reflow | EdgeDocks.com
    The way the edge commons tutorial is set up requires a button for each composition i want to load. I am interested in loading multiple compositions with a "next" and "back" button, and a "swipe left, "swipe right" gesture on the content symbol that each composition is loaded into. I also need the swipe features on the content symbol not to interfere with the interactive elements on the loaded composition.
    Please suggest a solution that will work without adding additional scripts beyond edge commons and jquery.

    Sort of. I'm using this code inside an action for a button symbol. But it doesn't work perfectly. Trying to debug it.
    Let me know if you have any luck.
    //Check to see if pageCounter already exists
    if (typeof EC.pageCounter === 'undefined') {
      // it doesn't exist so initialize it to first page
        EC.pageCounter = 2;
    //check if the page is only 1 digit -- patch for single digit
    if (EC.pageCounter < 9) {
       // it is, so we need to pad a 0 on the front.
      EC.pageCounterString = "0" + EC.pageCounter;
      //e.g.  01 ...09,11,12,13....115,222352,,....
    else {
      EC.pageCounterString = EC.pageCounter;
    EC.loadComposition(EC.pageCounterString + "/publish/web/" + EC.pageCounterString + ".html", sym.$("container"));
    EC.pageCounter = EC.pageCounter + 1;
    //TODO for back  -1

  • How to load multiple .wrl (VRML) files?

    Hi all,
    I need to load four components of a coffee table into the virtual universe, the four components are top, base, left leg and right leg. I use four parts not one whole single object because in this way when I change the size of this furniture, I can make the thickness of the edges fixed, which is a must. The four parts consist a table correctly in the design software TopSolid, but when I load the four .wrl ojbect files seperately in the application, they cannot compose a table correctly. I guess the reason is the four components have been resized and translated automatically in the VRML loader. I have reviewed the source code of the VRML loader and some related source code but not be able to find where the auto resize code is.
    I have used four Wavefront .obj files instead to do another technical demonstration, if I disable the ObjectFile.RESIZE flag, and just scale the four parts by myself using the same scale factor, I can get a perfect coffee table, with every part in correct location. But my supervisor insist on using VRML .wrl files in our project.
    I hope someone can give me some kind instructions or advises on how to do it in VRML97 loader (https://j3d-vrml97.dev.java.net/).
    Any help will be highly appreciated.

    Answered here : http://www.java.net/forum/topic/javadesktop/java-desktop-technologies/java-3d/trying-load-multiple-wrl-vrml-files-same

  • Unable to load multiple files to Essbase using MaxL and wildcards

    I have multiple data files to load:
    Files:
    Filename.txt
    Filename_1.txt
    Filename_2.txt
    According to the following link, Essbase is able to load multiple files to BSO databases via MaxL by using wildcards:
    http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/frameset.htm?launch.html
    However, when I try to run the following I receive the following error:
    MaxL:
    import database MyApp.DB data from server text data_file "../../MyApp/Filename*.txt" using server rules_file "L_MyRule" on error append to "\\Server\Folder\L_MyRule.err";
    Error:
    ERROR - 1003027 - Unable to open file [DB01/oracleEPM/user_projects/epmsystem2/EssbaseServer/essbaseserver1/app/MyApp/DB/../../Filename*.txt].
    ERROR - 1241101 - Unexpected Essbase error 1003027.
    I can run the following fine without any problem, but this only deals with the first of several files, and I’d rather not hard-code multiple files since the number might vary in the future:
    MaxL:
    import database MyApp.DB data from server text data_file "../../MyApp/Filename.txt" using server rules_file "L_MyRule" on error append to "\\Server\Folder\L_MyRule.err";
    Any ideas? And how about ASO databases?

    JamesD wrote:
    According to the following link, Essbase is able to load multiple files to BSO databases via MaxL by using wildcards:
    http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/frameset.htm?launch.html
    That is the tech ref for 11.1.2.2, are you on 11.1.2.2?
    Import Data
    11.1.2.2 - http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/frameset.htm?maxl_imp_data.html
    11.1.2.1 - http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref_1112100/frameset.htm?maxl_imp_data.html
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Problem in Loading Multiple image in Single Sprite/MovieClip

    Hi All,
    I am having a killing problem in loading multiple images in single movie clip/sprite using a separate class.
    Here is the ImageLoader.as class
    package com.project.utils{
        import com.project.*;
        import com.project.utils.*;
        import flash.events.EventDispatcher;
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.events.ProgressEvent;
        import flash.display.Loader;
        import flash.events.IOErrorEvent;
        import flash.net.URLLoader;
        import flash.events.MouseEvent;
        import flash.net.URLRequest;
        import flash.display.Bitmap;
        public class ImageLoader extends EventDispatcher {
            public var imgloader:Loader;
            public var imgMc:MovieClip;
            public var imgObject:Object;
            public var loaded:Number;
            public function ImageLoader():void {
                imgMc = new MovieClip();
                imgObject = new Object();
                imgloader = new Loader();
            public function loadImage(imgHolder:MovieClip, imgObj:Object):void {
                imgMc = new MovieClip();
                imgObject = new Object();
                imgloader = new Loader();
                imgMc = imgHolder;
                imgObject = imgObj;
                imgloader.contentLoaderInfo.addEventListener(Event.COMPLETE,onImgLoad);
                imgloader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,onImgLoadProgress);
                imgloader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,onImageLoadFailed);
                imgloader.load(new URLRequest(imgObj.FilePath));
            private function onImgLoad(Evt:Event):void {
                var image:Bitmap = Bitmap(Evt.target.content);
                try {
                    imgMc.removeChildAt(0);
                } catch (error:Error) {
                imgMc.addChild(image);
                try {
                    if (imgObject.URL != undefined) {
                        imgMc.buttonMode = true;
                        imgMc.removeEventListener(MouseEvent.CLICK, onImageClicked);
                        imgMc.addEventListener(MouseEvent.CLICK, onImageClicked);
                } catch (err:Error) {
                dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD"));
            private function onImageClicked(evt:MouseEvent):void {
                trace("Image Attrs:"+imgObject.URL +" Target "+imgObject.Target);
            private function onImgLoadProgress(Evt:ProgressEvent):void {
                if (Evt.bytesLoaded>0) {
                    loaded = Math.floor((Evt.bytesLoaded*100)/Evt.bytesTotal);
                    dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD_PROC",loaded));
            private function onImageLoadFailed(Evt:IOErrorEvent):void {
                trace("Image Loading Failed");
                dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD_FAIL"));
    Here I am loading some images using the above class in a for loop, like
                for (var i=0; i < 3; i++) {
                    //imgLoader=new ImageLoader;
                    imgLoader.addEventListener("CustomEvent.ON_IMGE_LOAD",onImageLoad);
                    var target:MovieClip=videolist_mc["list" + mcCount + "_mc"];
                    target.list_mc.visible=false;
                    var imgObj:Object=new Object;
                    imgObj.FilePath=list[i].Thumbnail;
                    imgObj.Url=list[i].Url;
                    imgObj.Target=list[i].Target;
                    target.list_mc.urlObj=new Object  ;
                    target.list_mc.urlObj=imgObj;
                    imgLoader.loadImage(target.list_mc.imgholder_mc,imgObj);
                    target.list_mc.lable_txt.htmlText="<b>" + list[i].Label + "</b>";
                    target.list_mc.imgholder_mc.buttonMode=true;
                    target.list_mc.imgholder_mc.addEventListener(MouseEvent.CLICK,onItemPressed);
                    mcCount++;
    In this case, the ImageLoader.as works only on the last movie clip from the for loop. For example, if i am trying to load three image in three movie clips namely img_mc1,img_mc2 and img_mc3 using the for loop and ImageLoader.as, I am getting the image loaded in the third movie clip only img_mc.
    See at the same time, If i uncomment onething in the for loop that is
    //imgLoader=new ImageLoader;         
    its working like a charm. But I know creating class objects in a for loop is not a good idea and also its causes some other problems in my application.
    So, help to get rid out of this problem.
    Thanks
    -Varun

    package com.project.utils{
        import com.project.*;
        import com.project.utils.*;
        import flash.events.EventDispatcher;
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.events.ProgressEvent;
        import flash.display.Loader;
        import flash.events.IOErrorEvent;
        import flash.net.URLLoader;
        import flash.events.MouseEvent;
        import flash.net.URLRequest;
        import flash.display.Bitmap;
        public class ImageLoader extends EventDispatcher {
            public var imgloader:Loader;
            public var imgMc:MovieClip;
            public var imgObject:Object;
            public var loaded:Number;
            public function ImageLoader():void {
    // better add you movieclip to the stage if you want to view anything added to it.
                imgMc = new MovieClip();
                imgObject = new Object();
                imgloader = new Loader();
            public function loadImage(filepath:String):void {
                imgloader.contentLoaderInfo.addEventListener(Event.COMPLETE,onImgLoad);
                imgloader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,onImgLoadPr ogress);
                imgloader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,onImageLoadF ailed);
                imgloader.load(new URLRequest(filepath));
            private function onImgLoad(Evt:Event):void {
                var image:Bitmap = Bitmap(Evt.target.content);
                try {
                    imgMc.removeChildAt(0);
                } catch (error:Error) {
                imgMc.addChild(image);
                try {
                    if (imgObject.URL != undefined) {
                        imgMc.buttonMode = true;
                        imgMc.removeEventListener(MouseEvent.CLICK, onImageClicked);
                        imgMc.addEventListener(MouseEvent.CLICK, onImageClicked);
                } catch (err:Error) {
                dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD"));
            private function onImageClicked(evt:MouseEvent):void {
                trace("Image Attrs:"+imgObject.URL +" Target "+imgObject.Target);
            private function onImgLoadProgress(Evt:ProgressEvent):void {
                if (Evt.bytesLoaded>0) {
                    loaded = Math.floor((Evt.bytesLoaded*100)/Evt.bytesTotal);
                    dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD_PROC",loaded));
            private function onImageLoadFailed(Evt:IOErrorEvent):void {
                trace("Image Loading Failed");
                dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD_FAIL"));
    Here I am loading some images using the above class in a for loop, like
                for (var i=0; i < 3; i++) {
                    var imgLoader:ImageLoader=new ImageLoader();
                    imgLoader.addEventListener("CustomEvent.ON_IMGE_LOAD",onImageLoad);
                    var target:MovieClip=videolist_mc["list" + mcCount + "_mc"];
                    target.list_mc.visible=false;
                    var imgObj:Object=new Object;
                    imgObj.FilePath=list[i].Thumbnail;
                    imgObj.Url=list[i].Url;
                    imgObj.Target=list[i].Target;
                    target.list_mc.urlObj=new Object  ;
                    target.list_mc.urlObj=imgObj;
                    imgLoader.loadImage(pass the image file's path/name);
                    target.list_mc.lable_txt.htmlText="<b>" + list[i].Label + "</b>";
                    target.list_mc.imgholder_mc.buttonMode=true;
                    target.list_mc.imgholder_mc.addEventListener(MouseEvent.CLICK,onItemPressed);
                    mcCount++;

  • How to load multiple HTML5 canvas on the same page (the proper method)

    Hi,
    I've been struggling to load multiple canvas animations on the same page. At the beggining I thought that exporting the movies with different namespaces and reloading the libraries in a sequential flow might work, but it doesn't. It always loads just the last animation loaded. More info here: Coding challenge: what am I doing wrong?
    Here is a sample of what I'm doing:
    1st: Publish two flash movies with custom namespaces for "lib" set in the "publish settings": "libFirst" and "libSecond".
    2nd: Edit the canvas tags in the HTML page. One called "firstCanvas" and the other one called "secondCanvas"
    3rd: Edit the javascript like this:
            <script>
                // change the default namespace for the CreateJS libraries:
                var createjsFirst = createjsFirst||{};
                var createjs = createjsFirst;
            </script>
            <script src="//code.createjs.com/easeljs-0.7.1.min.js"></script>
            <script src="//code.createjs.com/tweenjs-0.5.1.min.js"></script>
            <script src="//code.createjs.com/movieclip-0.7.1.min.js"></script>
            <script src="{{assets}}/js/first.js"></script>
            <script>
                function initFirstAnimation() {
                    var canvas, stage, exportRoot;
                    canvas = document.getElementById("firstCanvas");
                    exportRoot = new libFirst.first();
                    stage = new createjsFirst.Stage(canvas);
                    stage.addChild(exportRoot);
                    stage.update();
                    createjsFirst.Ticker.setFPS(libFirst.properties.fps);
                    createjsFirst.Ticker.addEventListener("tick", stage);
            </script>
            <script>
                // change the default namespace for the CreateJS libraries:
                var createjsSecond = createjsSecond||{};
                var createjs = createjsSecond;
            </script>
            <script src="//code.createjs.com/easeljs-0.7.1.min.js"></script>
            <script src="//code.createjs.com/tweenjs-0.5.1.min.js"></script>
            <script src="//code.createjs.com/movieclip-0.7.1.min.js"></script>
            <script src="{{assets}}/js/second.js"></script>
            <script>
                function initSecondAnimation() {
                    var canvas, stage, exportRoot;
                    canvas = document.getElementById("secondCanvas");
                    exportRoot = new libSecond.second();
                    stage = new createjsSecond.Stage(canvas);
                    stage.addChild(exportRoot);
                    stage.update();
                    createjsSecond.Ticker.setFPS(libSecond.properties.fps);
                    createjsSecond.Ticker.addEventListener("tick", stage);
            </script>
    <body onload="initFirstAnimation(); initSecondAnimation();">
    Could someone please reply with the best practice on how to do this? If possible, without the need to reload all the libraries...
    If I only need to show one flash movie at a time, would it be more efficient to cut & paste the canvas tag using jQuery in the DOM and reloading a different lib on it?
    Many thanks!
    #flash #reborn

    I was able to fix it. At the end, it was easier than I thought. Just have to publish using a different "lib" namespace for each movie, load all the scripts at the end of the <body> and then add the following to the onload or ready events:
    $(document).ready(function () {
            var canvas, stage, exportRoot;
            // First movie
            canvas = document.getElementById("firstCanvas");
            exportRoot = new libFirst.first();
            stage = new createjs.Stage(canvas);
            stage.addChild(exportRoot);
            stage.update();
            createjs.Ticker.setFPS(libFirst.properties.fps);
            createjs.Ticker.addEventListener("tick", stage);
            // Second movie
            canvas = document.getElementById("secondCanvas");
            exportRoot = new libSecond.second();
            stage = new createjs.Stage(canvas);
            stage.addChild(exportRoot);
            stage.update();
            createjs.Ticker.setFPS(libSecond.properties.fps);
            createjs.Ticker.addEventListener("tick", stage);
            // Third movie
            canvas = dument.getElementById("thirdCanvas");
            exportRoot = new libThird.third();
            stage = new createjs.Stage(canvas);
            stage.addChild(exportRoot);
            stage.update();
            createjs.Ticker.setFPS(libThird.properties.fps);
            createjs.Ticker.addEventListener("tick", stage);

  • Load multiple files using the same data load location

    has anybody tried loading multiple files using the same load locations. I need to do this as the data in these multiple files will need to be exported from FDM as a single export file. the problem i am facing is more user related. since these files will be received at different points of time, users will need a way to tell them what has been loaded and what is yet to be loaded.
    is it possible to throw a window on the web broser with OK and Cancel buttons from an event script?
    any pointers to possible solutions will be helpful

    was able to resolve this. the implementation method is as follows
    take a back up of previously imported data in the befcleardata event script. then in the beffileimport event append the data to the import file. there are many other intricacies but this is the broad implementation logic. it allowed my users to load multiple files without worrying about append or replace import type choices

  • Can I use the same inport profile to load multiple dimemsions?

    Hi,
    I am trying to create an Import Profile that will allow me to load multiple ADS files, at seperate occasions, and thereby create or update different dimenssions. I have created multiple Import Profiles,
    1.I have ticked both the Options : Create dimensions for all non-mapped dimensions...and Select All - merge as shared.
    2. Only - Create dimensions for all non-mapped dimensions
    3 Only - Select All - merge as shared.
    Neither seem to work.
    Any advice would be greatly appreacited.
    Thanks,
    Charlie

    Since the laptops are the same model-yes, you can use your Recovery Discs on both.
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

Maybe you are looking for