Dynamically add Canvas not working

I have extended the Canvas class and i am trying to add it dynamically  to the stage, unfortunately it is not showing up.
code from extended Canvas class;
package com
import mx.containers.Canvas;
public class CustomCanvas extends Canvas
public function CustomCanvas()
super();
protected override function updateDisplayList(unscaledWidth:Number,  unscaledHeight:Number):void
super.updateDisplayList(unscaledWidth, unscaledHeight);
super.setStyle("borderStyle","solid");
super.setStyle("cornerRadius",10);
super.setStyle("backgroundColor","#FFFFFF");
Here is the Flex code that is being used to initiate the Canvas;
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
cornerRadius="20"     
creationComplete="init()" xmlns:com="com.*">
<mx:Script>
<![CDATA[
import mx.flash.UIMovieClip;
import mx.core.UIComponent;
import mx.containers.Canvas;
import com.CustomCanvas;          
public function init():void
var myCanvas:CustomCanvas = new CustomCanvas();
addChild(myCanvas);
myCanvas.x = 600;
myCanvas.y = 200;
myCanvas.width = 200;
myCanvas.height = 200;
]]>
</mx:Script>
<com:CustomCanvas
width="200"
height="200"
borderStyle="solid"
cornerRadius="10"
backgroundColor="#FFFFFF">
</com:CustomCanvas>
</mx:Application>
Creating the Custom Canvas class via MXML works fine, but trying to  create it dynamically does not.
Any thoughts ?

