How to load external swf and handle events of external swf by passing data .

Hi all
I have to laoad external swf (made in flash).On loading i have to pass data and hndle events which occurs on this swf.
Can any one suggest me how can I achieve this.
Regards
Munira

Here is one way:
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f9c.html
HTH,

Similar Messages

  • How to load external storage html file in web view

    hi all,
        how to load external storage html file in web view, please help me
       " ms-appdata://local/index.html" not working
    veerasuthan veerakesan

    It need be read as string. Then load the string by  Webview.NavigateToString.
    Sample as below
    string htmlstring = string.Empty;
    try
    var htmlfile = await Windows.Storage.ApplicationData.Current.LocalFolder.OpenStreamForReadAsync("a.html");
    using (System.IO.StreamReader streamReader = new System.IO.StreamReader(htmlfile))
    htmlstring = streamReader.ReadToEnd();
    webview.NavigateToString(htmlstring);
    catch(Exception ex)
    Debug.WriteLine(ex.ToString());
    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。

  • How to load external SWF used sharing library.

    Hi~~~
    Before ask the question, plz understand my bad English..
    Recently I try to load the Swf file that is maded by Flash CS 6.0.
    Especially it used shared library..
    When I try to load this SWF, I used FileStream instead URLRequest.
    This is because the target SWF File located same device with the Swf Application.. So when I use the URLRequest
    it give me the warning - Sandbox security violation.
    But by using FileStream, the warning did not occur.
    This is the sample code below..
      var myFile = new File(path);
      var myStream = new FileStream();
      myStream.open(myFile, FileMode.READ;
      var myBytes:ByteArray = new ByteArray();
      myStream.readBytes( myBytes );
       mSwfLoader.loadBytes( fileStream, context );
       mSwfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadedComplete);
    As you can see, I made a event listener to get the content of the Loader, after receving Complete Event(I guess.. after decording?).
    But I can't receive any event call, so I removed symbol used sharing library in the SWF.
    And this gave me the result as I respected... So I guess the problem caused by using sharing Library..!
    (In parenthease, I can see the valid result in running debug time on the Flash CS6..)
    What should I do? I respect that using sharing libary give saving memory.  So I want to using it as possible.
    Thanks for your reading...!

    Here is one way:
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f9c.html
    HTH,

  • How to throw and handle event defined in component interface

    Hi folks,
    I have defined a component interface with an event 'open_info'
    I have some sub components which are implementing that component interface. I also get the two events generated (the interface check box is not marked)
    I use those sub components and try to handle the event. but unfortunately the event is not handled.
    I'm not sure if I do everything right. I checked the interface checkbox at the events tab of the controller of the sub component. I then may handle the event in the embedding main component. but it appears to be a different event.
    probably I eed to access the interface controller and throw the event there, but I don't know how.
    I couldn't fnd documentation or wdr* components which deal with that issue. do you have any suggestions?
    regards
    stefan

    Hi Stefan,
    Do the following in the component being used:
    say component name is ZCMP_01
    go to COMPONENTCONTROLLER
    Create an Event with necessary parameters if needed, say Event name is EVNT_01 and has an importing parameter, say PARAM_01 type char10,
    Make sure you have set the interface check box. Now this event is available in the INTERFACECONTROLLER.
    Say ZCMP_01 has a view with a button, on click of the button, call a method in the COMPONENTCONTROLLER.
    Perform all the required operations, At the required point, fire EVNT_01
    wd_this->fire_EVNT_01_evt(
          PARAM_01 = 'sample' ).
    Now the other component that has to use ZCMP_01, say ZCMP_02
    In the component properties od ZCMP_02, add usage for ZCMP_01, say USG_CMP_01
    Go to the view in ZCMP_02 where you wish to handle the event EVNT_01 of ZCMP_01,
    Go to Methods tab, create an event hadler, say EVNT_01_HNDLR ... method type = Event Handler,
    Event = EVNT_01, Controller = INTERFACECONTROLLER, Component Use, USG_CMP_01.
    Now your event handler will have foll parametrs: WDEVENT .. type ref to CL_WD_CUSTOM_EVENT,
    PARAM_01 type CHAR10
    Handle the event as required.
    Regards,
    Reema.

  • How to make a cell in a JTable to be uneditable and handle events

    I tried many things but failed,How do you make a cell in a JTable to be uneditable and also be able to handle events>Anyone who knows this please help.Thanx

    Hello Klaas2001
    You can add KeyListener ,MouseListener
    Suppose you have set the value of cell using setValueAt()
    table.addKeyListener(this);
    public void keyTyped(KeyEvent src)
    String val="";
    int r= table.getEditingRow();
    int c= table.getEditingColumn();
    val=table.getValueAt(r,c).toString();
    if (r!=-1 && c!=-1)
    TableCellEditor tableCellEditor = table.getCellEditor(r, c);
    tableCellEditor.stopCellEditing();
    table.clearSelection();
    table.setValueAt(val,r,c);
    public void keyReleased(KeyEvent src)
    public void keyPressed(KeyEvent src)
    table.addMouseListener(this);
    public void mouseClicked(MouseEvent e)
    public void mouseEntered(MouseEvent e)
    public void mouseExited(MouseEvent e)
    public void mousePressed(MouseEvent e)
    public void mouseReleased(MouseEvent e)
    if(e.getClickCount()>=2)//Double Click
    table.clearSelection();
    int r= table.getEditingRow();
    int c= table.getEditingColumn();
    if (r!=-1 && c!=-1)
    TableCellEditor tableCellEditor = table.getCellEditor (
    r,c);
    tableCellEditor.stopCellEditing();
    table.clearSelection();
    table.setValueAt("",r,c);
    }//Mouse Released
    You can remove keyListener and Mouse Listener whenever You want to edit
    then add it later.
    Regarding handling events implement javax.swing.event.TableModelListener
    table.getModel().addTableModelListener(this);
    public void tableChanged(javax.swing.event.TableModelEvent source)
    TableModel tabMod = (TableModel)source.getSource();
         switch (source.getType())
    case TableModelEvent.UPDATE:
         break;
         }//Table Changed Method
    //This method gets fired after table cell value is changed.

  • How to Load a SWF in Dynamically Loaded HTML

    Hello,
    I have a Flash movie with a multi-line text field that loads
    HTML text. As per the below Macromedia documentation I have swfs as
    images inside my HTML text.
    I'm trying to find a way to pre-load these swfs - if I do
    loadmovie to load the swf, when the html file is loaded will it
    need to reload the swf from scratch or will it take my loaded
    version? I'd love to show a "loading" message in the text as the
    swf was loading but am unsure how to do this now that I have the
    swf reference embedded in the html text.
    Any ideas?
    Thanks!
    Julia
    From the Macromedia documentation:
    Image tag (<img>
    The <img> tag lets you embed external JPEG files, SWF
    files, and movie clips inside text fields. The <img> tag has
    one required attribute, src, which specifies the path to a JPEG
    file, a SWF file, or the linkage identifier of a movie clip symbol.

    Thanks - your answer is exactly what I was looking for.
    I'm noticing that every swf I load via dynamic HTML is
    distorted - is there a way to prevent this? I can set the width and
    height of each swf in the HTML, which works ok, but then I run into
    a problem when I try and have a component item (like an accordion)
    included in the dynamic text field. It works properly, and the
    framing is sized correctly, but the guts are still skewed. I
    haven't been able to figure out why the swfs are being distorted in
    the first place.
    Any ideas?
    Thanks,
    Julia

  • How to load external DLLs with C++ interface in TestStand?

    Hi,
    Can you please let me know how would I load external DLLs with C++ interface in TestStand?
    Regards.

    TestStand 3.x can only call static class C++ methods. TestStand cannot call methods on a C++ object because TestStand does not know how to enstantiate the C++ object.  In TestStand 3.x, there is a online help topic called "Exporting Class Methods and Functions in Visual Studio .NET".
    Scott Richardson
    National Instruments

  • How to load external text file into a Form?

    Hi,
    I made a menu with 1-5 in a Form and 5 external text files. I want the user who is able to view the text content of the text file when he chooses one of them from the menu. And the text file screen has a "Back" command button to let him go back.
    How can I do it and can it support other languages such as Chinese and Japanese?
    Thanks for help.
    gogo

    Sorry, I made the mistake about the subject, it should be loading local file, not external file through http.
    I wrote a method but it throwed an exception when the midlet was run.
    private void loadText()
    try {
    InputStream is = this.getClass().getResourceAsStream("/text.txt");
    StringBuffer sb = new StringBuffer();
    int chr;
    while ((chr = is.read()) != -1)
    sb.append((char) chr);
    is.close();
    catch (Exception e)
    System.out.println("Error occurs while reading file");
    I put the text.txt file in the same folder with the main file (extends midlet). How can I load the text content and display it on StringItem?
    Thanks for any help.
    gogo

  • How to load external XML into DataGrid ??

    Hello ,everybody , I can't load external Xml like this format
    <list>
    <month name="Jan-04" revenue="400263" average="80052">
    <region name="APAC" revenue="46130"/>
    <region name="Europe" revenue="106976"/>
    <region name="Japan" revenue="79554"/>
    <region name="Latin America" revenue="39252"/>
    <region name="North America" revenue="128351"/>
    </month>
    <month name="Feb-04" revenue="379145" average="75829">
    <region name="APAC" revenue="70324"/>
    <region name="Europe" revenue="88912"/>
    <region name="Japan" revenue="69677"/>
    <region name="Latin America" revenue="59428"/>
    <region name="North America" revenue="90804"/>
    </month>
    </list>
    I only can load with node format like this :
    <order>
    <item>
    <menuName>burger</menuName>
    <price>3.95</price>
    </item>
    <item>
    <menuName>fries</menuName>
    <price>1.45</price>
    </item>
    </order>
    Please tell me what am I going to do?
    Thanks!

    I'm stuck on this as well. I've read through the above
    samples and postings and am now feeling really retarded. I thought
    throwing the contents of a simple XML doc into a DataGrid would be
    easy, but I've been trying all morning and no love. Any help is
    appreciated.
    Here the XML --> guides.xml
    <?xml version="1.0" encoding="UTF-8">
    <GuideList title="Current Guides">
    <GuideItem>
    <GuideName>11699240</GuideName>
    <DisplayName>Supercharged Branding
    Program</DisplayName>
    <LinkText>View Downloadable Guide</LinkText>
    <Franchise>Film/TV</Franchise>
    <Property>Cars</Property>
    </GuideItem>
    <GuideItem>
    <GuideName>11721503</GuideName>
    <DisplayName> Packaging & Retail
    Signage</DisplayName>
    <LinkText>View Downloadable Guide</LinkText>
    <Franchise>Film/TV</Franchise>
    <Property>None</Property>
    </GuideItem>
    etc....
    Here's the flex --> GuideListDisplay.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" initialize="guidelist.send()">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable] private var myData:ArrayCollection;
    private function resultHandler(event:ResultEvent):void {
    myData = event.result.GuideList.GuideItem;
    ]]>
    </mx:Script>
    <mx:HTTPService id="guidelist" url="assets/guides.xml"
    result="resultHandler(event)"/>
    <mx:Panel title="{myData.GuideList.title}"> // 1119
    <mx:DataGrid x="29" y="36" id="Guides"
    dataProvider="{myData.lastresult.GuideList.GuideItem}"> // 1119
    <mx:columns>
    <mx:DataGridColumn headerText="Guide Number"
    dataField="GuideName"/>
    <mx:DataGridColumn headerText="Guide Name"
    dataField="DisplayName"/>
    <mx:DataGridColumn headerText="DisplayText"
    dataField="LinkText"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Panel>
    </mx:Application>
    The lines throw with // 1119 throw a problem notice - 1119:
    Access of possibly undefined property GuideList through a reference
    with static type mx.collections:ArrayCollection.
    GuideListDisplay.mxml Lessons line 17 March 21, 2007 12:53:45 PM
    215
    Please help before hari kari looks like a good option.
    Thanks!

  • HELP! How to load multiple swfs using the following code?

    In actions for Frame 1:
    var myrequest:URLRequest=new URLRequest("A.swf");     
    var myloader:Loader=new Loader();
    myloader.load(myrequest);
    img1.addEventListener(MouseEvent.CLICK, clickButton);
    function clickButton(event:MouseEvent):void{               
        stage.addChild(myloader);
    img1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_5);
    function fl_ClickToGoToAndStopAtFrame_5(event:MouseEvent):void
         gotoAndStop(13);
    In action for Frame 13:   (img2 is another button)
    img2.addEventListener(MouseEvent.CLICK, unloadFunction);
    function unloadFunction(event:Event):void{
         stage.removeChild(myloader);

    do you want to load another swf (eg, B.swf) when you're in frame 13 and img2 is clicked?  if yes, and you don't want A.swf to continue to play, use:
    //In action for Frame 13:   (img2 is another button)
    img2.addEventListener(MouseEvent.CLICK, loadF2);
    function loadF2(event:Event):void{
        myloader.load(new URLRequest("B.swf"));

  • How to Load an SWF into the Parent SWF

    Hi all,
    I have 3 SWFs.
    X.SWF - Parent application. Contains an empty movie clip for
    loading external swfs using loadClip() method.
    B.SWF - Has some text and pics. Gets loaded into the empty
    movieclip on X.SWF. Also has a button saying 'Load A.SWF'.
    A.SWF - Similar to B.SWF with a button saying 'Load B.SWF'.
    When I start the main application (X.SWF) and load B.SWF into
    it all is fine.
    But would like to click on the 'Load A.SWF' button on B.SWF
    and load A.SWF into X.SWF. And visa-vesa.
    The problem is I'm not able to refer to the parent container
    (X) from these child (A and B) SWFs.
    Is there any way to do this?
    Thanks

    First if you use
    Button.onPress=function(){
    this._parent.loadMovie();
    the movie try to load swf into B.swf because "this" mean the
    button.Try with more ._parent or just if you X.swf is into the one
    MovieClip in 1st stage _level0.SWF.loadMovie();.Also if you want to
    load the A,B.swf into the stage simultaneously just create two
    movieclips into the X.swf mcA and mcB and the path has gone to
    _level0.SWF.mcA.loadMovie("A.swf"); :)

  • How to load external subtitles in mov files (in QT)?

    Hi everybody,
    When I play an avi file, QT is able to load external subtitles (I've Perian installed). However, this week, I downloaded a file from apple, saved it as a mov file and created a subtitle file for it. Then, I put both files in the same directory and used the same name for them (one .mov and the other .srt). When I play it (with QT), the subtitle file doesn't load. Does anybody know what is happening? Is is a problem with mov files? Or is it a problem with files downloaded from apple (some kind of lock?!)?
    Thanks

    cowpox wrote:
    Hi everybody,
    When I play an avi file, QT is able to load external subtitles (I've Perian installed). However, this week, I downloaded a file from apple, saved it as a mov file and created a subtitle file for it. Then, I put both files in the same directory and used the same name for them (one .mov and the other .srt). When I play it (with QT), the subtitle file doesn't load. Does anybody know what is happening? Is is a problem with mov files? Or is it a problem with files downloaded from apple (some kind of lock?!)?
    Thanks
    You might do better reposting this in the QuickTime forum here:
    http://discussions.apple.com/forum.jspa?forumID=932

  • Dynamic Creation of list box on excel sheet and handling events

    hi all ,
    i m working on excel to sap integration application and for that i need to create dynmicaly list boxes in excel and also needs to handler events of each boxes..
    please suggest me somehting asap/
    thanks in advance,
    jigs
    helpful ans will be rewarded.

    hi all ,
    i m working on excel to sap integration application and for that i need to create dynmicaly list boxes in excel and also needs to handler events of each boxes..
    please suggest me somehting asap/
    thanks in advance,
    jigs
    helpful ans will be rewarded.

  • How to load external png image via xml?

    Can anyone help me with adding a png image to a mc with an instance name.
    I only want to display a single image (no gallery)
    I would like to get the url for the image via an xml.
    Here is a copy of my current action script which has already pulled in the xml data which includes the node with the url for the photo.
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    var myXML:XML;
    var myLoader:URLLoader = new URLLoader();
    myLoader.load(new URLRequest("links.xml"));
    myLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML(e:Event):void
        myXML = new XML(e.target.data);
        trace(myXML);
        menumv.carbtn.addEventListener(MouseEvent.CLICK, openCURL);
        menumv.edubtn.addEventListener(MouseEvent.CLICK, openEURL);
        menumv.psybtn.addEventListener(MouseEvent.CLICK, openPURL);
        menumv.stubtn.addEventListener(MouseEvent.CLICK, openSTURL);
        menumv.busbtn.addEventListener(MouseEvent.CLICK, openBURL);
        menumv.shabtn.addEventListener(MouseEvent.CLICK, openSURL);
        studentmv.stuname.text = myXML.student.name;
    function openCURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.car.url));
    function openEURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.edu.url));
    function openPURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.psy.url));
    function openSTURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.stu.url));
    function openBURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.bus.url));
    function openSURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.sha.url));
    And here is a copy of the node containing the url
    <menu>
        <student>
        <name>testnamehere</name>
        <photo>http://10.0.0.2/test/photos/testnamephoto.jpg</photo>
        </student>
    </menu>
    I did see this tutorial but it was for a gallery and I couldnt seem to hack and slash it to do what I want.
    http://tuts.flashmint.com/creating-a-simple-xml-gallery-in-actionscript3/
    Thanks again in advance for all the help.

    I have added that code but I think i have buggered up something else in the process.
    I get the following error
    ReferenceError: Error #1069: Property data not found on flash.display.LoaderInfo and there is no default value.
        at sdp_fla::MainTimeline/load_complete()
    Current AS
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    var myXML:XML;
    var myLoader:URLLoader = new URLLoader();
    myLoader.load(new URLRequest("links.xml"));
    myLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML(e:Event):void
        myXML = new XML(e.target.data);
        trace(myXML);
        menumv.carbtn.addEventListener(MouseEvent.CLICK, openCURL);
        menumv.edubtn.addEventListener(MouseEvent.CLICK, openEURL);
        menumv.psybtn.addEventListener(MouseEvent.CLICK, openPURL);
        menumv.stubtn.addEventListener(MouseEvent.CLICK, openSTURL);
        menumv.busbtn.addEventListener(MouseEvent.CLICK, openBURL);
        menumv.shabtn.addEventListener(MouseEvent.CLICK, openSURL);
        studentmv.stuname.text = myXML.student.name;
    var _request:URLRequest = new URLRequest(myXML.student.photo);
    var _ldr = new Loader();
    studentmv.photo.addChild(_ldr);
    _ldr.load(_request);
    _ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, load_complete, false, 0, true);
    function openCURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.car.url));
    function openEURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.edu.url));
    function openPURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.psy.url));
    function openSTURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.stu.url));
    function openBURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.bus.url));
    function openSURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.sha.url));
    function load_complete(event):void
    var bitmap:Bitmap = Bitmap(event.currentTarget.data);
    bitmap.smoothing = true;
    bitmap.width = studentmv.photo.width
    bitmap.width = studentmv.photo.height
    studentmv.photo.addChild(bitmap)

  • How to load external fonts loading in single file

    I am load multiple swf files in single root swf file. Is it possible multilple fonts  embeding in single file. If it is possible can help any one.

    Heya,
    I believe you can embed the .swf file using flex code in flex builder. I just did a quick google search and came up with a few articles. I don't think there is a way to do this in Catalyst yet, but please correct me if I am wrong.
    I am also building my portfolio in Catalyst as a little project and although there are some bugs I am really enjoying the Beta
    Hope this helps!
    Chris

Maybe you are looking for