How to use my as3 file in flex

hi, I am new in flex and want to divert into flex. How to  use my as3 file into flex. Is there any sample tutor . so, that I could learn fast.

Please clarify. Is this .as file a class you previously used as a complonentcomponent you now wish to use as the main application?
If the .as file just has variables and functions you wish to access from your Flex app, use:
include "subfolder1/subfolder2/etc/MyASFile.as";
If you want to use classes from the file, do this:
import subfolder1.subfolder2.etc.MyClassName;
If this post answers your question or helps, please mark it as such.
Greg Lafrance - Flex 2 and 3 ACE certified
www.ChikaraDev.com
Flex / AIR Development, Training, and Support Services

Similar Messages

  • How can we display svg files in flex at runtime using FileReference? Actually we are trying to load

    how can we display svg files in flex at runtime using FileReference? Actually we are trying to load the svg file from the  local directory.

    This should give you the JRE version;
    System.out.println(System.getproperty("java.version"));
    and this should tell you where its running from;
    System.out.println(System.getProperty("java.home"));
    There are loads more system properties, check the JDK documentation for java.lang.System and look at the getProperties method which has a list.
    Stewart

  • How to use multiple video files??

    hi all,
    i am using flex 4 ...
    now i have designed video player..
    i used single flv file for execution..
    how to use more flv files in tis program???
    i have included program also..
    can any one reply for this...
    thanks in advance...
    regards,
    saran r
    video.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="init()" height="700" >
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import mx.core.UIComponent;
                import flash.events.NetStatusEvent;
                import flash.media.Video;
                import flash.net.NetConnection;
                import flash.net.NetStream;
                private var nc:NetConnection;
                private var stream:NetStream;
                public var videoDuration:Number;
                public var nsClient:Object = new Object();
                private var videoComp:Video = new Video();
                private var meta:Object = new Object();
                private var timer:Timer = new Timer(100);
                private var uiComp:UIComponent = new UIComponent();
                private function init():void
                    nc = new NetConnection();
                    nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    nc.connect("rtmp://localhost/saran");                 
                    this.addElement(uiComp);
                    uiComp.addChild(videoComp);
                    timer.addEventListener(TimerEvent.TIMER,timerHandler);
                    timer.start();
                private function netStatusHandler(event:NetStatusEvent):void
                    trace("Code ===>>>    "+event.info.code);
                    if(event.info.code == "NetConnection.Connect.Success")
                        connectStream(nc);
                private function connectStream(nc:NetConnection):void {
                    stream = new NetStream(nc);
                    videoComp.attachNetStream(stream);
                    stream.play("Terminator")
                    // stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    stream.client = nsClient//new CustomClient();
                    nsClient.onMetaData = metadataHandler;
                    trace("stream ===>>>    "+stream.currentFPS);
                    //responder = new Responder(onResult);
                    // nc.call("getStreamLength", responder, "bikes" );
                private function metadataHandler(metadataObj:Object):void
                    meta = metadataObj;
                    videoComp.width = metadataObj.width;
                    videoComp.height = metadataObj.height;
                    //positionBar.move(videoComp.x, ((videoComp.y + videoComp.height)+20));
                    //positionBar.width = videoComp.width;
                    trace("Duration ====>>>>   "+meta.duration);
                private function timerHandler(event:TimerEvent):void
                    //trace("Timer called.........."+stream.time);
                    //positionBar.setProgress(stream.time, meta.duration);
            ]]>
        </fx:Script>
    </s:Application>

    I have the same question but I am using two pc's

  • How does one upload a file from flex to a cfc

    How does one upload a file from flex to a cfc?   Can you do the file upload via remote object? I usually do uploads cia cfm but prefer the asnc capabilities of remote object calls.

    Hi,
    The issue here is myFile. For flex we need to pass this name as paramenter becuase it's not html form item like:
    <cfcomponent>
        <cffunction name="uploadFile" access="remote" output="false" returntype="void">
        <cfargument name="file" required="Yes" type="any">
            <cffile action="upload" filefield="#arguments.file#" destination="C:\temp\" nameconflict="makeunique">
        </cffunction>
    </cfcomponent>
    From flex I'm getting the file using fileReference like:
    private function browseAndUpload():void
                    fileReference = new FileReference();
                    fileReference.addEventListener(Event.SELECT,fileReference_Select);
                    fileReference.addEventListener(Event.CANCEL,fileReference_Cancel);
                    fileReference.browse();
                private function fileReference_Select(event:Event):void
                    fileReference.addEventListener(ProgressEvent.PROGRESS,fileReference_Progress);
                    fileReference.addEventListener(Event.COMPLETE,fileReference_Complete);
                    fileReference.addEventListener(IOErrorEvent.IO_ERROR,onLoadError);
                    //fileReference.upload(request);
                    fileName = fileReference.name;
                    myFile.htmlText = fileReference.name;
                    SM_RO.importNSA();
    filerReference have an upload method to upload the file but I can't use that becuase I need to process my upload with my cfc.
    I'm getting an error:
    Failed to import the file. The cffile action="upload" requires forms to use enctype="multipart/form-data". Please also make sure the file is not open.
    I can't find the way to setup the enctype becuase again i can have html form items in flex, or I can?
    Thanks
    Johnny

  • How to render a pdf file within flex

    Hi,
    could any one suggest, how to open a pdf file within flex.
    we have an application built on flex3.
    please suggest.
    regards,
    John

    Hi,
    Is it a Flash or AIR app?
    If it's an AIR app, then use the HTML/web, where you then can navigate to the URL of your PDF.
    If it's an Flash app, then set the wmode to transparent: http://kb2.adobe.com/cps/127/tn_12701.html#main_Using_Window_Mode__wmode__values_
    And then create an iframe in your HTML page, where you load you PDF, set the iframe z-index, so it gets shown on top of the Flash object. Then you kan use the javascript bridge to interact with the iframe.
    Best regards
    Martin

  • How to use a key file in the FTP Task using and SSL connection

    In the past I have used this code to set the FTP pass word in an FTP component task in SSIS.
    Does anyone know how to use a Key file in an SSL connection to download a file from an FTP site?  If not can you tell me where I can get the C# code examples to learn how to create a script task or if there is another way in SSIS to download large files
    from an SSL FTP site?  Thank you for any help offered.
    public void Main()
    ConnectionManager FTPConn;
    FTPConn = Dts.Connections["FTPServer"];
    FTPConn.Properties["ServerPassword"].SetValue(FTPConn, Dts.Variables["FTPPassword"].Value);
    Dts.TaskResult = (int)ScriptResults.Success;
    Antonio

    You can use SFTP for this.
    This is a way of implementing SFTP in SSIS using standard tasks 
    http://visakhm.blogspot.in/2012/12/implementing-dynamic-secure-ftp-process.html
    also see
    http://blog.goanywheremft.com/2011/10/20/sftp-ftps-secure-ftp-transfers/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to use an SWF file generated by Flex as a Stand Alone file

    Whenever we compile an MXML file, there is an SWF file
    generated. This file is not a standalone file and will not work on
    any other computer expect on the computer where there is a Project
    file created by the Flex builder.
    Why am I not able to use that SWF file as a stand alone file?
    If I want to use that SWF file alone as in the SWF generated
    by Flash what do I have to do?
    Regards,
    Rashmi

    The swf file will run from anywhere. What's it doing when you
    try to open it on another machine?
    The only thing I can think of is if you're getting a security
    violation in which case you would need to read about Flash Player
    trust files and security.
    -Mac

  • How to create a SWC file in flex

    Can any one help me giving step by step information of how to create .swc file in flex..Iam a starter to this...Pls reply

    You need to create Flex Library project & after compilation you will find project_name.SWC in bin-debug folder.
    referr
    http://www.adobe.com/devnet/flex/articles/flex_swc.html
    http://www.daveoncode.com/2009/04/07/deploy-and-work-with-flex-swc-library/
    http://kennethsutherland.com/2009/06/12/simple-tip-3-utility-swc-library-project/
    *If this information is useful, then mark this post as such.

  • Using MXP (package) files in Flex?

    So, many of components and code libraries of different kinds and flavours get distributed in the lesser known MXP format, which many believe makes for "ideal" distribution. My problem is I am a skilled ActionScript/Flex/Flash developer who not always has access to a Windows box, and even if I have, I can't seem to find any valuable information on how to open/extract content in this format. The only thing I know is that it is obviously a drag-and-drop operation in Flash CS* to import and use these files, but most likely I will be using Flex. Is there any chance of using these files in Flex instead? I have to use several code libraries that are only distributed as those MXPs, which does not seem to be a very "open" format.
    Thanks.

    Thanks.
    MXP files do not appear to be any variation of ZIP archive format.
    I will be using whatever as long as I can make use of the component itself, which is packaged as an MXP. Inside this MXP there is an MXI file too. I do not have any control over the distribution format of this component, these are developed by another party. All I need it to make use of the component(s). If this involves opening the MXP, extracting the MXI, and getting an ActionScript or SWF bytecode out of it, fine. I really do not care much for the format, I just need my application to make use of the component itself.
    Are there any tools that convert an MXP package to something less binary perhaps? Or something that Flex can use at least?
    After all the component is the same bytecode that Flash Player uses anyway, compiled from either Flex or Adobe Flash.

  • How to use a CSS file  in a jspx page..

    I'm using JDev 10.1.3.4.
    I would like to know how can i use a CSS file in a JSPX page..
    there is this file: public_html\WEB-INF\temp\adf\styles\cache\oracle-desktop-10_1_3_4_0-en-ie-6-windows-s.css
    How do I make use of this is my jspx page?
    Also how do i use the style class in property inspector?
    What should be the path of "oracle-desktop-10_1_3_4_0-en-ie-6-windows-s.css"?
    Also please tell me what changes I have to make in all the other files like web.xml or adf-faces-config.xml.
    Im using web application template using (EJB,Toplink and JSF)
    Please suggest the detailed steps as I'm new to JSF.
    Thanks ,
    Shri

    under view put a new tag
    <f:view>
    <ui:script url="page.js"/>
    and thats it

  • How to use an .xsl file to transform input XML to re-formatted output XML?

    Hello,
    I have a .xml file from a report that I want to use a stylesheet to transform into a different .xml format.
    I am reading that I can create a .xsl file to read my input and then transform it to a new output .xml file.
    How do I load this into the Apps?
    I tried creating a template definition and loading the .xsl in as type 'XSL-TEXT' and also, I added
    <?xml-stylesheet type="text/xsl" href="Transform.xsl"?> to my xml data source. The output looked the same as the input.
    Has anyone done this before? Any suggestions would be great!
    Thanks
    -CC

    This is how I use e4x with HTTPService:
    import mx.collections.XMLListCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable] private var claimsXLC:XMLListCollection;
    private function claimsHandler(evt:ResultEvent):void{
        claimsXLC = new XMLListCollection(evt.result..claim as XMLList);
    XML data is being returned, but I use XMLList to create the XMLListCollection.
    If this post answers your question or helps, please mark it as such.

  • Using a video file in Flex ?

    I've been trying to use one video file in my flex project but the problem here is that after giving the source location it's not showing anything except a black pane and the format of the video file is in .AVI.I'm using VideoDisplay class to show the video.
    Any help on this guys...

    Just check it with the .flv files. If it works fine for them
    then your code is fine and you have to search for your format or convert it in flv my any means.
    with Regards,
    Shardul Singh Bartwal

  • How to use a excel file to create a service component?

    Dear all,
       I want to use a excel file to create a service to be my data source. I used the wizard to do that but i always got a message. "The data format is not valid, fields in each record must be delimited by tab charactors, and each record seperated by new line charactors". How should I reformat my excel file to fit the requirements? I have already chang the field`s format into 'text' type. Thx ^^

    Hi Louis,
    [Here|http://img125.imageshack.us/my.php?image=exceltestlo7.jpg] is the result of your data.  I downloaded your excel sheet and created a simulated service in 7.1.1 and it works fine.
    Below are the steps:
    1. Go to Tools -> service component wizard
    2. The popup opens : Step1 :  Enter the name of your service component
    3. Go to Excel spreadsheet Copy the data for which the service needs to be created.
    4. Step 2 : Paste the copied Excel data in the popup
    5. Step 3 : Define Input -> just click next
    6. Step 4: Define Conditions -> just click finish.
    Let me know if it helps.
    Good Luck,
    Dharmi

  • How to use a c file in LabVIEW

    Hi All,
    I have a c file which communicates through serial port and J1850 protocol. I want to use the C file in labview and do the communication through serial port.
    Can any one give me an idea how I have to use the c file in LabVIEW.
    Thank you.!
    ---------------- Be Good. Do Good. ---------------------

    Have you tried reading the LabVIEW Help or even searching this web site? This question has been asked MANY times. There's a section in the LabVIEW Help called "Calling Code Written in Text-Based Programming Languages." There are also several articles written on this. Here's just one: https://decibel.ni.com/content/docs/DOC-1690
    Please do the research and then come back with a more specific question.

  • How to use Parameter from file in window env

    hi All,
    Please tell me the how I can get Parameter from Saved file and can use in other file.
    EX:
    I want to use Password file for each instance like
    ORCL-manager
    ORCL_1-tiger
    ORCL_2-*****
    how to call this file in other file. using pasword for instance
    any help would be appereciated.
    Regards,

    You can use SFTP for this.
    This is a way of implementing SFTP in SSIS using standard tasks 
    http://visakhm.blogspot.in/2012/12/implementing-dynamic-secure-ftp-process.html
    also see
    http://blog.goanywheremft.com/2011/10/20/sftp-ftps-secure-ftp-transfers/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Maybe you are looking for

  • HP LaserJet 400 colorMFP M475dw scan to email problems

    Hi all! I'd very much appreciate a solution to my agony. We recently purchased a HP LaserJet 400 colorMFP M475dw multifunction printer. Now I'm trying to set it up (browser administration -> Scan --> Outgoing E-mail Profiles) to send scanworks by ema

  • Connecting a Nokia 9500 to wifi.

    Hello hope you can help . My brother has just got a Nokia 9500 and wants to get connected onto the internet via my wifi. Cant get it to work. A ny help much appriciated.

  • Display Text as a Key Figure

    Hi peeps, I would like to display a text half way along my bex report i.e. would like to display 4 chars ,then 5 kfs then some text and then some more kfs. i am currently doing this using a Formula Variable to Replace a KF value with a char, and this

  • ORA 12154 on OCIServerAttach

    Hi! I get an ORA 12154 when calling OCIServerAttach. The OCIEnvCreateand two OCIHandleAlloc calls are OK. This setup used to work with 32bit pcs. But on 64bit pcs the troubles arise. If we do tnsping on the the same server name, it responds. So I can

  • Table : Production order status

    Hi all , i need the Table in which the Production order status will appear . i tried AFKO and AFRU but not finding the same . Pl tell me the field name if possible . Regards