i found a way to fix mine that maybe you could try.
Look in your Profile Folder (go to this link to find out how to do that: http://kb.mozillazine.org/Profile_folder_-_Firefox#Finding_the_profile_folder )
Now, delete these files but make sure Firefox isn't running when you do this:
extensions.cache
extensions.ini
extensions.rdf
Restart/open Firefox and they should work now.

Similar Messages

  • Dynamic Add table not working

    Hi,
    I have to  2 subforms,name table_subform[0] and table_subform[1] .
    To add a new table , i use script :
    var sSubformSOM = "xfa.form.form1.page1.table_subform";
    var oSubform = xfa.resolveNode(sSubformSOM);    
    var sParentSOM = oSubform.parent.somExpression;   
    var sManagerSOM = sParentSOM + "._" + oSubform.name+ "["+ 1 +"]"; ;  // Control the the new table location
    var oManager = xfa.resolveNode(sManagerSOM);
    oManager.addInstance(1);
    PROBLEM : , the this add table function "ADD THE NEW TABLE IN BETWEEN table_subform[0] and table_subform[1].
    REQUIREMENT : The new table should added next to the last table.
    SOLUTION 1 : var sManagerSOM = sParentSOM + "._" + oSubform.name + "["+ 1 +"]"; // index 1 to add the new table next to the second table
    var sSubformSOM = "xfa.form.form1.page1.table_subform";
    var oSubform = xfa.resolveNode(sSubformSOM);   
    var sParentSOM = oSubform.parent.somExpression;   
    var sManagerSOM = sParentSOM + "._" + oSubform.name+ "["+ 2 +"]"; ;  // Control the the new table location
    var oManager = xfa.resolveNode(sManagerSOM);
    oManager.addInstance(1);
    PROBLEM : NOW all my "new table" are added by reference to oSubform.name + "["+ 1 +"]";  OR oSubform.name[1]
                       Now the add table are working fine.
                        But this create an issue when deleting the table from the same subform.
                         If i click the "Delete table at "table_subform[1] - which index is used to create the rest of the tables" , it delete      table_subform[2],table_subform[3] in sequence.
    Anyone have any solution for this ????

    The removeInstance method requires an index so that it knows which subform to remove. If the button that you are pressing is part of the subform that you are removiing you can use the this.parent.index to return the index that you are on and as such the appropriate subform can be removed. Depending on your structure you may need to use the parent keyword to get back the level that you need. In many cases it gets confusing to know which subform is repeating so you can add this javascript command to the enter event of a field in the subform.
    app.alert(this.somExpression)
    This command will show you the complete somExpression of the field and as such you will know the somExpression for the rest of the subform. You may need to click on the field in a couple of different rows to understand the pattern that is emerging. This command is only for debugging ...you woudl remove it after you figure out your issue.
    Hope that helps
    Paul

  • Why Dynamic Parameter is not working, when i create report using stored procedure ?

    Post Author: Shashi Kant
    CA Forum: General
    Hi all
    Why Dynamic Parameter is not working, when i create report XI using stored procedure ?
    Only i shaw those parameters which i used in my stored procedure, the parameter which i create dynamic using stored procedure
    is not shown to me when i referesh the report for viewing the results.
    I have used the same procedure which i mention below but can not seen the last screen which is shown in this .
    ============================================================================================
    1. Select View > Field Explorer2. Right-click on Parameter Fields and select New from the right-click menu.3. Enter u201CCustomer Nameu201D as the name for your parameter4. Under u201CList of Valuesu201D select u201CDynamicu201D5. Under the Value column, click where is says u201Cclick here to add itemu201D and select Customer Name from the drop-down list. The dialog shown now look like the one shown below in Figure 1. Click OK to return to your report design.
    Dynamic Parameter Setup6. Next, select Report > Select Expert, select the Customer Name field and click OK.7. Using the drop-down list beside select u201CIs Equal Tou201D and using the drop-down list, select your parameter field (it should be the first field). 8. Click OK to return to your report design and see the parameter dialog.The parameter dialog will appear and show you a dynamic list of values that is updated each time your run your report. It couldnu2019t be easier! In our next tutorial, we will be looking at how to use this feature to create cascading parameter fields, where the values are filtered by the preceding selection.
    Dynamic Parameters in Action
    My question is that whether dynamic parameter is working with storedprocedure or not.
    When i added one table and try to fetch records using dyanmic prameters. after that i am not be able to find the dynamic parameter option when i referesh my report.
    One more thing when i try the static parameter for my report, the option i see when i referesh the screen.
    Please reply soon , it's urgent
    Regards
    shashi kant

    Hi Kishore,
    I have tested the issue step by step by following you description, while the first issue works well in my local environment. Based on my research, this can be caused by the lookup expression or it indeed return Male value based on the logic. If you use the
    expression below, it will indeed only return the Male record. So please try to double-check the record in the two datasets and the expression in your environment:
    =lookup(first(Fields!ProgramID.Value,"DataSet1"),Fields!ProgramID.Value,Fields!Gender.Value,"DataSet2")
    As to the second issue, please try to use the following expression:
    =Count(Lookup(fields!ProgramID.value,fields!ProgramID.value,fields!Gender.value,"DataSet2"))
    Besides, if this issue still exist, in order to trouble shoot this issue more efficiently, could you please post both the .rdl  file with all the size properties to us by the following E-mail address?  It is benefit for us to do further analysis.
    E-mail: [email protected]
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Elements 10 canvas not working with tiff images; works fine with jpegs. What to do?

    Elements 10 canvas not working with tiff images; works fine with jpegs. What to do? It does not allow me to add a colored canvas, only a blank canvas.

    Perhaps some of the tiffs are already layers.
    In other words, since jpegs don't support layers, they all ways open with one locked background layer, but the tiff format does
    support layers so the tiffs don't have to have a locked background layer and can already be a regular layer that supports transparency.
    For the tiffs you could add a new color fill layer below and use the color you want the enlarged canvas to be.
    On pse 10 look at the bottom of the layers panel for the new adjustment of fill layer icon

  • Premiere Pro to Adobe Audition Dynamic link does not work. Cannot edit audio in Audition.

    Trying to edit Audio from Premiere Pro within Audition thru the Dynamic link but it does not fire up Audition to edit. Seems like a common problem/bug. But no one has posted a solution. Please Help
    -Windows 7
    -Premiere Pro CC 2014
    -Adobe Audition CC 2014

    You dont understand it was all working fine in the previous Adobe versions. matter of fact you can go on youtube and see a couple of videos that shows the work flow between Premiere Pro and audition by way of Dynamic link. If you edit a video clip in Premier Pro and want to add some music or simply edit the audio that is contained in the video there was a time within Premiere Pro you can just right click "Edit in Adobe Audition" and Audition would open with the audio clip in place. Much in the same way Premiere Pro works with After Effects thru the Dynamic Link. The Dynamic Link is the bridge between applications to work with each other. For some reason Premiere Pro and Audition Dynamic Link is not working properly.

  • Microsoft Excel 2013 add-in not working after update

    I have originally posted this question at answers.microsoft.com and have been re-directed to post here. (http://answers.microsoft.com/en-us/office/forum/office_2013_release-excel/microsoft-excel-2013-add-in-not-working-after/298aff03-c90a-4a2a-b67b-07b6f3c7648c)
    We are an organization with over 200 users and are currently using Microsoft Office 2013 (Click-to-run install via Office 365 portal), we have noticed that in Excel when we apply the monthly Office update, the add-in (e.g. Analysis Toolpak) would stop working
    with the following error message displayed.
    I tried updating from 15.0.4631.1004 to 15.0.4641.1003,
    15.0.4641.1003 to 15.0.4649.1004, they all gave the same results.
    I have checked the captioned file path and it is indeed missing, I think the update mechanism messed up the add-in somehow, a full re-install would fix it as quick or online repair is not doing the trick.  This is not the only add-in it is affecting
    as there are some 3rd party add-ins are affected as well.
    Please advise how we can fix this without needing to re-install Microsoft Office.  Thank you!

    I don't have 365 or C2R so I can't address your main question, so just a few thoughts which may not be applicable in your setup.
    Check the addin manager to see if your addins are listed and ticked. If listed (ticked or not) check the registry to see where the location is written, if ticked look here
    HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Excel\Options
    and look for keys named OPENx, where x is the order number the addin is loaded
    if not "ticked" instead of \Options look in \Add-in-Manager
    With a VBA macro or in the VBE's immediate window return
    Application.LibraryPath 
    Assuming you found a listing in the registry do the paths match, if not look in the .LibraryPath to see if the addins got unloaded there into the subfolder \Analysis
    If you find the file(s) try un-installing and reinstalling the addins, but browse to the actual folder don't simply tick. If you can't find the files, copy them (from a different system) to the folder indicated by .LibraryPath. In the addin manager uninstall
    them if installed, close the manager, open it again and the addins should be listed, tick to re-install.
    You say your other addins don't work, I wonder if some mixup has occurred with what Excel thinks is the default path, but note for other addins the default addins path is returned by app.UserLibraryPath
    Are you using a Chinese system?

  • Firefos beta 8 version plugins and add-ons not working after install

    After Install ghostery will not fuction. Performed a reinstall of ghostery and no luck. In manage Add-ons it says ghostery will be working after restarting the browser but no change. Why? Also completey removed (uninstalled ghostery) then rebooted and reinstalled ghostery and still no change.
    Also other add-on are doing the same thing and all are compatible with this version according to the options menu in manage add-ons

    I just Found out after a hour of disabling and enabling add-ons Firebug was causing my issues of missing add-on buttons and missing add-on not working try disabling it and related Firebug add-ons and restart Firefox to see if everything begins to work

  • Xfa.sourceset.dataconnection.add() is not working

    Hello All,
    I am trying to insert data into database using "xfa.sourceset.dataconnection.add()" as shown in tutorial. However, the value is not inserted into DB and the PDF file is not throwing any errors.
    I did try update, last, first, etc., all the function are working but only add is not working.
    Can anyone please tell me where I am wrong?
    FYI -I have change the dataconnection name to the name that I am using for dataconnection so this is not a problem.
    Thanks
    Viral

    Hello Viral,   
         To reader extend your form you have two options..
         One option is using Adobe Acrobat Pro which can provide only a subset of Reader Extensions (locally saving and Digitial Signatures).
         Attached image show you the menu option in Acrobat PRO to Reader extend the form..
         Other option is by purchasing a Reader Extensions service component from Adobe and use it at the time of rendering in the Livecycle Server. 
         This option provide the full Reader Extensions functionality(things like commenting, Database and web service access, etc..).
         since in your case you are trying with the Database connections, can you try with the second option.
    Thanks
    Srini

  • Cascading Dynamic Parameters Do Not Work In Crystal Viewer 2008?

    I have generated a report with Crystal Reports 2008 that uses a dynamic cascading parameter. I work in waste management and the report I create in Crystal is used as a "template" with the tonnages collected from all of our customers. Our less technically minded employees can then open this report with Crystal Reports Viewer 2008, use the drop down menus to select only the customer they need a report for and then export this to PDF for delivery.
    The report as designed works perfectly in Crystal Reports, but the parameter does not work in Crystal Viewer.
    Some of our customers have more than one physical location that we service. The cascading dynamic parameter in my report allows you to select the customer name, and then it only shows the locations linked to that customer, so the end user can select only the relevant location(s) for the report. The cascading parameter is dynamic and allows multiple selections, and is linked to a Saved Data formula. The report is saved with the data.
    When the report is opened in Viewer, one of two things happens. If the report is saved in Crystal Reports and a specific customer/location is selected, then ONLY those selected customer/locations are available in the Viewer. If ALL the customers/locations are selected in Crystal Reports and saved, then in the Viewer they are all available, but selecting one customer does NOT narrow down the locations (i.e. it does not "cascade") and instead ALL of the locations are available even if they do not apply to the customer.
    If I use a single dynamic parameter and select ALL of the customers (for example), then when this is opened in Crystal Viewer all of the customers are available from the parameters drop down and the report works fine. As soon as this is tried with a cascading parameter however, Crystal Viewer falls down.
    Does anyone know of a workaround to this or if there is something I am doing wrong?

    I am using the free Crystal Report 2008 Viewer along with designing reports with Crytal Reports ver 12.3. With a test file from SAP called "Interactive Parameters", the parameter feature works to refresh the report. The parameters that are supplied in the sample report work with Viewer. They show up under the parameter list in the parameter side panel in Viewer and are available to make record selections. When I add a parameter to the sample report in Crystal 2008 and then view the report in Viewer, my parameters are unavalable for record selection while the original parameters remain available. Futher, my parameters are displayed under a section called "Current Data Set" in the Parameter side panel, while the selectable parameters are displayed under the "Parameter" section in the parameter side panel. There must be a setting that is treating the parameters I create differently form the parameters created in the original sample report. Any help would be appreciated.

  • Javascript dynamic drop down not working in Safari

    This script works properly in windows IE, Firefox and mac Firefox, Camino, etc. but NOT in Safari. It controls a dynamic dropdown. Select the state 'Category' and the second dropdown 'metro' shows the city - in all browsers except Safari. For brevity, the example below shows only WY. When Category is selected, the Safari javascript console says:
    "Value undefined (result of expression selectbox.options.add) is not object."
    Is there anything I might be able to change so this will work in Safari? Thanks for any advice. Page is at http://look-on.com/ddTEST.html
    <script type="text/javascript">
    <!--
    function SelectSubCat(){
    removeAllOptions(document.form1.metro);
    addOption(document.form1.metro,"00000", "Metro Area");
    if(document.form1.Category.value == 'WY'){
    addOption(document.form1.metro,"82601", "Casper");
    addOption(document.form1.metro,"82001", "Cheyenne");
    function removeAllOptions(selectbox)
    var i;
    for(i=selectbox.options.length-1;i>=0;i--)
    selectbox.remove(i);
    function addOption(selectbox,value, text)
    var optn = document.createElement("OPTION");
    optn.text = text;
    optn.value = value;
    selectbox.options.add(optn);
    // -->
    </script>

    Hi
    the test page works fine in a very recent nightly build of Webkit ( the system framework behind Safari ) & Safari 2.0.4
    I'm still on 10.4.9, so it's possible that 10.4.10 might fix it anyway.
    ..... since webkit fixes it, it's likely a bug that's been cured.
    However, that doesn't help you get it working in older versions; you may get more help in the web-dev list at http://lists.apple.com/mailman/listinfo

  • Oracle Forms 10G(tabbed canvasses not working the same as in Forms 6i)

    Hi everyone,
    I have a form which gets called from another form through a list of value. The called form(second form) has a group of tabbed canvases which get displayed depending on the parameters passed from the first form.
    The Form is working prefectly fine in Forms 6i but when I converted the same form in to forms 10G it does not seem to work the same way. The tabbed canvasses are not getting displayed. I am manually having to press the execute query to get data displayed in the tabbed canvasses. I checked the parameters that are being passed and they are the same as that in Forms 6i.
    Please let me know where my 10G Form is going wrong. Appreciate your help, please send me an email on [email protected]
    Thanks

    duplicate
    Re: Oracle Forms 10G not working as Oracle Forms 6i

  • Bug?: layers.add() is not working properly when invoked from menu (ID/CS6/Win7)

    Hello Devs,
    I am facing a mysterious issue with the layers.add() method.
    I am trying to create n number of layers for my document. So I have decided to create a menu for this.
    I have creatd two scripts
    1. For creating menu & menu action,
    2. Actual script that creates n number of layers.
    When I run the script #2 direclty from ESTK it works fine.
    Now when I try to invoke the same script from the Menu it is not working fine. Only the last layer is created.
    Script 1: LayerPopupMenuAction
    #target indesign
    #targetengine createLayerset
    var layerTemplateScript = File(File(getActiveScriptPath()).parent.fsName+"/IntializeTemplate.jsx");
    var initTemplateHandler = {
        'beforeDisplay' : function(ev)
                ev.target.enabled = (app.documents.length>0);
        'onInvoke' : function()
                app.doScript(layerTemplateScript, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "Initialize Script");
    var layerMenuAction = app.scriptMenuActions.add("&Create Layer Set");
    for(var init_ev in initTemplateHandler) {
        layerMenuAction.eventListeners.add(init_ev, initTemplateHandler[init_ev]);
    var refMenuItem = app.menus.item("$ID/LayerPanelPopup");
    refMenuItem.menuItems.add(layerMenuAction, LocationOptions.AFTER, refMenuItem.menuItems.item(2));
    function getActiveScriptPath() {
        // This function returns the path to the active script, even when running from ESTK
        try {
            return app.activeScript;
        } catch(e) {
            return e.fileName;
    Script 2: IntializeTemplate
    #target indesign
    if (app.documents.length == 0){
        alert("Please open a document and try again", "Document Error", true);
        exit();
    var templateDoc = app.activeDocument;
    var layerNameArray = ["Fixed_Static_Assets", "Absolute_User_Assets", "Relative_User_Assets"];
    CreateLayers(layerNameArray);
    alert("Initialization Successful");
    //--------------------------------FUNCTIONS ARE DEFINED HERE--------------------------------
    function CreateLayers(LayerNameList){
        var layerListLength = LayerNameList.length;
        var layerObject;
        for (var ln=0; ln<layerListLength; ln++){
            layerObject = templateDoc.layers.itemByName(LayerNameList[ln]);
            if (layerObject.isValid==false){
                layerObject = templateDoc.layers.add({name:LayerNameList[ln]});
                //$.writeln('Layer Creation: ' + layerObject.isValid + ' for '+layerObject.name);
        //Merger Default Layer with the bottom layer:
        var defaultLayer = templateDoc.layers.itemByName("Layer 1");
        if(defaultLayer.isValid==true){
            //$.writeln('Default is Valid and will be merged with top most layer');
            layerObject.merge([defaultLayer]);
    Any help / guidance on this regard will be much helpful.
    @Marijan Tompa [tomaxxi]: I googled for the solution and noticed that you have already worked on similar type of script. Please help me if you can.
    Thanks
    Green4ever

    Hi Green4ever,
    At a very first sight I'd suspect UndoModes.FAST_ENTIRE_SCRIPT which, as you may know, can deeply scramble script steps, especially when a try...catch is in use.
    Try to replace FAST_ENTIRE_SCRIPT by ENTIRE_SCRIPT and tell us.
    @+
    Marc

  • Why is my symbol loaded dynamically from library not working?

    Hope someone could help,
    The code in "Example1" work fine if the video symbol is located on the stage. But what I'm trying to do is load the video symbol from the library dynamically and that doesn't work as illustrated in "Example2".
    My question is why does Example1 work and Example2 not work?
    Example1:
    var youtube = $("<iframe/>");
    sym.$("video").append(youtube);
    youtube.attr('type', 'text/html');
    youtube.attr('width', '560');
    youtube.attr('height', '315');
    youtube.attr('src', 'https://www.youtube.com/embed/A3PDXmYoF5U');
    youtube.attr('frameborder','0');
    youtube.attr('allowfullscreen', '0');
    Example2:
    sym.myVideo;
    sym.myVideo = sym.createChildSymbol("video", "Stage");
    var youtube = $("<iframe/>");
    sym.$("myVideo").append(youtube);
    youtube.attr('type', 'text/html');
    youtube.attr('width', '560');
    youtube.attr('height', '315');
    youtube.attr('src', 'https://www.youtube.com/embed/A3PDXmYoF5U');
    youtube.attr('frameborder','0');
    youtube.attr('allowfullscreen', '0');
    Thanks in advanced,
    -Angel

    Have you tried a reset:
    Hold the Sleep and Home button down for about 10 second until you see the Apple logo.

  • Essbase Excel Add in not working

    Hi All,
    I have installed hyperion 11.1.2.2 version in windows 2008 server(64 bit system)
    Server is up and running fine.!
    I have installed Excel addin, then i got one issue here. When i opened excel, Smartview is displayed on the top but Essbase is not displayed. I tried so many ways, but no use.
    give me some suggestions regarding to solve this issue..!
    Thanks,
    mady
    Edited by: mady on Nov 27, 2012 11:46 AM

    Mady, I hope you were not trying to open the Add-Ins directly from Windows. The Essbase XLL and XLA work within Excel as Add-Ins, not as executables. When I doubled-clicked on the XLL and XLA, I got the Microsoft Security warning, which I assume that is what you were doing wrong. You can also google Excel Add-Ins on how to manage it if you are not sure what to do. It's very straight forward.

  • Weather Channel's 1-Click Weather Toolbar Add-on Not Working in Firefox 4

    After installing the Weather Channel's 1-Click Weather Toolbar Add-on, I get 2 Java messages and don't see the toolbar - even though it is listed in the add-ons list and is activated.
    This toolbar is it not working in this version. It worked in previous versions.
    Do you have any suggestions.

    princess111 had her problem solved here: <br>
    http://forums.mozillazine.org/viewtopic.php?f=38&t=2173619
    I'm going post the answer here too for everyone else.
    To make a long story short, the addon wasn't updated for Firefox 4. Someone edited the addon to make it work on Firefox 4. This updated addon can be found here: http://www.megaupload.com/?d=W1HDG9HM
    A moderator at the other forums inspected the file for viruses or malicious code and found none. See [http://forums.mozillazine.org/viewtopic.php?p=10715417#p10715417 here]
    To install the addon once downloaded, read this post: <br>
    http://forums.mozillazine.org/viewtopic.php?p=10715621#p10715621

Maybe you are looking for

  • Rollovers on each page of a gallery widget

    Is the following possible? I would like to have a  slideshow and have each page have its own set of rollovers. (I am a brand new Muse user.) I tried starting with a basic slideshow widget. (I  unchecked "Edit Together", if that matters.) Then I click

  • How to get back default bookmarks and bookmarks toolbars?

    I would like to get back my default bookmarks and those bookmarks on the toolbar. Where can I find a file with all the default bookmarks for Safari v4.0.5?

  • ITunes Screensaver Broken after iTunes 11 update

    After upgrading, the iTunes screensaver now only displays the most recently downloaded artwork (currently 1 album, 3 podcast backgrounds). Anyone else experiencing this, or has in the past as it may just be coincidental with the update? And of course

  • Dunning By Customer

    Hi, I would be grateful if someone could give me a definitive answer on whether it is possible to have a dunning procedure that is on say 4 levels but exclude certain clients in a way such that they are only subject to say 2 levels without them being

  • Importer document interactif indesign dans flash

    bonjour j'utilise CS5 je voudrais faire une presentation flash d'une revue qui montre ses differentes parties avec les pages qui tournent et à chaque partie un texte de commentaire je ne veux aucune interactivité juste une animation qui défile du déb