Invoke an application using mxml or action script

Hi all
I am using flex 2.0 beta 3. And i would like to know if any
method is there to invoke a software using mxml or action script.
I tried with URLLoader and URLRequest to load and open a
file, with a hope that the file will open in the default program
that i configured for that file to open. But i got an error saying
Stream Error.
Can anybody guide me to resolve this issue ..
Rakesh

Here is one possible solution:
You can use the ExternalInterface (
http://livedocs.macromedia.com/flex/2/langref/flash/external/ExternalInterface.html)
class to communicate with JavaScript. JavaScript can then popup the
media player very easily like this:
http://www.webreference.com/programming/javascript/jf/column5/index.html
The documentation on the ExternalInterface class has a nice
example (in the bottom of the page) on how to communicate with
JavaScript in a browser. Hope this helps,
-george

Similar Messages

  • Difference in using the same component made in mxml or action-script

    Hi,
    I made a sample project to show a kind of bug in the SuperTabNavigator component of FlexLib
    In this sample you can see that using the same component (made in both mxml or action-script) can make a difference
    I'm just wondering why ?
    Thanks
    Here is what i've posted :
    What steps will reproduce the problem?
    1. Create a button to dynamically add new tab with icon on a SuperTabNavigator
    2. Click on this button to add new tabs
    What is the expected output?
    - The expected output is tabs added without abnormal behavior
    What do you see instead?
    - Every time a new tab is created the one who had the focus has its content
    (icon + label) moving from the top-left of the tab to its original position
    Please provide any additional information below.
    Configuration:
    - Flex Builder 3 in Eclipse
    - FlexLib 2.3
    Sample:
    (see attached file)
    There is two type of tab, one in action-script and one in mxml
    They both are equal
    - Adding a new action-script tab to SuperTabNavigator works fine
    - Adding the same tab but an mxml one doesn't
    - Adding a new action-script or mxml tab to TabNavigator works fine
    -> meanings that the issue comes with SuperTabNavigator
    - Adding a new mxml tab to both SuperTabNavigator and TabNavigator at the
    same time makes TabNavigator to get the same bad behavior
    Remarks:
    - Tried everything but i'm really stuck
    - Weirdly, removing the PopUpButton correct the issue
    - In the same way if you keep adding action-script tab it automatically scroll to the
    last tab. And if you do the same with mxml tab then it add the tab at the end and
    scroll to the first one.
    => what could be the difference between using action-script or mxml object ?

    Here is one possible solution:
    You can use the ExternalInterface (
    http://livedocs.macromedia.com/flex/2/langref/flash/external/ExternalInterface.html)
    class to communicate with JavaScript. JavaScript can then popup the
    media player very easily like this:
    http://www.webreference.com/programming/javascript/jf/column5/index.html
    The documentation on the ExternalInterface class has a nice
    example (in the bottom of the page) on how to communicate with
    JavaScript in a browser. Hope this helps,
    -george

  • Not able to convert my application file from mxml to Action Script

    Hi,
        In my mobile project I want to convert my application file from mxml to ActionScript.When I do this I get error and when I digged into the code I found that the error comes in preloader class initialize method as preloader property in System Manager class is null(line 2026 in SystemManager class).it actually represents the splashScreen class.When I tried to set the splash Screen the document says we cannot set this property from action script.
       I know we have an option of action script mobile project but it doesnt recognise TabbedViewNavigatorApplication.
    So how can I overcome the problem.

    I get the following error:
    TypeError: Error #1007: Instantiation attempted on a non-constructor.
    at mx.preloaders::Preloader/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\p reloaders\Preloader.as:261]
    at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()[E:\dev\4.5.1\frameworks\projects\ framework\src\mx\managers\SystemManager.as:2103]
    at mx.managers::SystemManager/initHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\m x\managers\SystemManager.as:2588]

  • Using  FDM Import Action script to import data from ERPI table "tdataseg_t"

    Hi Experts
    I have extracted data from EBS using ERPI and loaded into the intermediate table "tdataseg_t"
    I am trying to use Import Action script within FDM to extract data from "tdataseg_t" table (where ERPI extract data is stored) as i could not use the normal import script.
    Requirement : I have to restrict the custom 2 dimension based on Account dimension.
    Dim Account
    Account = ???? ( i am struck here)
    If Account = 1000 to 5000 Then
    Custom2 = Right( product , 5)
    End If
    but , I could not find the exact syntax to call the Account dimension from the "tdataseg_t" table.
    Please Advise
    Thanks
    Sak
    Edited by: user12292415 on Feb 26, 2012 1:19 AM

    Hello,
    Importing data via a manual script defeats the purpose of ERPi. As it will not provide you an audit trail, drill-through/drill-back, etc.
    Your best bet is to use the default settings by the software. Just because it returns more records than you want is not a bad thing. You can conditionally change/alter the information either in an EventScript inside of FDM or by mapping the un-needed information to IGNORE.
    Thank you,

  • Developing ios/android game using flash and action script

    I'm completely new to this, I have done a bit of research about using flash to create ios/android apps, but one thing really confuses me is,
    should I create my game in flash lite or in air? I know swf format will not be supported, so i will leave that one out...
    If using air format you need to install the air application in your iphone or andriod devices before the game can be played?
    Is it possible not to use air for apps development using flash?
    Since it is somehow non-user friendly as users were prompt to download and extra application before any game can be played...
    thanks for the help in advance...

    You want to use AIR not FlashLite - for iOS the end user doesn't need to install the AIR runtime, on Android they will however. But it's painless...
    You don't need AIR for apps in Flash, but you do need to publish using AIR if going to iOS or Android.
    Be sure to get AIR 2.7 and copy it over 2.6 - CS 5.5 installs with 2.6 which runs much slower on iOS, than does 2.7

  • Je souhaite convertir une application Flash écrite en Action Script 2.0 en 2007 ! par une application Flash plus récente sans ré-écrire le code. Merci pour votre aide

    Bonjour, Voilà une question classique déjà posée. Je viens de sortir une application rangée dans mes tiroirs écrites de code  il y a plus de 8 ans, très coûteuse à réécrire (en temps et en coût) !
    Merci pour votre aide.

    What do you want to convert the file to?  If it is an AS2 file and you want it to remain an AS2 file then there is no need to convert it since it is what you want it to be. (It is possible the translator did a terrible job with translating your posting to English).

  • Using html in action script.

    I have a text field but I want to put in an image in the text field. It will not let me load it up so I can view the image on flash.
    I have it set like this:
    [quote]
    background.htmlText = "<img src='http://localhost/background.jpg' />";
    [/quote]
    Every time I view it, it doesn't give me an error or anything but it will not load the image.
    Can someone help me out?

    It is set that way.
    in flash CS5, I made a text field that is set to dynamic. Under "Character", I selected "<>" in there for HTML format. It doesn't work.
    I told you that the image is correct. You can prove me wrong by making a example image, and an example flash file that I can open up into flash CS5 and zip it up and let me see it. I'm telling you, nothing is incorrect here.

  • Dynamic app creation using MXML?

    I'm working on creating a small quiz application which will
    be driven by pre-formatted external XML. I have designed various
    custom question canvases for each of the question types (MCQ, short
    answer, match-pairs etc.) and I'm wondering if there is some way to
    implement the main application using MXML instead of ActionScript?
    I've managed to hard-code the order of the questions, knowing
    which canvases are needed in which order, but I need to be able to
    detect the question type from the XML (that bit I can manage) and
    then add the appropriate question canvas component in order in my
    tabNavigator.
    Essentially, I'm trying to replicate the function of a
    switch:case clause in MXML. Does anyone know if this is possible?
    I've started trying to implement it in ActionScript, but I'm a bit
    of a newbie to AS3, and I keep getting errors I don't understand,
    like "Access of undefined property" where I'm referring to an
    object I've just declared and instantiated in the previous line of
    code. E.g (anywhere I use mainPanel):
    <mx:Script>
    <![CDATA[
    import mx.controls.Text;
    import mx.containers.Canvas;
    import mx.containers.Panel;
    var mainPanel:Panel = new Panel();
    Root.addChild(mainPanel);
    mainPanel.layout = "absolute";
    mainPanel.setStyle("left", 10);
    mainPanel.setStyle("top", 10);
    mainPanel.setStyle("right", 10);
    mainPanel.setStyle("bottom", 10);
    var testPage:Canvas = new Canvas();
    var numQuestions:int = quizQns.childNodes.length;
    var qTypes:Array = new Array(numQuestions);
    var textLine:Array = new Array(numQuestions);
    ]]>
    </mx:Script>

    You can declare and initialize variables outside functions in
    your script block, but for most else you need to do it in a
    function. I would continue learning AS3 as it will give you real
    flexibility and power.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    import mx.controls.Text;
    import mx.containers.Canvas;
    import mx.containers.Panel;
    private var mainPanel:Panel;
    private var testPage:Canvas = new Canvas();
    private var numQuestions:int = 10;
    // private var numQuestions:int = quizQns.childNodes.length;
    private var qTypes:Array = new Array(numQuestions);
    private var textLine:Array = new Array(numQuestions);
    public function init():void {
    mainPanel = new Panel();
    addChild(mainPanel);
    mainPanel.layout = "absolute";
    mainPanel.setStyle("left", 10);
    mainPanel.setStyle("top", 10);
    mainPanel.setStyle("right", 10);
    mainPanel.setStyle("bottom", 10);
    ]]>
    </mx:Script>
    </mx:Application>

  • Newbie here, with button action script issue

    I have just started to scrach the surface with actionscript
    and I have attempted to assign it to buttons. Much to my supprise,
    it worked, sort of... All my buttons require a double click the
    first time you click on them. I was able to put
    this together, by
    using the following action script for all my buttons:
    on (release) {
    ybutton.onRelease = function() {
    gotoAndStop(28);
    So I have 2 questions. What actionscript will give me the
    single click that I am looking for? Also, is there any shortcut to
    making a broad change? In other words, will have to switch out the
    code for every button on 37 frames?
    Thank you

    1: // You needed two clicks because you have 2 onRelease.
    on (release) {
    gotoAndStop(28);
    2: Yes, it'll go fast I would copy the above and paste where
    needed then just change the frame #.

  • TLF on action script 2 ?

    Hi,
    I designed an animation with action script 2 in years ago. now how can I use TLF text in that animation without converting it to action script 3?
    if can't, how can I convert action script 2 to 3 easily?
    Best Regards.

    Seems you can not use TLF in action script 2 as TLF is an action script 3 library...
    We are not the experts about how to convert action script 2 to 3 but we'll post this question to our internal forums. If there is anyone answers this question. I'll let you know.

  • Item renderer using action script

    Hi,
    Can anybody tell me how to use item renderers using actions script,
    I have a data grid and iam using item renderer in mxml works fine but it is causing memory issues >
    So i want to know to use item renderers in action script to avoid memory issue.
    Thank You,
    Anu

    use the ClassFactory
    example:
    <!-- MyCombo.mxml -->
    <?xml version="1.0" encoding="utf-8"?>
    <mx:ComboBox xmlns:mx="http://www.adobe.com/2006/mxml" >
    </mx:ComboBox >
    and in ActionScript
    private var myComboFac:ClassFactory = new ClassFactory(MyCombo);
    private function myFunction():void
        colCombo.itemRenderer = myComboFac;  
    and in DataGrid
    <mx:DataGrid xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:columns>
            <mx:DataGridColumn id="colCombo" />
        </mx:columns>
    </mx:DataGrid>
    regards
    Leonardo França
    Adobe Certified Expert Flex 3 with AIR
    Adobe Certified Expert Rich Internet Application Specialist v1.0
    Adobe Certified Expert Flash CS3 Professional
    Certified Professional Adobe Flex 2 Developer
    Adobe Certified Professional Flash MX 2004 Developer
    http://www.leonardofranca.com
    http://twitter/leofederal
    Manager AUGDF - Adobe User Group do Distrito Federal
    http://www.augdf.com.br
    http://twitter/augdf
    anu3000 escreveu:
    Hi,
    Can anybody tell me how to use item renderers using actions script,
    I have a data grid and iam using item renderer in mxml works fine but it is causing memory issues >
    So i want to know to use item renderers in action script to avoid memory issue.
    Thank You,
    Anu
    >

  • How use flex sdk 3.5 Action Script-3 code in flash builder 4.5............???

    hiiiiiiiiiiiiiiiiii
    can i use my flax sdk 3.5 action script-3 code into flash builder 4.5 .....if yes so plz give me detail how??..with step....

    Ya i tried by keeping <fx:Declarations> part but still it is throwing error,
    In flex3 we are making a component ex: <mx:canvas> and changeing that component to
    <cairngorm:ServiceLocator xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:cairngorm="com.adobe.cairngorm.business.*">
    </cairngorm:ServiceLocator>
    if any one used 4.5 with cairngorm let me know
    thanks

  • Can access c++ library from flash action script by using SWC lib?

    We want to develope a Flash application based on Windows CE 6.0 R3. The application aims to communicate with middleware libraries written in C/C++. Is it possible to create SWC file using the c++ library file so that we can load this as a component in fla project for accessing the library functions from flash action script 3.0? OR Is there any simple way to access c++ library from action script?
    Thanks,
    Saumini

    I don't think Alchemy will help you.  The reason is Alchemy does not give socket capabilities beyond what Flash provides.

  • How do I use the button states in an action script?

    In my Captivate 8 project I use smart shape as buttons. The buttons have different images presented dependent on the state of the button. I have also created a simple action script that shows what happens when the button is pressed. When the button has been pressed the normal state of the button appear. I, however, want the down state of the button to remain visible util the user presses another button. How do I accomplish this? Is there variables for the buttons different state or how can I create that?
    BR,
    Madeleine

    When you talk about 'actionscript' do you mean advanced or shared actions? You cannot write actionscript within Captivate, only Javascript. If you use advanced/shared actions they'll be converted on runtime to either Actionscript (for SWF output) or Javascript (for HTML5 output).
    The states in shape buttons are the normal way buttons behave (not only in Flash). If you are indeed using shared/advanced actions, and you want the down state to remain until the next shape button is clicked, you'll have to go the way described by iFlashAppsToo. Create shapes that have the look of the down state, make them initially invisible and group all those shapes on one slide. Add two statements to the shared/advanced action (please do use shared actions, you'll save time):
    Hide Group   so that eventual down mimicked states on previously clicked buttons disappear
    Show Im_Downx    to show the down image for that button

  • How to use single ant build script to package the application with and without native extensions

    Hi,
    I am using iOS native extensions for Adobe air. For this I am listing the extensions in the application descriptor file. Since the package with native extensions are meant to run only on device, I want my build script to work without native extensions too to be able to run on simulator. Is this manadatory that I need two separate application descriptors/basically two build scripts to compile and package them? Please suggest and let me know if more explanation is needed.
    Thanks,
    Swathi.

    Hi
    This is a known issue addressed by CR205204
    As you said, IBM actually does not have rt.jar in its JDK - they have moved contents of rt.jar into various jars.
    IBM is not using org/apache/crimson/tree/ in their JDK at all.So the error shows up in the end of build even if it succeeds
    You may need to add crimson.jar to wlwBuild classpath, since it is not part of IBMs JDK.
    Note: the build will work even w/o crimson.jar giving a non build related IDE exception in the very end.
    Thanks
    Vimala

Maybe you are looking for