How to use symbols in a loaded swf

I want to load a swf file in flex as application with embed
tag and then create instance of its class. I want to use symbols
within this swf i.e. to load dynamically those symbols when needed
and play with it. is it possible in flex builder 3? If yes then how
and if not then how can it be done? Any suggestion is
appriciated.

Hello,
using that page as guide:
http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/events/Uncau ghtErrorEvent.html#includeExamplesSummary
(last sample on where to insert handlers) what about:
<s:SWFLoader id="swfLoader" init="swfLoaderInitHandler(event)" source="B.swf"/>
and:
protected function swfLoaderInitHandler(event:Event):void
     if(!swfLoader.content) return;
     swfLoader.content.loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAU GHT_ERROR,
          uncaughtErrorHandler);
protected function uncaughtErrorHandler(errorEvent:UncaughtErrorEvent):void
     if(errorEvent.error is Error)
          var e:Error = errorEvent.error as Error;
          // my error is 1009 - it is expected here
          const NULL_ERROR:uint = 1009;
          if(e.errorID == NULL_ERROR)
               errorEvent.preventDefault();
               Alert.show(e.errorID+" "+e.message);
          // else fall through
     // else fall through
B is supposed to fail:
private var emptyObject:Object = null;
public function B()
     flash.utils.setTimeout(throwErrorNow, 100);
protected function throwErrorNow():void
     emptyObject.numericValue();
regards,
Peter

