Create remoteObject with ActionScript, no MXML

I want to use remoteObject with ActionScript only, no MXML:

private function initializeRemoteObject (): void {}
_distante = new RemoteObject;
_remote.source = "AMFProxyObject";
_remote.endpoint = " " http://localhost/linktoMyAMFServer ";
_remote.destination = 'zend ';
_remote.showBusyCursor = true;
}

public function getIAllData (): void {}
initializeRemoteObject();
var token: AsyncToken = _remote.getAllDataFromStoryTable ();
Token.Result = getDataHandler;

I'm stuck here because I don't know the proper syntax to handle the result
}

private void getDataHandler () empty

{

;//

}

I want to just convert the MXML below in ActionScript code.

< mx:RemoteObject id = "zendRemoteObject" destination = "zend" source = "AMFProxyObject".
" endpoint =" http://localhost/linktoMyAMFServer "         
result = "resultHandler (Event)" >

< name mx:method = "getAllDataFromStoryTable" result = "getDataHandler (event)" / >
< / mx:RemoteObject >

Thank you very much. It's driving me crazy, as I couldn't find any help online by Google.

Try to use an answering machine, specifically an AsyncResponder.

   var token:AsyncToken = _remote.getAllDataFromStoryTable();

   var responder:AsyncResponder = new AsyncResponder( resultHandler, faultHandler );   token.addResponder( responder );

   public function resultHandler( event:ResultEvent, token:Object=null ):void   {      Alert.show( "RESULT: "+ event.result as String );   }

   public function faultHandler( event:FaultEvent, token:Object=null ):void   {      Alert.show( "FAULT: " + event.fault.message );   }

The following documents may be useful:

http://www.flexafterdark.com/docs/ActionScript-responder

I hope this helps...

Ben Edwards

Tags: Flex

