How to use flex 4 component inside Flex 3 custom component

<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"   >
// I would like to use the namespaces below so that I can use some of the Flex 4 components in this mx:VBox component.
// Note that this is a custom component and not the application file.
xmlns="http://ns.adobe.com/mxml/2009"
    xmlns:fx="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/halo"
</mx:VBox>
Thanks.

Alex, I was looking forward to your reply to one of my posts that you answered a couple of days ago. It has not been resolved, even though it said "answered," here is the post:
http://forums.adobe.com/thread/445779?tstart=0
Regarding this post, I am getting some errors with the code I posted above; give it a go and you will see.
Thanks.

Similar Messages

  • How to use virtual keyboard in flex application

    hi..
    i am using flash builder 4,
    how to use virtual keyboard in flex?
    if any one aware of this pls reply me.......
    saran r

    hi,
    how to code for these buttons  "control,alt,delete,insert and spacebar".
    can u help me  how to program?
    i have attached the mxml code with this,
    virtualkeypad1.mxml
    <?xml  version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="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)"  viewSourceURL="srcview/index.html">
         <fx:Script>
             <![CDATA[
                 import flash.utils.getQualifiedSuperclassName;
                 import mx.events.FlexEvent;
                 private var inpText:String = 'inp1';
                 private var shiftState:Boolean = false;
                 private var capsState:Boolean = false;
                 protected function  keyboard_clickHandler(event:MouseEvent):void
                     this[inpText].text =  this[inpText].text+(event.currentTarget as Button).label;
                     if (shiftState == true) shift_clickHandler(null);
                 protected function caps_clickHandler(event:MouseEvent):void
                     capsState = !capsState;
                     if (capsState == true)
                         currentState = "SHIFTED" else currentState =  "PRIMARY";
                 protected function tab_clickHandler(event:MouseEvent):void
                     this[inpText].text = this[inpText].text+"    ";
                 protected function shift_clickHandler(event:MouseEvent):void
                     shiftState = !shiftState;
                     if (shiftState == true)
                         currentState = "SHIFTED" else currentState =  "PRIMARY";
                 protected function enter_clickHandler(event:MouseEvent):void
                     this[inpText].text = this[inpText].text+"\n";
                 protected function  backspace_clickHandler(event:MouseEvent):void
                     var tmpStr:String = this[inpText].text;
                     this[inpText].text = tmpStr.substr(0,tmpStr.length-1);
                 protected function  application1_creationCompleteHandler(event:FlexEvent):void
                     inp1.setFocus();               
                 protected function focus_enterHandler(event:MouseEvent):void
                     inpText = event.currentTarget.id;
             ]]>
         </fx:Script>
         <s:states>
             <s:State name="PRIMARY"/>
             <s:State name="SHIFTED"/>
         </s:states>
         <fx:Declarations>
             <!-- Place non-visual elements (e.g., services, value  objects) here -->
         </fx:Declarations>
         <s:TextInput id="inp1" y="36" width="151" horizontalCenter="0"  click="focus_enterHandler(event)" y.PRIMARY="239"  horizontalCenter.PRIMARY="42" width.PRIMARY="199"  height.PRIMARY="31"/>
         <s:Group id="keyboard" width="661" height="184"  horizontalCenter="0" y="300" focusEnabled="false">
             <s:Button x="5" y="5" label="~" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="`"/>
             <s:Button x="49" y="5" label="!" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="1"/>
             <s:Button x="93" y="5" label="@" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="2"/>
             <s:Button x="137" y="5" label="#" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="3"/>
             <s:Button x="181" y="5" label="$" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="4"/>
             <s:Button x="225" y="5" label="%" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="5"/>
             <s:Button x="269" y="5" label="^" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="6"/>
             <s:Button x="313" y="5" label="&amp;" height="43"  width="44" fontSize="24" fontWeight="bold"  click="keyboard_clickHandler(event)" label.PRIMARY="7"/>
             <s:Button x="357" y="5" label="*" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="8"/>
             <s:Button x="401" y="5" label="(" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="9"/>
             <s:Button x="445" y="5" label=")" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="0"/>
             <s:Button x="489" y="5" label="_" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="-"/>
             <s:Button x="533" y="5" label="+" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="="/>
             <s:Button x="577" y="5" label="Backspace" height="43"  width="80" fontSize="11" fontWeight="bold"  click="backspace_clickHandler(event)"/>
             <s:Button x="5" y="48" label="Tab" height="43" width="67"  fontSize="12" fontWeight="bold" click="tab_clickHandler(event)"/>
             <s:Button x="72" y="48" label="Q" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="q"/>
             <s:Button x="116" y="48" label="W" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="w"/>
             <s:Button x="160" y="48" label="E" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="e"/>
             <s:Button x="204" y="48" label="R" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="r"/>
             <s:Button x="248" y="48" label="T" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="t"/>
             <s:Button x="292" y="48" label="Y" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="y"/>
             <s:Button x="336" y="48" label="U" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="u"/>
             <s:Button x="380" y="48" label="I" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="i"/>
             <s:Button x="424" y="48" label="O" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="o"/>
             <s:Button x="468" y="48" label="P" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="p"/>
             <s:Button x="512" y="48" label="{" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="["/>
             <s:Button x="556" y="48" label="}" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="]"/>
             <s:Button x="600" y="48" label="|" height="43" width="57"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="\"/>
             <s:Button x="5" y="91" label="CapsLock" height="43"  width="80" fontSize="12" fontWeight="bold"  click="caps_clickHandler(event)"/>
             <s:Button x="85" y="91" label="A" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="a"/>
             <s:Button x="129" y="91" label="S" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="s"/>
             <s:Button x="173" y="91" label="D" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="d"/>
             <s:Button x="217" y="91" label="F" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="f"/>
             <s:Button x="261" y="91" label="G" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="g"/>
             <s:Button x="305" y="91" label="H" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="h"/>
             <s:Button x="349" y="91" label="J" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="j"/>
             <s:Button x="393" y="91" label="K" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="k"/>
             <s:Button x="437" y="91" label="L" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="l"/>
             <s:Button x="481" y="91" label=":" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY=";"/>
             <s:Button x="525" y="91" label="&quot;" height="43"  width="44" fontSize="24" fontWeight="bold"  click="keyboard_clickHandler(event)" label.PRIMARY="'"/>
             <s:Button x="569" y="91" label="Enter" height="43" width="88"  fontSize="24" fontWeight="bold" click="enter_clickHandler(event)"/>
             <s:Button x="5" y="134" label="Shift" height="43" width="106"  fontSize="24" fontWeight="bold" click="shift_clickHandler(event)"/>
             <s:Button x="111" y="134" label="Z" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="z"/>
             <s:Button x="155" y="134" label="X" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="x"/>
             <s:Button x="199" y="134" label="C" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="c"/>
             <s:Button x="243" y="134" label="V" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="v"/>
             <s:Button x="287" y="134" label="B" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="b"/>
             <s:Button x="331" y="134" label="N" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="n"/>
             <s:Button x="375" y="134" label="M" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="m"/>
             <s:Button x="419" y="134" label="&lt;" height="43"  width="44" fontSize="24" fontWeight="bold"  click="keyboard_clickHandler(event)" label.PRIMARY=","/>
             <s:Button x="463" y="134" label="&gt;" height="43"  width="44" fontSize="24" fontWeight="bold"  click="keyboard_clickHandler(event)" label.PRIMARY="."/>
             <s:Button x="507" y="134" label="?" height="43" width="44"  fontSize="24" fontWeight="bold" click="keyboard_clickHandler(event)"  label.PRIMARY="/"/>
             <s:Button x="551" y="134" label="Shift" height="43"  width="106" fontSize="24" fontWeight="bold"  click="shift_clickHandler(event)"/>
         </s:Group>
    </s:Application>
    thanks in  advance,
    saran r

  • Can I use axis.jar in my custom component

    Can I use axis.jar in my custom component.
    Is there any license need to user this jar ??
    Thanks

    In our UCM setup axis has been implemented in a custom component to consume webservices. As Axis falls under the Apache license you can freely import it in your custom java classes.

  • How to use the bind variable in custom.pll

    Hi,
    How to use the bind variable in custom.pll.Its through error.
    any one gem me.
    very urgent.
    M.Soundrapandian.

    Hello,
    Please, ask this kind of questions in the e-business forum.
    Francois

  • How to use standard function keys as custom keys

    how to use standard function keys as custom keys.
    i have encountered that problem while developing a screen, there i'm supposed to use standard function key F2 ( which actually meant for choose) for clearing the screen fields where the cursor is present and f1 for saving data that entered in screen fields, etc...
    kindly help me out.

    Hi ,
    Solution to use SAP reserve function keys F1 .. F4 (mostly this requirement comes up for RF screens) can be acheived by assigning your new Function code using the Menu path Utilities --> F key Consistency in the Menu Painter (SE41) . Once you assign your cutom function code to the standard Fn keys the only remaining step is to make sure that you set a curson on any of the field on sceen by using the Key Word "SET CURSOR" .
    If you dont use the key word SET CURSOR in the PBO of the screen then you might not see any response for F4.
    Thanks

  • How to use two dimensional array in custom.pll

    HI
    How to use two dimensional arrays in custom.pll
    I tried by the following way .
    type ship_array is table of number index by binary_integer;
    type vc_array is table of ship_array index by binary_integer;
    But I am getting the error as that
    A plsql table may not contain a table or a record with composite fields.
    Please tell me the way how to use them

    which forms version are you using? two dimensional arrays are available in >= 9i if memory serves.
    regards

  • How to use Java code inside WebDynpro-ABAP

    Hi,
        How to use Java code inside WebDynpro-ABAP.
    Could any one provide sample code.
    Cheers,
    Sam

    Hi Sam,
    We can't Bring Java Inside the ABAP. Both are running in different Environments.
    and also ABAP Codes are runs on BASIS.
    -Basis is a middleware between ABAP codes and Ur OS.
    -Contains set of programs to load,RUN,intepret the ABAP program..
    So Both are Different.
    Regards,
    Ramganesan K.

  • How to use image and text in same component

    Hello
    Do you know how to use image and text in same component in java ?
    because i need this in my project ,which is chat application , to
    put the received text and any image if it is need within the text

    thanks levi_h
    JTextPane class extends JEditPane and allows you to embed
    images or other components within the text managed by the component

  • How to use advertisements and announcments in Customer UI iStore?

    hi,
    How to use advertisements and announcments in Customer UI iStore?
    Regards,
    Ashish

    Please check
    How To Setup And Use Tracking With Campaign Workbench Web Advertising Schedules (Doc ID 303508.1)

  • JavaFX component inside a Java component?

    Hi,
    To place a Java component inside a JavaFX component is easy using javafx.ext.swing.SwingComponent.wrap(), like the following code:
        var splitPane = new JSplitPane(); // Java component
        scene: Scene {
            content: [
                SwingComponent.wrap(splitPane)
        }But, how can one do the other way around, i.e. how to place a JavaFX component inside a Java component?
    If I try it like this:
    var myTextBox = TextBox {
        text: "SampleText"
        columns: 12
        selectOnFocus: true
    splitPane.setLeftComponent(myTextBox);I get an error saying:
    setLeftComponent(:java.awt.Component) in javax.swing.JSplitPane cannot be applied to (javafx.scene.control.TextBox)

    Oh, crap :-(
    This means that if you don't want to use JFXtras, and if you really need a Java component on a high level in your UI-design, you'll need to go Java all the way since you cannot incorporate JavaFX nodes anywhere...
    Can't believe Sun claims a friendly Java-JavaFX interoperability when it's actually just one-way.

  • How to use FC to make a sub-component for Flex

    Most of the examples and tutorials I've seen so far assume you are creating the app itself in FC.
    However, what I need to do is create a custom component that will be a "screen" in a large Flex app, like a page in a Wizard.
    So if I was doing this without FC, I'd make a new mxml component in Flex, e.g. "WizardStep.mxml" and then in the main app,
    <mx:ViewStack>
         <h:WizardStep id="one" label="Step One" />
         <h:WizardStep id="two" label="Step Two" />
    </mx:ViewStack>
    For example, assuming I have set up the namespace "h" to like "com.handycam.*"
    How would I accomplish this scenario if "WizardStep" is what I have been building in FC?

    Thanks for your answer!
    Unfortunately it still doesn't work.
    In FC I used the file menu item "publish as swf" ( or however it's called in English -
    I'm also struggling with the -unwanted- German workspace terms). This generated
    the deploy-to-web and run-local folders. In Flex3, I imported haupt.swf (=main.swf)
    from the run-local folder.
    When I use the imported file in the Image tag with the
    loadForCompatibily attribute set to "true",the application compiles,
    opens the IE, the remaining LinkBar buttons are not affected - they
    show/run the Flash Pro .swfs and their controls,
    but the attempt to access the .swf in question produces:
    VerifyError: Error #1053: Illegal override of z in mx.core.UIComponent.
    at flash.display::MovieClip/nextFrame()
    at mx.managers::SystemManager/deferredNextFrame()[C:\autobuild\3.2.0\frameworks\projects\fra mework\src\mx\managers\SystemManager.as:319]
    at mx.managers::SystemManager/preloader_initProgressHandler()[C:\autobuild\3.2.0\frameworks\ projects\framework\src\mx\managers\SystemManager.as:2945]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.preloaders::Preloader/timerHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\ src\mx\preloaders\Preloader.as:398]
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()
    The alternative approach:
    <mx:SWFLoader x="3" y="35" width="970" height="425" loadForCompatibility="true" source="insets/haupt.swf"/>
    produces:
    VerifyError: Error #1014: Class flash.text.engine::TextLine could not be found.
    at global$init()
    If I code the SWFLoader tag as:
    <mx:SWFLoader x="3" y="35" width="970" height="425" loadForCompatibility="true" source="
    @Embed(source='insets/Haupt.swf')"/>
    I get the same errors as I did for the Image tag approach.
    Hope this helps.

  • How to use AMFPHP Objects in Flex

    Hi,
    I have been successful in getting amfphp to return PHP objects, the question now is how can I make Flex aware of the objects?
    I am invoking a remote object and the objects are returned as a result. Can they be used directly or should I use XML?

    Hmm, your code seems a bit to complicated. Here's what I do:
    The RemoteObject:
    <mx:RemoteObject id="PHPGateway" source="yourAMFPHPClassName.ThePHPFile" destination="amfphp" showBusyCursor="true">
        <mx:method name="theFunctionYouWantToCall" result="myFunctionResultHandler(event)" fault="myFunctionFaultHandler(event)"/>
    </mx:RemoteObject>
    Observations:
    1. yourAMFPHPClassName is the name of the folder in amfphp\services that contains the PHP classes.
    2. ThePHPFile is the PHP class file (without the extension) in the yourAMFPHPClassName folder.
    3. You need the <mx:method name="..." .../> to define the function in the PHP class you want  to call. The theFunctionYouWantToCall must be the exact name of the function in the PHP class (case sensitive).
    The ActionScript part:
    //THE BELOW EXAMPLE ONLY WORKS IF THE PHP FUNCTION RETURNS A SINGLE VALUE
    //This means the PHP function has a return statement like this: return $value; or return "Test";
    private function myFunctionResultHandler(event:ResultEvent):void
    var PHPResult:String=String(event.result);
    Alert.show(PHPResult);//will show what the PHP class returned
    //THE BELOW EXAMPLE SHOWS HOW TO PASS MULTIPLE DATA TO FLEX
    //This means the PHP function has a return statement like this:
    //$returnValue=array();
    //$returnValue['name']="George";
    //$returnValue['age']=$age;
    //return $returnValue;
    private function myFunctionResultHandler(event:ResultEvent):void
    Alert.show("Name: "+event.result.name);
    Alert.show("Age: "+event.result.age);
    //THE FAULT HANDLER
    private function myFunctionFaultHandler(event:FaultEvent):void
    Alert.show("Data could not be acquired.");

  • How to use fla file in Flex Builder 3?

    Is there a way to do it?

    I got these files also. But how to use Flash's fl.transitions. package with Flex.
    Flash and Flex are doing transitions very differently.
    In Flex, for example,
    Define a transition effect: <mx:WipeLeft id="wl"/>
    Use it: <mx:Canvas id="home" ... showEffect="wl">
    Flash uses TransitionManager:
    import fl.transitions.*;
    import fl.transitions.easing.*;
    var myTM:TransitionManager = new TransitionManager(my_mc);
    myTM.startTransition({type:Wipe, direction:Transition.OUT, duration:3, easing:Strong.easeOut, startPoint:1});
    How to define the MovieClip - "my_mc"? Both Flex and Flash have flash.dispaly.MoiveClip. Are they the same?

  • How to use cairngorm framework in flex 4?

    Hi Everyone!
    Right now i am working with Flex 3.5 sdk using cairgorm architecture. Now i want to move to Flex 4 sdk with cairgorm architecture. I tried to use the cairngorm architecture in flex 4 sdk. But i did not get the output.
         Please anyone let me know how to use the cairngorm artchitecture in flex 4 sdk.
    Thanks in advance.!

    Read about Presentation Model. Refactor towards that and you should fine.
    C

  • How to use frame lable in flex

    I made a movie clip in flash cs4, and a set a frame lable for a frame in this movieclip, but I don't know how to use this frame lable. For example, I want to use the gotoAndStop function to stop at that frame, but it doesn't work.

    Hi
    Here I am placing the syntax and example
    syntax:
    movieclip.gotoAndPlay("framelabel");
    example:
    mc1.gotoAndPlay("intro");
    for further details:
    http://livedocs.adobe.com/flex/3/html/help.html?content=Working_with_MovieClips_1.html
    If this post answers your question of helps. Please mark it as such

Maybe you are looking for

  • Comp 3 new user needs help !! (please)

    Not sure which setting to use, have tried MPEG-2 5.0 2 pass and had no audio. Do I need to select audio seperately (eg AIFF 48-16). Anyway, now I can't seem to submit. I've daged and dropped the destination (desktop) and I've draged and droped the so

  • Need to REMOVE Apple ID account from previously owned iMac

    I recently purchased a previously owned iMac and need to REMOVE its previous Apple ID account to remove apps that they obviously purchased. Can this be done? I am being prompted to update these apps and when I try, I am asked to enter this OLD accoun

  • Splitting Large internal tables

    Hi All, How to split large internal table into smaller ones of fixed number of lines. The total number of lines are not known and is subjected to vary. Regards, Naba

  • 5230 - Loading sounds Via Computer

    The instruction manual for my Nuron 5230 said I could hook the USB to the computer and access the phone as a mass storage device. If I have ringtone files that I've downloaded, which folder do I put them in when the Windows Explorer window comes up?

  • Php preview in browser

    I am trying to preview .php files. When I pick Firefox everything is displayed fine. When I pick IE a dialogue box pops up asking weather I want to open or save the file. Any help would be very appreciated.