Similar Messages

  • How can I make my external loaded .SWF file smoothly disappear after 15 seconds?

    Hi,
    How can I make my external loaded .SWF file smoothly disappear after 15 seconds? The following is the code to load an external .SWF file:
    var K:Loader=new Loader();
    addChild(K);
    K.load(new URLRequest("clock.swf"));
    K.x = 165;
    K.y = 247;
    K.contentLoaderInfo.addEventListener(Event.INIT, growLoader);
    function growLoader(evt:Event):void {
         K.width = 130;
         K.height = 130;
    I want to make clock.swf file disappear from the page after 15 seconds using some smooth disappear effect.
    Please help.
    Thanks.

    Something even better:
    http://www.greensock.com/
    Check out TimelineMax I LOVE it...
    The guy that made this (and gives it away for free!) is a saint.

  • How to use TCP Checksum Off-load in my network driver

    I am seeking infomation on how to use TCP Checksum Off-load to tell the Solaris 8 stack not to handle it for both receives and transmits (and let our NIC handle this compute-intensive task instead).
    There is mention that Sun GigabitEthernet Adapter cards, Release 1.1 supports Sol-2.6 use of NIC features: TCP checksum offload & byte swapping
    There are limited bits of info in include files. For example
    sys/strick.h indicates use of:
    inetcksum_t's ick_xmit
    stream.h has:
    struct datab's unsigned u16:16; /* used to store hw-calculated cksum
    #define STRUIO_IP 0x04 /* IP checksum stored in db_struioun */
    #define STRUIO_ZC 0x08 /* mblk eligible for zero-copy */
    strsub.h has:
    struct zero_copy_kstat
    Also /include/inet/tcp.h has tcp_sum for outbound.
    Thank you. -Weimin Tchen

    VenK7337,
    Could you show your python code. so we know what your are "writing" to the ethernet port?
    That way we can see what you are receiving.
    Parsing the incoming data (from the TCP-read) depends heavily on the device that sends it, and can not generically be described. LabVIEW has many byte (and even bit) manipulation functions to convert many different data formats to its own build in formats.
    So after the TCP listener is connected, you are constantly reading from the established connection (until it gets broken of course). More advanced example would be the internet toolkit if oyu have it.
    From the read characters (and I hope you designed a protocol with a clear starting character, ending character and maybe even a build in checksum) you parse the data and perform you action, and of course generate a reply. Again the internet toolkit is a good example. It parsed the input as it comes it, based on the HTTP format. Then generates the reply based on the request received.
    These days I would suggest not to use binairy encoded numerics. Try and use XML formatted data. Yes, it causes a lot of overhead. But typically this is not an issue and makes the code a lot more portable and maintainable. Also makes it easier to interface with other languages/platforms.
    Umless of course you are looking at Khz data rates, then XML is not th preferred choice.
    Hope this helps...

  • Can you enumerate exported symbols in a loaded SWF?

    We have a number of SWFs that we use as asset libraries.  These SWFs each contain a bunch of statically exported symbols.
    I'm trying to make a tool to help catalog our assets.  I want the tool to be able to load these library SWFs and extract a list of all the exported symbols each contains.  Is that possible to do?  I can't find a way to enumerate or iterate over the exported symbols in the application domains of the loaded SWFs.
    (I could swear I saw an example of doing this in documentation somewhere, but now I can't find it... I'm wondering if I dreamed it, or misinterpreted some other example.)
    I'd be game for doctoring up the library SWFs in some way, e.g. make them use some custom helper class as their document class, if that would help.

    A friend of mine and I came to this post hoping to be told how to do it, after getting just "use jsfl" we set off on our journey to learn a bit about it.
    After an hour, we did it!... Kinda. Thanks for suggesting jsfl.
    So in CS5, we go File > New > Flash JavaScript File
    Then we looked at some jsfl docs ( http://help.adobe.com/en_US/Flash/10.0_ExtendingFlash/WS5b3ccc516d4fbf351e63e3d118a901b0bd -8000.html) tried and tried, looked at the docs some more, tried some more and eventually came up with this script:
    var doc = fl.openDocument("file:///PutFilePathHere/YourFlashFilesName.fla");
    var itemArray = fl.getDocumentDOM().library.items;
    var iLength = itemArray.length;
    fl.trace(iLength.toString());
    fl.outputPanel.clear();
    for(var i = 0; i < iLength; ++i)
        if(itemArray[i] == "[object SymbolItem]")
            var str = itemArray[i].name;
            var iLastIndex = (str.lastIndexOf("/"));
            if(iLastIndex > -1)
                str = str.slice(iLastIndex+1);
                fl.trace(str);
    fl.outputPanel.save("file:///PutFilePathHere/ExportedSymbols.txt");
    And yay! A text document filled with all the symbols in in the library. Ok, ok, it's not perfect because it includes symbols that weren't marked as "export for actionscript 3" which is what we initially wanted, but we're either going to perfect it or just deal with it and put identifiers on our LinkageNames (like EX_Tree, EX_Fire for exported to as3 symbols, and just leave the other symbols alone).

  • How do I interact with a loaded swf?

    Hi,
    I have a "lesson" that I'm building that will display a series of "pages" based on an XML file. I have simple navigation buttons that work to page through the XML file. but I'd like to use load an external SWF file with buttons to use as my navigation panel. Everything is AS 3.0. The code to load the navigation movie looks like this:
    // load navigator
       navLoader = new Loader;
       navLoader.contentLoaderInfo.addEventListener(Event.INIT, handleInit);
       navLoader.x = 50;
       navLoader.y = 200;
       lessonSprite.addChild(navLoader);
       navLoader.load( new URLRequest("Navigator1.swf"));
    The loaded navigation movie has two buttons. How do I add an event listener to those buttons so that they call a function in the parent movie so I can detect when the user clicks on the button named "GoNext" in the loaded movie?  I've tried several ways but I've had no luck. Could someone please point me in the right direction? This navigation panel is only one application of this sort of communication that I'll need in other parts of this type of lesson so I really need to figure out how to detect user interaction interaction with the loaded movie. Guess I need to know how to call a function in the parent movie from the loaded movie.
    Thanks,
    Peter H.

    Hey Pete,
    The answer that you seek and the simplest one as well will be from the MouseEvent. that  you will most likely have applied to your loaded swf.
    As long as both swfs are in the same domain, you wont have any issues with security and therefor, the MouseEvent. which bubbles up, will be able to reach your swf file which has loaded it.
    You can then write your code in your loaded swf to simply listen to the loadedMovieClip  by targeting the contents of navLoader just like this,
    navLoader.content.addEventListener(MouseEvent.MOUSE_DOWN,onDown)
    protected function onDown(me:MouseEvent){
    now providing you have given your two buttons names in your loaded swf, you will be able to perform addition tasks by receiving the name of the target.
    protected function onDown(me:MouseEvent){
    var btnClip:Movie= me.target as MovieClip
              var btnName=btnClip.name
    if(btnName==(button1)){
         //do the following
    }else{
           //it was button two
    button1 was just a random name in this case .
    This will do the trick

  • How to create an xml to load swf files in sequence?

    hello everyone
    I'm new in web design... I know how to animate in flash, using timeline, frames, layers, twins and so on... But I want to move forward so I want to create a xml to load swf files in sequence and in loop. Each swf file has 8 seconds.You can see the example here in www.cm-seixal.pt.
    I'm not a programmer but I understand how actionscript works... I hope you can help me
    Cheers!
    Ana

    you can use the urlloader class to load your xml file.  use the loader's complete event and the loader's data property to retrieve the data in your xml file.

  • Using embeded fonts in loaded swf.

    I have a .Swf, which has 3 fonts embedded in it, they are all exported in frame 1 for AS.  This swf loads any number of external .swfs which have dynamically generated textfields inside of them.  This text must be embedded text because effects may be applied to them.  I do not want to embed the three fonts into every external swf, and do not think I should have to.  The font exists in the Loading swf and I have registered the fonts to the global font list.  If I print this list from the loaded swf, all three fonts are present, but when I try to use any of them, my textfiels are empty.
    My question is how do I utilize a font which is embedded in a swf, from a swf which has been loaded into that swf?
    From my external swf, this code:
    [PHP]var embeddedFonts:Array = Font.enumerateFonts(false);
    embeddedFonts.sortOn("fontName", Array.CASEINSENSITIVE);
    trace(embeddedFonts);[/PHP]
    produces the following:
    [PHP][object CenturyBook],[object MyriadProRegular],[object MyriadProItalic][/PHP]
    which are the three fonts that are embedded in the loading swf, So I assume the LOADED swf has access to these fonts.
    When I apply this code to the externally loaded swf:
    [PHP]var FontClass:Class = getDefinitionByName("MyriadProRegular") as Class;
    trace("FontClassInstance -> " + FontClass.toString());
    var linkedFont: Font = new FontClass();
    trace("Font name: " + linkedFont.fontName);
    var textFormat: TextFormat = new TextFormat(linkedFont.fontName, 14);
    //... The next lines set up the text box and apply the format.  I am sure this is done correctly.
    [/PHP]
    I get the following output:
    [PHP]FontClassInstance -> [class MyriadProRegular]
    Font name: Myriad Pro[/PHP]
    which is exactly what I would expect.  Yet, my text box is still blank.  I have embedText = true on the text box, and have applied a string to the "text" property, so it's nothing silly liek that.
    Any help would be appreciated...

    You may also want to look at the various embedded font format issues. Many of the Flex 4 components use a newer embedded font fortmat, which is not the same as the one generally used in Flash. So even if ther Flash font gets registered properly, it still may not work with some of the spark components.
    You should be able to create a swf using Flex that contains fonts embedded in either format, which can then be used in the way you describe, though, since Flex 4 suports both font formats.
    Hopefully, someone else will jump in here if I got some of this wrong.
    -JM

  • How to use %  Symbol for parameters in conditions in Discoverer

    Hi All,
    Actually I should add four parameters in that
    two param's should be given %(means to select all) as default value.
    ie as we use LIKE '%' in Query.
    the problem is when I enter a value for a parameter, it should result me for that particular value,
    and if I need all, I should enter % symbol,
    so for this Iam confused How to use this,
    even I tried with some options, it is not getting satisfactory results.
    will any one please help me in reaching this.
    Thank's in Advance
    Edited by: user10271105 on Sep 17, 2008 3:37 AM

    Hi,
    You can create a parameter and give % as the default value. If you set the condition to use LIKE then when the default value is used for the parameter then the query contains LIKE '%' and everything is selected.
    If you are using a List of Values with your parameter then you must add the '%' to your list of values so that the user can select this value.
    However, this method will not work if some of the values in your database contain percent characters, because the condition LIKE 'ABC%DEF' will return ABCXYZDEF as well as ABC%DEF.
    Unfortunately the like escape syntax is not available in Discoverer so you have to invent an value that the user can enter for all, e.g. ALL and set this as the default for the parameter.
    Then use a condition similar to:
    item LIKE :param OR item = DECODE(:param,'*ALL*', item)
    Rod West

  • Using jump menu to load swf to a target...

    is it possible to use the selections of a jump menu, once when one is selected to load a .swf to a certain target on the page.
    i.e. at www.meadowlarkco.com/index2_new8.htm I have a jump menu with selections within it. Is it possible for instance once I select "flatbed services" for it to a load a new .swf movie to a location on the page, much like an empty mc holder would be used. Then when each new selection is made from the jump menu it will load the according .swf to the same location.....how would I start this script to change my current jump menu?
    thanks for any help provided

    For many reasons, a JumpMenu would not be my first choice for this.  You need a stable cross browser media player embedded into the page and a playlist of files to pull this off.
    Have a look at Wimpy Rave with Full Advertising / Playlists (NOTICE: this link contains auto playing sound and video).
    http://www.wimpyplayer.com/examples/rave/ex_ad_playlist.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • How to use Power Query to load data from a single source into multiple tables

    Hi all,
    I have a requirement to load my data into three different data models using Power Query. Is that possible?
    My source is a SharePoint survey list, with similar questions like:
    1) Course lecturer - John Doe
    1a) The course was useful (rate 1 to 5)
    1b) The lecturer displayed good knowledge of topic (rate 1 to 5)
    2) Course Lecturer - Mary Brown
    2a) The course was useful (rate 1 to 5)
    2b) The lecturer displayed good knowledge of topic (rate 1 to 5)
    I would like to split the data into separate data models (one for John Doe; another for Mary Brown), so that I can compare the different lecturers. Other than running separate surveys for each of them, I thought of using Power Query to transform the data.
    Is it possible?
    Thanks.
    Regards
    GM

    Yes, this is possible.
    Start with a single query that returns you the data for all lecturers.
    Right-click on the "all lecturers" query in the queries pane, and choose Reference, once for each lecturer. This will create a query for each lecturer.
    Open the query for each lecturer and filter the data so that only that lecturer's results are visible.
    Click "Close & Load To..." for each lecturer's query  to load the data into the data model. This will create a data model table for each lecturer.
    If your question is more about how to transform such a survey list into a table that can be easily filtered, please provide an example of how the list shows up in Power Query.
    Ehren

  • How do I....  - Loading swfs for music festival - some repeat, some don't

    I apologize for the lack of actionscripting knowledge, but
    I'm in a rush to complete something that is beyond my skill and
    hope that you Flash gurus out there can help me.
    Here's the idea...
    I'm creating a sort of movie slideshow to play at a music
    festival which will include several swfs of varying lengths of
    edited video clips embedded into Flash with text animation added
    ---> these I want to load into a main swf with scrolling text
    along the bottom (which I've already created). They can play
    sequentially if necessary and must repeat. In addition to this,
    there will be trivia question swfs that need to also load into this
    movie throughout the festival but they cannot repeat and it would
    be nice if they could be randomly placed amongst the video swfs.
    How do I make this happen and make sure that after each swf has
    ended the next one loads?
    Thanks for any help - I'm on a tight deadline!!

    Swipe right to left on the music list.

  • How to use Symbols or icons in SAP script

    Hai ,
    I am facing one problem in sap script , I want to display one of my field as icon (or )symbol ( tick mark ) in sap script . how to do . Particular transfer order ( check LTAP table ) having 10 line items . In 8 line items are confirmed ( pquit = 'X')  others not confirmed . if LTAP-pquit = 'X' then instead of 'X' i need tick mark symbol  .

    Icons and symbols in SAPscript texts
    To print these, use output devices whose device type uses one of the following printer drivers:
    ·        HPL2 (PCL-5 printers, such as HPLJ4, HPLJ5, HPLJ5SI, or HPLJ4000)
    ·        POST (PostScript printers, such as POSTSCPT, or POST2)
    ·        PRES (PRESCRIBE printers, such as KYOFS150, or KYOFS170)
    ·        SWIN (device types SAPWIN/SWIN and country-specific versions)
    Icons and symbols in ABAP lists
    If you also want to print these characters in lists, you must define an output device with one of the following device types:
    ·        HPLJ4000/HPLJ5000/HPLJ1100: Device types for PCL-5-printers
    ·        KYOFS170: Device type for Prescribe II printers
    ·        POST2: Device type for PostScript Level 2 printers
    ·        SAPWIN/SWIN and the country-specific versions: generic, that is, device-independent device type for printing using Microsoft Windows

  • How to use Sharepoint Modal Popup loader in Sharepoint-Hosted Apps

    Hi,
    I have a requirement to use a modal popup as loader in SharePoint-Hosted Apps. I have used this like following-
    SP.UI.ModalDialog.showWaitScreenWithNoClose(
    'Please Wait',
    'while we retrieve...',
    '400',
    '600');
    But it does not work if we have "SP.Js" and "SP.runtime.js" included in the page. If we remove the mentioned script, then only modal works, but other functionality related to "Sp.Js" does not work.
    Please let me know if there is any solution for the problem.
    Thanks in Advance.

    Hi,
    Chk out this link also
    http://stackoverflow.com/questions/4015159/using-jquery-to-display-a-modal-please-wait-dialog-box-message
    http://bernado-nguyen-hoan.com/2012/04/23/how-to-close-sharepoint-modal-wait-screen-after-postback-when-page-is-in-dialog-mode/
    http://sharepoint.stackexchange.com/questions/24391/how-do-i-show-a-loading-div-when-opening-a-modal-dialog-from-a-customaction
    http://blog.collabware.com/2012/10/30/tips-tricks-sharepoint-2010-modal-dialogs/
    Thanks
    Jaison A
    http://infomoss.blogspot.in

  • How to use Webdispatcher as a load balancer?

    We have multiple java instances for an EP7.
    We want to use a webdispacher to do load balance.
    I saw one document before but cannot find it anymore.
    Please help. Points guaranteed. Thanks!

    Check this SAP help documentation
    http://help.sap.com/saphelp_nw04s/helpdata/en/5f/7a343cd46acc68e10000000a114084/content.htm
    Regads,
    Prasanna Krishnamurthy

  • How to use Adobe Flash Player with .swf files?

    Hey,
    I have a .swf file that I'am trying to open but it seems that I can't. Is there any way that I can use Flash Player to do so?
    The .swf I'm trying to open is a game, when i right-click on it and i click on Open With, I don't see Flash Player as one of the options.
    Can you help me please? Thanks alot!!!

    There IS a standalone Flash Player but is's part of Flash Professional. You'd need to purchase it (or download a 30 day trial, but I don't know if the Flash Player would keep working after the trial expires).

Maybe you are looking for

  • How to edit a Animated Gif file and convert to SWF

    I am using the creative cloud with fireworks. I chose the free trial with buying in mind if I saw it work properly. I simply want to upload an animated GIF file and then download it as a SWF file. I saw someone on youtube do this and it's not that if

  • How to connect my macbook air to internet via cable ethernet?

    Hi,     I tried to connect my macbook air to internet via lightning to ethernet adaptor. I am having cable internet, and my windows laptop normally connects to internet without anything to set in it. Anyone can help in this aspect... Thanks in advanc

  • Report painter formula  problem

    Hi we are getting the error when generating the report painter report that " Formula too long to be converted". does anyone has idea about this issue. Thanks

  • Repository XSD in MDM 7.1

    Hi All, I need to genarate XSD for my one of repository in MDM 7.1.Did all the Configuration Required as explained in Blog and the Video. http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c065c565-60a4-2c10-8d95-af250ca89478 http://www.sdn.sap.c

  • Using Apps in OS X 10.8.4 which are deleted on ext HD

    Hello, I recently updated from OS X  10.6.8  to  10.8.4. As there is a printing programme for my Canon printer which ran fine under 10.6.8 but not at all under 10.8.4, and I need to open and still work with files I created in this programe, I install