Action script objects not displayed

Hi,
I am creating an air application using Flex 4.5 compiler. The problem i am facing currently is that i have extended shape class to my custom class movingObject. in this class i have defined a function "drawcircleObj" in this class and calling this class function to display my customized circle on the stage.
But it is not behaving as desired. i.e. no object is being displayed

Adding my code snippets
The as file code
package secondPackage
    import flash.display.*;
    public class movingObject extends Shape
        private var xPos:Number;
        private var yPos:Number;
        private var radius:Number;
        private var color:uint;
        public function movingObject()
        {// currently a stub will use it later
        public function drawcircleObj(xInput:Number,
                                      yInput:Number,
                                      radInput:Number,
                                      colorInput:uint): void
            xPos = xInput;
            yPos = yInput;
            radius = radInput;
            color = colorInput ;
            this.graphics.beginFill(color);
            this.graphics.drawCircle(xPos,yPos,radius);
The mxml file code
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                       xmlns:s="library://ns.adobe.com/flex/spark"
                       xmlns:mx="library://ns.adobe.com/flex/mx"
                       creationComplete="initApp()">
    <fx:Script>
        <![CDATA[
            import secondPackage.movingObject;
            import flash.display.*;
            private var myMoving:movingObject = new movingObject();
            public function initApp():void
                //show the string
                myMoving.drawcircleObj(500,500,30,0xFF0000);
                mainText.text = myMoving.letsStart();
        ]]>
    </fx:Script>
    <s:TextArea id="mainText" x="390" width="50" y="133"/>
    <s:Button  id="button1" x="804" y="227" label="Button" width="45"/>
</s:WindowedApplication>
The problem which i suspect is that there should be a stage object holding the same object or circle created and then display it.
A faster reply will be highly appreciated. Thank you.

Similar Messages

  • Mapping action script object to mx:model object

    Hi all,
    I am having an action script class and an mx:model element
    with same elements. I want to assign an action script object to
    this mx:model. How can I do that one?
    Let me state it clearly.
    Say, my action script class contains two elements - user and
    rollno with required getter and setter methods.
    And I am having an mx:model element with the following
    format.
    <mx:model id="data">
    <data>
    <user/>
    <rollno/>
    </data>
    </mx:model>
    I want to assign an instance of action script class to this
    model object.
    I tried extending action action script class from Objectproxy
    and used data=actionscriptinstance.
    But it's not working properly.
    Is there anyway I can do this one?
    Thanks in advance

    The quick answer:
    <mx:model id="data">
    <data>
    <user>{ myASObj.user }</user>
    <rollno>{ myASObj.rollNo}</rollno>
    </data>
    </mx:model>
    The bigger question might be, "Why have the mx:Model?"
    The Model tag is all Strings, so you lose data typing.
    Why not just create a value object (VO) for your user data
    and pass that around?
    package samples.user {
    [Bindable]
    [RemoteClass(alias="samples.user.User")]
    public class User {
    public var user:String;
    public var rollNo:int;
    Then when the result data returns, cast to the VO.
    public var user:User = (eventObj.result as User)

  • I am trying to reinstall Flash CS4 professional as the action script is not working but now I am getting an error: 2 message when I use the original CD to try and reinstall

    I can't get the original disk to work on a reinstall.  I get the message
    AdobeColorCommonSetRGB
    Error:
    Error 2.
    I teach a class using this program on Macintosh computers running 10.9.5 and the action script is not working.  It will work on any program designed using the 10.8 but if you design any animation on 10.9.5 the action script will not work for the buttons

    You would have to manually delete the color profiles in question... Run the cleaner tool and see if it gets you started.
    http://www.adobe.com/support/contact/cscleanertool.html
    Mylenium

  • Action script object

    I would like to creare an object for third party developers
    to report high score.
    I dont want them to see my code.
    So for example I will create a class highScore with API
    sendScore and the developer will use it.
    What is the best way to do it?
    Is the only way to do it is to crearre action script file
    that they can see my code?

    Well, a good place to start:
    http://www.adobe.com/devnet/flash/components/components.html

  • Functions in script objects not being recognized after certain point

    Hi all,
    I'm wondering if anyone has figured out why after normally about 300-500 lines of JavaScript in a Script Object, sometimes the functions near the end are no longer recognized by the XFA processor when referenced ("TypeError: Scripts.myFunction is not a function").
    When reordered, further up the script object, they work as intended. The line at which it no longer recognizes functions also isn't always the same and I have worked with some script objects that have over 800 lines with all the functions still working.
    I've tested in Designer 9 and 10, Reader 8 9 and 10.
    Please at least let me know I'm not the only one. I knew of one other developer that had come across the same issue.
    Kyle

    Thanks radzmar!
    JSLint didn't find anything but it set me on the path towards looking for syntax errors. I deleted code in the script object line by line until I narrowed it down.
    Turns out it is Regular Expression literals, in particular trying to escape (\) the metacharacters ($.{}[] etc).
    For example, var reg = /\}/; should technically match any right-handed curly brace, which in fact it does! The function that it is in works perfectly but every function written below it is not recognized by the XFA processor. Just out of curiousity I tried reg = /\{\}/; which matches {} and all the functions below now are recognized. It seams as though, even though using the escape character is allowed in core JavaScript, the processor sees it as a syntax error because it's not terminated.
    Anyways, the easy fix is of course using the RegExp constructor var reg = new RegExp("\\}"); but I'll miss the confidence I had using Regular Expression literals.
    Thanks again for the nudge in the right direction.
    Kyle

  • Action script 2 not working

    New to Flash CS4, but could do basic button stuff like this in Flash MX 2004. (Haven't been doing anything with Flash in the meantime, but now have CS4 and am determined to get back into it.)
    I chose Action script 2 when starting, and in the publish settings. Made some very simple buttons and used the action script assistant but cannot figure out why they are not working. i keep going around and around and getting nowhere.
    would someone please take a look and advise? I am STUCK.
    Please?
    the file is too big to attach, but if anybody is willing to help, i'll share the file via my iDisk. Thanks so much.

    I have a few suggestions for you -- not that you asked, but hey it is a free forum with volunteers, so you get what you get!
    First if you really don't know AS2 all that well, but you want to get into coding I would suggest starting with AS3. It is the future and if you have to learn new stuff it might as well be the newest, new stuff. AS3 is the future of Actionscript and Flash. It is a little more complex in some respects, but in many others it isn't that much more difficult and it really helps if you haven't learned all kinds of "bad" ideas from how AS2 was....
    Next, if you decide to stick with AS2, I would suggest learning the latest ways of doing stuff in AS2. Using the on(event) type of coding is really old and it won't serve you well if you want to advance very far with your coding.Here is a great article on the transition to the newer style and why it is a good idea:
    http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent
    After that, consider ditching buttons all together. They are really twitchy and strange and most people I know gave them up when movieclips could have button events attached to them.
    Finally on the issue of Scenes, they are a great way for timeline animators to organize their content. And they are great when everything is just played back to back. In fact that is what happens to scenes, when you publish the timelines are strung together in sequence and then the "scenes" are deleted. The whole thing becomes just one big long timeline. The problems come in when you start using code to move the playhead around. The documentation seems pretty straight forward and it should work, but there are just several little tricky things where it doesn't work. Sounds can cause problems too. So if you plan to use code I always recommend that you use movieclips to organize your "scenes" and not the actual scenes....

  • GIMP script-fu not displayed

    any idea why on  GIMP 2.6.8 no script-fu is displayed. After reinstall of GIMP still no scripts available.
    I can see them in the console but any of them, even the standard ones, generate error like this:
    > (script-fu-coffee-stain run-mode image drawable value toggle)
    Error: eval: unbound variable: run-mode
    to my understanding, the scripts should be available under Script-fu menu entry.
    Do I miss anything here to make the default scripts on GIMP activated?

    pardon me.... the scripts all listed there, but not where there where before, they have changed it.

  • Flash script image not displayed correct size

    I have a contact form image on my website at the bellow URL. this is not displaying at the correct size when viewed from any firefox web brouser, but is fine when viewed from other browsers like IE9, Chrome, etc. I wonder why this is and if there is a pice of html code i could add to me web page to correct this image distortion
    http://www.netprice-mobiles.co.uk/Contact_Us.php
    I have found that when the contact formis viewed on firefox v10.0.2 from a computer OS windows XP SP1 that looks ok, but in vista and windows 7 it does not.
    Any help appreciated.

    Reset the page zoom on pages that cause problems.
    *<b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    *http://kb.mozillazine.org/Zoom_text_of_web_pages

  • Flash objects not displaying in Firefox (but works fine in Chrome and IE)

    Well, I'm trying to embed a Shockwave Flash object into a website I'm building. It displays in Chrome and IE, but it doesn't show up at all in Firefox. It's just white space. Ive tried it on two machines, so it's presumably the code. Both the machines have Adobe Flash enabled... I'm not sure what the problem is. I've not worked with embedding Flash objects in HTML before, so, it's probably something really obvious. I just used the insert command on dreamweaver and it wrote the code that I'm using. If anyone can help me, it would be much appreciated. Here's my code:
    <pre><nowiki><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="99%" height="600" id="FlashID">
    <param name="movie" value="The file path" />
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="swfversion" value="10.1.0.0" />
    <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
    <param name="expressinstall" value="../Scripts/expressInstall.swf" />
    <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="the file path" width="99%" height="76.5%">
    <!--<![endif]-->
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="swfversion" value="10.1.0.0" />
    <param name="expressinstall" value="../Scripts/expressInstall.swf" />
    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <div>
    <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
    <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    </div>
    <!--[if !IE]>-->
    </object>
    <!--<![endif]--></nowiki></pre>

    If you can't post an address for a page demonstrating the problem, could you check the Web Console (Ctrl+Shift+k) and Browser Console (Ctrl+Shift+j) for any messages related to the Flash media? For example, does either console show that Firefox is requesting the SWF file? Does either show an error in content type or any kind of security message?

  • SAP Script output not displayed

    Hello,
    Print preview of purchase document does not show the output. Only "test print only" is displayed on all pages.
    I can see the data passed to SAP Script in debug. The print is created using output control, ( Save or create of PO ).
    What could be the possible reason for the same?
    Even if i try to use the option of "printing test" direct from script no text elements/language are displayed.. "test print only" is displayed.
    kindly help.

    Hi,
    I am not sure what your current support pack is. This sounds like the problem described in the SAP Note:
    1243485 - Unprinted variables and lines of a SAPscript form
    Can you apply the code correction of Note #1243485?
    Regards,
    Aidan

  • Objects not displayed in Org Structure (PPOME)

    We made big changes in the existing organizational structure (new objects) with start date 01.01.2012.
    Old objects were terminated by 31. Dec 2011.
    In PPOME with entry date = 01. December 2011 I can only see the new objects but not the old and still valid ones.
    In table HRP 1000 and HRP 1001 all relationships are correctly maintained - but I don't see any of the objects in PPOME.
    Big problem, as workflows don't  work any longer.
    Thanks!

    I have the same problem, I have updated relations of some positions. HRP1001 looks correct, with limitations on correct dates.
    But on PPOME I can see the same position under two organizations, both with end date 31.12.9999.
    This is an impossible case, when standart PPOME controls are concerned, but something happened, and I could not find how to correct it.
    If you have any suggestions, please share.
    Thanks.

  • Java Label object not displaying ascii chars (128-159)

    I am having a problem getting ASCII characters between 128 and 159 to show up in a Label object which is inside a Panel which is in turn inside a Frame. There is other code in a different class that uses a Graphics object and drawString and Paint methods to display the same text, and that works. However, simply passing the text containing the above mentioned ascii characters like so:
    lb = new Label("€‚ƒ„…†‡");
    results in mostly empty boxes being displayed (there is other code that eventually displays the label in the Frame). The Euro sign comes through, as does the integral sign. Some others come through, and they are mostly modifed letters of some sort.
    I've tried coding a mock up simple Frame with a few labels. I've passed in literal strings, String objects derived from hex and integer byte arrays and a String object with the Cp1252 encoding passed in. None display the characters in question. However, in the same code, I pass a title string containing these characters into the Frame's constructor, and it appears with no problems.
    I just want to be able to handle all characters that may be entered into this application, and that may include these Cp1252 characters. Is there any way of using Label objects and getting these characters to display correctly?
    [Windows-1252 Chart|http://upload.wikimedia.org/wikipedia/commons/e/e7/Windows-1252.svg]

    I am having a problem getting ASCII characters between 128 and 159 to show up in a Label object which is inside a Panel which is in turn inside a Frame. There is other code in a different class that uses a Graphics object and drawString and Paint methods to display the same text, and that works. However, simply passing the text containing the above mentioned ascii characters like so:
    lb = new Label("€‚ƒ„…†‡");
    results in mostly empty boxes being displayed (there is other code that eventually displays the label in the Frame). The Euro sign comes through, as does the integral sign. Some others come through, and they are mostly modifed letters of some sort.
    I've tried coding a mock up simple Frame with a few labels. I've passed in literal strings, String objects derived from hex and integer byte arrays and a String object with the Cp1252 encoding passed in. None display the characters in question. However, in the same code, I pass a title string containing these characters into the Frame's constructor, and it appears with no problems.
    I just want to be able to handle all characters that may be entered into this application, and that may include these Cp1252 characters. Is there any way of using Label objects and getting these characters to display correctly?
    [Windows-1252 Chart|http://upload.wikimedia.org/wikipedia/commons/e/e7/Windows-1252.svg]

  • Database objects not displaying in Business components wizard

    I am trying to create new entity object based on a table using Entity Object Wizard. But I dont see that the tables,views,sysnonyms enabled and also do not get the list of tables in the dropdown
    Following are the steps that I am following :
    1] in the navigator, have right-clicked and selected the "New Entity Object " Wizard Option.
    2] Entered the name and the package and in the schema object lov, do not see the list of all the tables at all and also the Database Schema is disabled.
    I have connected to the database from JDeveloper using database connections, but do not while creating an Entity object. Can you pls help me resolve this.
    Version of Jdeveloper is 11.5.10(CU3)

    Select your project in Jdev, right click and select "Edit business components project". In the new window check the value used for connection.
    --Shiv                                                                                                                                                                                                                                                                                                               

  • Transparent objects not displaying correctly

    Interactive pdfs  which were created in  indesign  and  functioned perfectly  in  Acrobat  XI  and Acrobat reader    are failing  to display correctly  in  Acrobat DC  Specifically  Drop shadows  and transparent items  display as heavily pixelated mess any thoughts 

    I have  just downloaded  Acrobat Reader DC  and the display issues are  the same 
    This is very  worrying  I have produce  numerous interactive  pdfs  over the past few years    many  have   show and  hide areas  displaying  text on  semi transparent  background overlaying  a image    and button which  glow on rollover  etc   it appear that  anyone viewing the projects  in a  Adobe DC  will basically  get garbage
    I find it  unbelievable that adobe would a releases a version  of  a programme  which  effectively   totally undermines  a production process from indesign i.e. interactive pdfs 
    but even worse to introduce  it with out waring  so effectively  content creators    will just have to deal with the fall out  of  suddenly having a back catalogue of work   which  no longer functions   let a lone having to deal with clients  which will be infuriated to learn their  assets have been rendered useless.
    How incompetent  does  this make   designers look  in this area 
    Hopefully there is a fix  in the offing 

  • Dynamic OLE object not displaying proper file

    We are using CR IX R2. I have a report that I would like to attach a pdf to. This pdf will be different depending on the selection of data from the rest of the report. The file location is always the same but again the name of the file will vary.
    The location and name of the file are listed in one field of a table. Is there a way to do this. When I edit the OLE object and select the field where  the file resides it only shows the original document that I choose.
    At this point I am testing it in a blank report before I create the subreport to add it to our existing report.
    Any suggestions?

    What happens if you try this link:
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e0fbebaf-07e0-2c10-ad9a-d45810ae7109&overridelayout=true
    It should open the PDF Browser viewer. If it doesn't then you likely need to add PDF support to your browser. Or configure PDF or install the latest version. Could be a permission issue also.
    Thank you
    Don

Maybe you are looking for