Similar Questions

  • If I can reverse a Tween created with the GUI... .with actionscript?

    Hi all

    I'm newer Flash, so it does not take much for granted. I have large gaps in my understanding.

    I created a motion tween (by good service a movieClip on the timeline and selecting 'create the motion tween'). Now I want to reverse the trend (using the term of "yoyo") when the audio file is played. I know how to do this with an interpolation (using the tween class) which was created in the first place with actionscript. How can I do overturn if interpolation is not already (named and included) my actionscript?

    Thank you

    If you tween is in a MovieClip you can actually play the MovieClip it back like this:

    addEventListener(Event.ENTER_FRAME, enterFrame);
    function enterFrame(e:Event):void {
          prevFrame();
    }
    

    I do it all the time.

    -Aaron

  • Creating a ComboBox with ActionScript

    I can't create a ComboBox with ActionScript. I want just a simple list, I can add and subtract.

    My Code:

    var inventory: ComboBox = new more.

    Error messages:

    Scene 1, Layer ' Layer 1 ', 1 environment, line 142 1046: Type was not found or is not a constant of compilation: ComboBox. "

    Scene 1, Layer ' Layer 1 ', 1 environment, line 142 1180: call to a method may not set ComboBox. "

    I don't know where I am going wrong. I found several example on the net which was code similar to mine, and some suggested adding the following:

    import fl.controls.ComboBox;

    That didn't work either and gave me more errors. Any suggetions?

    Thanks.

    I should have mentioned to keep this import line.

  • Create an image with ActionScript

    How to create an image with ActionScript? The image is at a url that is not guaranteed to be on the same server.

    I prefer something that is compatible with previous versions of Flash player.

    If you could point me to a tutorial or show me how it's done.

    Thank you

    It's suuuuuuuuuuuuper base, you have just a movieclip on the stage and the URL of an image on the internet/local computer

    function loadImage(imageUrl:String,_holder_mc:MovieClip):Void {}
    holder_mc.loadMovie (ImageUrl);
    }

    Fill in the two parameters with the 1. URL of the image and 2. MovieClip that contains the image

    It will load the image in there. Much more in depth tutorials and other things are everywhere, just google it.

    Sam

  • We use Flash Pro CC creating animations with legends and export to html 5.  We must translate the captions in other languages. How can we download translation of texts in our flash animations so we can use them in html5 using CreateJS?

    We use Flash Pro CC creating animations with legends and export to html 5.  We must translate the captions in other languages. How can we download translation of texts in our flash animations so we can use them in html5 using CreateJS?  I use the Flash on a Mac OSX 10.10.3

    Are you familiar with JavaScript?

    It does not completely answer your question, but the text displayed on the screen from any language (ActionScript/CreateJS / [insert the programming language]) generally all following the same path. Each language has a file stored in some form of key = value style, named through the language and the country of your choice, for example en_US.json

    Any language would allow the user to choose regional settings. The application would then grab the appropriate file and everywhere where the text is needed, the script must be using a (usually global or singleton) variable/service that can get the text of the requested key.

    for example if I wanted a user to have a confirmation of dialogue who said 'are you sure?"with buttons for 'Yes' and 'No', I would have (for me), an Englishman, USA base file en_US.json with these values, for example:

    en_US. JSON example:

    {

    'CONFIRM_YES_NO': ' are you sure?

    'YES': '' Yes. ''

    'NO': 'no '.

    }

    Then you use simply JS/AJAX to read this file. You analyze, or simply JSON decode in an object, or manually, depending on what suits your needs. When you want to display any text, you use the object (variable, maintenance, etc.) you have stored these values.

    for example calling to display function confirm dialogue:

    Nickname... but if you understand...

    and this comes from jQuery UI (see here)

    function confirmDialog() {}

    $(«#dialog-confirmer»).dialog({)

    Title: LocalizationObject ['CONFIRM_YES_NO'],

    buttons:]

    {

    text: LocalizationObject ["YES"],

    Click: function() {/ / do something for 'yes '.

    }

    {

    text: LocalizationObject ["NO"],

    Click: function() {/ / do something to the 'no '.

    }

    ]

    });

    }

    Please consider loosely. 'LocalizationObject' is a variable object or service that returns the appropriate text for the key that you provide. In this case, he provided the key 'CONFIRM_YES_NO', 'YES' and 'NO', which must be on the right answer for this key, localized.

    Again, this is not a manual on how to do it via Flash Pro but it's the general conceptual way you could do it in any language. There are a variety of other ways to do it, but it's a very simple way, as long as you keep your key names at least wake up verbose. A key name such as LocalizationObject ["ABC123"] is not really tell you what the key can be referred. Also nest them contributes greatly, as LocalizationObject ["UI'] ['DIALOGUES'] ['CONFIRM'] ['YES_NO'] = ' are you sure? It just shows I nested the title of the dialog within the user interface, because it is the text that appears in the user interface rather than content. Then inside dialog boxes that may contain a variety of different dialog boxes. Then inside her CONFIRM type of dialogue. Finally, the type is a dialogue YES_NO type (as opposed to OK_CANCEL or JUST_OK, etc.). Whole set makes it easy to understand what the text of reading: UI YES_NO confirm DIALOG boxes.

    I hope that from here you can see that you need to review everywhere you display text on the screen and centralize it in a sort of object (function or variable) of your choice. You must store the external language files to prevent unnecessarily load the other languages as well as an easy to modify Setup.

    The rest is just using basic JavaScript.

    Just be ready for the most difficult challenge. At least for me. The size of the text in several languages is very different, and in some cases requires the loading of special fonts. This can make layout in a very difficult dynamic environment. Always thinking all text how big or small can be in any particular and plan field on this size more and shrink so that to handle this situation correctly.

  • Set the effect of BitmapImage with actionscript

    Hi all

    I met it in a mobile application that needs to display the icon in IconItemRenderer with a fade effect (0 to 1.0 Alpha). But for me, it is general that the way to set the effect with actionscript? In addition, I'm not sure if the BitmapImage support this.

    Anyone would help show me the codes of configuration effect (not MXML)?

    Kind regards

    Felix

    
    http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="application1_creationCompleteHandler(event)">
         
         
         
              
         
         
              
         
    
    

    This some how work for me.

  • How to catch events with ActionScript in InDesign CS5

    Could some kind soul please be proivde a complete example or provide a link to a complete example to listen to and manipulate one even in InDesign with ActionScript extensions? All of the examples I see are for JavaScript and will not work in ActionScript.

    TIA,

    mlavie

    Hey!

    I suggest you look here: http://blogs.adobe.com/cssdk/2010/08/makesideheads-a-complete-indesign-cs5-panel-2.html

    It is the excellent post from Olav on the creation of Panel for InDesign. There are also "id_host_adapter.swc" which is necessary to create event listeners. Import library:

    import com.adobe.cshostadapter.*;
    

    After the successful importation of library, you can attach event like this:

    IDScriptingEventAdapter.getInstance().addEventListener(com.adobe.indesign.Event.AFTER_SELECTION_CHANGED, listener);
    

    Hope that helps.

    --

    tomaxxi

    http://indisnip.WordPress.com/

  • AdvancedDataGrid - add columns with ActionScript

    I am trying to add columns in an AdvancedDataGrid via ActionScript.

    I can't make it work.

    I tried two approaches - with an intermediary table to store the columns then set the adg in table columns; One where I assign columns directly to the table of columns of the adg.

    They are likely to fail in their own way.  The columns don't "take" and the adg uses the default values for dataProviders, or there are no columns at all.

    "adg_test.mxml" has the code AdvancedDataGrids. 

    'adg_test_renderer.mxml' is a rendering engine for one of the columns.

    Would appreciate learning what I'm doing wrong.

    Thanks for any help.

    = Adg_test_renderer.mxml START =.

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:VBox ' http://www.Adobe.com/2006/MXML ">
    < mx:Button id = "btnTest" label = "Working Renderer" / >
    < / mx:VBox >

    = Adg_test_renderer.mxml END =.

    == Adg_test.mxml START =.

    <? XML version = "1.0"? >
    < mx:Application
    ' xmlns:mx = ' http://www.Adobe.com/2006/MXML "
    Initialize = "init ()" >

    < mx:Script >
    <! [CDATA]
    Import mx.collections.ArrayCollection;

    [Bindable]
    private var dpADGExplicit:ArrayCollection = new ArrayCollection([)
    {Artist: 'Pavement', Album: 'Slanted and enchanted', price: 11.99},.
    {Artist: 'Pavement', Album: 'Brighten the corners', price: 11.99},.
    {Artist: 'Saner', Album: 'A child once', price: 11.99},.
    {Artist: 'Saner', Album: 'Helium wings', price: 12.99},.
    {Artist: 'The doors', Album: 'The doors', price: 10.99},.
    {Artist: 'The doors', Album: "Morrison hotel", price: 12.99},.
    {Artist: 'Grateful Dead', Album: 'American Beauty', price: 11.99},.
    {Artist: 'Grateful Dead', Album: 'In the Dark', price: 11.99},.
    {Artist: 'Grateful Dead', Album: 'Shakedown Street', price: 11.99},.
    {Artist: 'The doors', Album: 'Strange Days', price: 12.99},.
    {Artist: 'The doors', Album: 'The best of the doors', price: 10.99}
    ]);

    [Bindable]
    private var dpADGActionScript:ArrayCollection = new ArrayCollection([)
    {Artist: 'Pavement', Album: 'Slanted and enchanted', price: 11.99},.
    {Artist: 'Pavement', Album: 'Brighten the corners', price: 11.99},.
    {Artist: 'Saner', Album: 'A child once', price: 11.99},.
    {Artist: 'Saner', Album: 'Helium wings', price: 12.99},.
    {Artist: 'The doors', Album: 'The doors', price: 10.99},.
    {Artist: 'The doors', Album: "Morrison hotel", price: 12.99},.
    {Artist: 'Grateful Dead', Album: 'American Beauty', price: 11.99},.
    {Artist: 'Grateful Dead', Album: 'In the Dark', price: 11.99},.
    {Artist: 'Grateful Dead', Album: 'Shakedown Street', price: 11.99},.
    {Artist: 'The doors', Album: 'Strange Days', price: 12.99},.
    {Artist: 'The doors', Album: 'The best of the doors', price: 10.99}
    ]);

    private function init (): void
    {
    var arr:Array = []; table of //Intermediary which became the AdvancedDataGridColumn table
    var col: AdvancedDataGridColumn = new AdvancedDataGridColumn();

    col.dataField = "artist";
    arr.push (col);

    col.dataField = 'Album ';
    Col.Visible = false;
    arr.push (col);

    col.dataField = "Price";
    col.itemRenderer = new ClassFactory (adg_test_renderer);
    arr.push (col);

    adgActionScript.columns = arr;

    UNSUCCESSFUL ALTERNATIVE APPROACH

    /*
    col.dataField = "artist";
    adgActionScript.columns.push (col);

    col.dataField = 'Album ';
    Col.Visible = false;
    adgActionScript.columns.push (col);

    col.dataField = "Price";
    col.itemRenderer = new ClassFactory (adg_test_renderer);
    adgActionScript.columns.push (col);
    */
    }

    []] >
    < / mx:Script >

    < mx:Label text = "Explicit columns" / >

    < mx:AdvancedDataGrid
    ID = "adgExplicit".
    Width = "100%" height = "100%".
    sortExpertMode = "true".
    dataProvider = "{dpADGExplicit}" >
    < mx:columns >
    < mx:AdvancedDataGridColumn dataField = "Artist" / >
    < mx:AdvancedDataGridColumn dataField = "Album" visible = "false" / >
    < mx:AdvancedDataGridColumn dataField = "Price" itemRenderer = "adg_test_renderer" / >
    < / mx:columns >
    < / mx:AdvancedDataGrid >

    < mx:Label text = "columns ActionScript (ActionScript so works: Arist column should be hidden.)" Should see Album with data columns and price with the buttons. / >

    < mx:AdvancedDataGrid
    ID = "adgActionScript".
    Width = "100%" height = "100%".
    sortExpertMode = "true".
    dataProvider = "{dpADGActionScript}" >
    < / mx:AdvancedDataGrid >

    < / mx:Application >

    == Adg_test.mxml END =.

    If you are looking to add columns with ActionScript, follow this.

    var _advancedDataGrid: AdvancedDataGrid = new AdvancedDataGrid();

    var columns: Array = _advancedDataGrid.columns;

    Columns.push (new AdvancedDataGridColumn ('field1'));

    Columns.push (new AdvancedDataGridColumn ('field2'));

    Columns.push (new AdvancedDataGridColumn ('field3'));

    _advancedDataGrid.columns = columns;

    _advancedDataGrid.validateNow ();

  • Create graphics in actionscript

    Hello

    Im working on the production of graphics that can have a dynamic number of data series. Seems the best way to proceed is to produce the graphics in actionscript. I have it working so the graph shows as intended. but could not find a way to apply my effects in actionscript and mxml degraded...

    That is to say, this product bars blue friendly to my columns...

    < mx:ColumnSeries yField = "value" showDataEffect = "{interpolate}" >
    < mx:fill >
    < mx:LinearGradient >
    < mx:entries >
    < mx:Array >
    < mx:GradientEntry color = ratio between the "#C6D5DD" = "0" alpha = "100" / >
    < mx:GradientEntry color = "#336699" ratio = alpha "0.05" = "100" / >
    < mx:GradientEntry color = "# 24496' ratio = alpha"0.95"="100"/ >
    < mx:GradientEntry color = "#000000" ratio = "1" alpha = "100" / >
    < / mx:Array >
    < / mx:entries >
    < / mx:LinearGradient >
    < / mx:fill >
    < / mx:ColumnSeries >

    in actionscript, I can produce the ColumnSeries and the LinearGradients / GradientEntry, but can't see a way to connect the two.

    var colSeries:ColumnSeries = new ColumnSeries();
    colSeries.yField = "value";

    var linearGradient:LinearGradient = new LinearGradient();
    var gradientEntry:GradientEntry = new GradientEntry();

    cG1 var = new GradientEntry (0xC6D5DD, 0, 1);
    cG2 var = new GradientEntry(0x336699,0.05,1);
    cG3 var = new GradientEntry(0x24496D,0.95,1);
    var G.c.4 = new GradientEntry (0 x 000000, 1, 1);

    linearGradient.entries = [cG2, cG3, cG1, G.c.4];


    But how can I tell the ColumnSeries to use the LinearGradient in actionsctript?

    Also when you try to use the im ColumnSeries.showDataEffect met with "error: access of property may be undefined showDataEffect through a reference with static type mx.charts.series:ColumnSeries"... How can I set graphic effects in actionscript?

    Any help would be greatly appreciated

    Concerning
    Ash

    use setStyle for effect as well. Assuming an effect you set named "myInterpolate":

    colSeries.setStyle ('showDataEffect', myInterpolate);

    -Brian

  • create signatures with hyperlinks

    I'm a hotmail user and can't seem to create signatures with links to the facebooks, Web sites and adding my logo.  Please notify

    Create the signature in something like Word, including links and images, and then copy and paste it into the Hotmail signature (Outlook.com).

  • javax.management.InstanceNotFoundException: com.oracle.jps:type = JpsCredentialStore when creating credentials with credential store framework

    Hello

    I have an installation of WebLogic 11 g 1 material (on Windows Server 2012 with Oracle backend) and try to create credentials with credential store framework following steps inhttp://www.redheap.com/2013/06/secure-credentials-in-adf-application.html

    I tried to do with WLST (under Oracle\Middleware\oracle_common\common\bin) and get the following error:

    WLS: / WcsDomain/serverConfig > createCred (map = "ClayTablet.Sample", key is "TestKey", user = "TestUser", password = "blah", desc = "Test"key);

    Now to the tree of domainRuntime. It is a tree read-only with DomainMBean as the root.

    For further assistance, use the help (domainRuntime)

    COMMAND FAILED for an unknown reason, check the stack for more details trace

    Traceback (innermost last):

    Folder "system <>", line 1, in?

    File "C:\Oracle\MIDDLE~1\ORACLE~1\common\wlst\jpsWlstCmd.py", line 522 to createCred

    File "C:\Oracle\MIDDLE~1\ORACLE~1\common\wlst\jpsWlstCmd.py", line 504, createCredImpl

    at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:237)

    at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)

    at javax.management.remote.rmi.RMIConnectionImpl_1036_WLStub.invoke (unknown Source)

    to weblogic.management.remote.common.RMIConnectionWrapper$ 16.run(ClientProviderBase.java:918)

    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)

    at weblogic.security.service.SecurityManager.runAs (SecurityManager.java: 146)

    at weblogic.security.Security.runAs(Security.java:61)

    at weblogic.management.remote.common.RMIConnectionWrapper.invoke(ClientProviderBase.java:916)

    to javax.management.remote.rmi.RMIConnector$ RemoteMBeanServerConnection.invoke (RMIConnector.java:993)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    javax.management.InstanceNotFoundException: javax.management.InstanceNotFoundException: com.oracle.jps:type = JpsCredentialStore

    Thank you

    Yu

    P.S. I was using the command WLST under Oracle\Middleware\wlserver_10.3\common\bin to do the same thing and got a different error NameError: createCred and posted a question about that in virtue of How to create credentials under Bank of credentials?

    After searching the same error message in the community, I tried to move to WLST under Oracle\Middleware\oracle_common\common\bin and got the error posted here.

    Having extended my domain name with JRF and JRF WebService services asynchronous, I was able to run "createCred" and "listCred" and so on.

    Yu

  • create proxy with clips in mxf and multichannel?

    'Create proxies' with audio 8 channels (4096 x 2160 MXF AVC H.264 codec XAVC, only 2 registered channel) does not work. How can I solve this problem?

    This presets you try and what exactly is a failure?

    I tried a few clips XAVC with 8 audio channels (only the first two channels actually had audio) and create Proxies worked for me using the default QuickTime ProRes and GoPro CineForm presets, so a custom preset DNxHD.

    Are - what you happened to use the H.264 preset and get an error in the events Panel? (The selected preset does not support the type of audio channel of the clip). If so, what is expected, such as H.264 export / transcode does not support 8-channel audio.

  • Create letters with shapes

    Hi, if hundreds of years ago I saw a video with a guy of creating text with shapes. So much as it creates one'm ' using the rectangles and circles. I have recently lost this video and that you do not. I was wondering if someone can show me how do? It sorta looked like this. I use illustrator for about 3 weeks, just try to do that and I can't just.

    Start with circles and lines - don't forget: you can align points so they correspond exactly

    Select these anchor and remove

    Select the tracks that touch and join

    Apply line thick and round caps

    Object > path > offset path and to use agin round caps

    Apply thin line

  • How to use Add the media offline option when creating packages with conditioner creative cloud.

    Hi all

    AM creating packages with Creative could conditioner, need to include 'Extension Manager CS6 ' to my list of requests, I downloaded a version and trying to add to the list with the help of add the option offline media, but get the error as media is not appropriate etc...

    Can any body please let me know how to add media offline while we creating packages with Creative Cloud Packager.

    Thanks in advance.

    This is possible in theory, as long as the source media that you add is complete and unzipped. Also if 32 bit it cannot be added to a 64-bit package and vice versa.

    It's not really what this feature is designed for good. It is designed for DVD sets provided to customers who live in areas where poor internet infrastructure that cannot download apps via CCP.

  • I am trying to create layers with a JPEG originally published in LR6. I converted the JPEG in a TIF format for my PES 11. PSE does not recognize the file for purposes of superposition; None of the routes command works. Just to see if PES was grateful the

    I am trying to create layers with a JPEG originally published in LR6. I converted the JPEG in a TIF format for my PES 11. PSE does not recognize the file for purposes of superposition; None of the routes command works. Just to see if PES was grateful the file at all, I tried to turn the file. Fortunately, he rotates the photo and turned it back. Why the program allow me to create layers?

    You click on Expert in pse before trying to add layers?

    Or it is possible that the image is 16-bit/channel.

    In photoshop elements go to Image > Mode and click on 8-bit/channel and see if that makes a difference.

Maybe you are looking for