Swf calling swf

Hi  to all
My application generats swf during runtime.
Now say, test.swf needs to be viewed in browser. But If i directly embedd test.swf in html code, user can download test.swf in their local machine.
So, i decided to have one swf file, say parent.swf which will be embedded into html code and test.swf will be passed as argument to parent.swf
(something like: <EMBED src="parent.swf?value=/tmp/test.swf" ...... ></EMBED> )
I need this flexibility because test.swf can be replaced by some other swf file that my application is generating.
It seems to me that following this approach, if user tries to download the html page, he/she will download "parent.swf" and not the swf passed as argument
(ex: test.swf). So, i can protect my original file test.swf which will fulfill my purpose.
Kindly suggest me how to implement this. I am very new to flash and actionscript.

i don't know any easy way.  and, no way is uncrackable.
but you can make it more difficult and time-consuming to use your swf than it be to recreate it from scratch.  there are various encryption schemes available that do that but they all have downsides.
i have one i developed myself (based on TEA) but it has a huge downside:  it's difficult to use and requires a secure location on the host website (like a sql database).

Similar Messages

  • Can a loaded SWF call a function that lives in the parent?

    I'm building a pretty simple Flash site in AS3. There is a
    main movie (main.swf) that simply loads different swfs via buttons
    on a main nav bar. The user clicks on a MC in "main.swf" and a
    function is called, loadMyContent("section1.swf"), is called and it
    animates in nicely. Other buttons use the same function, loading
    section2.swf, section3.swf, etc.
    I've defined how "loadMyContent()" works in the the main
    movie's document class file. It's all working fine when I just need
    to load content from a user action from the buttons that live in
    "main.swf". I want to call that same "loadContent" function from
    within "section1.swf" and have "main.swf" run it's "loadContent"
    fuction, but I can't seem to figure out how to make a child call a
    function that lives in the parent.
    Is there any way of having my child do this?
    I have a suspicion I may have to define that "loadContent"
    somewhere else, but I'm a little stumped now. I'm not really
    familiar with design patterns yet, although I want to get an
    understanding of them sometime soon. Can anyone offer some help
    with my immediate need or suggest a route to a solution?
    Thanks.

    kglad,
    Thank you very much! That worked perfectly. My section1 FLA
    is now compiling it's SWF without complaint.
    In case someone else is following this, the exact code I
    ended up using to cast "this.parent.parent" as a MovieClip is:
    MovieClip(this.parent.parent).loadMyContent("section2.swf");
    The discussion I think kglad is referencing is
    this
    discussion. If that's not it, just let me know. Again, kglad,
    thank you!

  • Is there any solution to ged rid of an infected file called,,, Swf.Exploit.CVE_2014_0564-2

    is there any solution to ged rid of an infected file called,,, Swf.Exploit.CVE_2014_0564-2 ?
    I don't know how i got this infected file>

    It appears to be a cache file, a copy of a website you visited at some point. Empty your browser cache and it should be gone. If you're using Safari https://answers.syr.edu/display/software/Clear+Cache+in+Safari+version+7+on+Mac+ OSX

  • How to call swf file within another swf file using xml

    hii,
    I am facing some problem to call a swf file via xml when this xml file loaded it calls another swf file which includes a new xml file. now if i call this nested swf calling without xml it works but in case case of xml it is not showing the result. i m confused. how to nested xml file calling done in as2/as3. i need some logics. thanks in advance

    This is the AS3 forum and your posting involves AS2 code.  You should repost in the AS2 forum...
    http://forums.adobe.com/community/flash/flash_actionscript
    Aside from that, your problem might lie in the following lines...
    _root.createEmptyMovieClip("sub_container1", 1);
    loadMovie(sub_SWFPath[1].attributes.url, "sub_container1");
    You create the new movieclip, sub_container1,  in the _root, but you do not assign the loadMovie to load into that same movieclip (unless you have a _lockroot = true assigned in your sub-swf).  In any case, you should repost in the AS2 forum to pursue resolution.

  • How I use swf in swf (nested) ?

    Flash is case-sensitive in naming(symbols,form
    fields,components) ?
    How I use ScrollPane ?
    How I use swf in swf (nested) ?

    What I've done in the past is created an image using an image editor like MS Paint,  then change the image to black/white instead of color, and used grey instead of black.  Then upload the image via SE78.  Then you can include the image in your sapscript using the BITMAP statement.  Search for watermark in this forum and you should get some more info.
    BITMAP ZIMAGE OBJECT GRAPHICS ID BMAP TYPE BCOL
    Regards,
    Rich Heilman

  • Pass flashvars to swf in swf?

    I am loading a child swf inside a parent swf, and need to pass variables from the parent into the child.  I don't have control over the source code of the child, so I can't have the child pull data from the parent; the data needs to be passed to the child swf in a standard fashion, so that the child works just as if it were embedded in a page using flashvars.
    I've tried passing variables to the child as parameters on the URL:
    var ldr:Loader = new Loader();
    var urlReq:URLRequest = new URLRequest("http://mysite.com/child.swf?var1=aaa&var2=bbb");
    ldr.load(urlReq);
    addChild(ldr);
    This seems to work ok, but apparently Internet Explorer doesn't allow URLs longer than 2083 characters (http://support.microsoft.com/kb/208427).  I need to pass a fairly long string of parameters to the child which will likely exceed 2083 characters. So I'm trying to avoid passing the parameters directly on the URL, and wondering if there is any other way to populate the child swf with the variables that it will expect.  Is there any other way of passing flashvars to a swf-in-swf?
    Thanks,
    Dave

    Craig,
      Thanks for the reply.  I've tried this too but unfortunately, passing the data using URLVariables has the same limitation in IE.
    var ldr:Loader = new Loader();
    var urlReq:URLRequest = new URLRequest("http://mysite.com/child.swf");
    var variables:URLVariables = new URLVariables();
    variables.var1="aaa";
    urlReq.data = variables;
    ldr.load(urlReq);
    addChild(ldr);
    This still results in a request being made to http://mysite.com/child.swf?var1=aaa, since it's using HTTP GET.  If the entire URL (including the query string) is longer than 2083 characters, IE is unable to load the URL.
    Any way around this?
    Thanks,
    Dave

  • Parent swf call function in Child swf not working

    Hi all,
    I'm having a problem with this and I just can't figure it out
    :( (I've been trying different things and staring at it for hours
    and I'm losing my mind...)
    So I have a Parent swf that loads a Child swf (this goes
    without any problems), but I want the Parent to call a function in
    the child, now this is where it goes wrong...
    The function the Parent has to call is named "lookupcar" and
    needs to give the value "wagen" with it. The problem I think is
    that the Parent wants to call the function but it still needs to
    load (correct me if I'm wrong). Is there a way to check if the
    Child swf is loaded completely before trying to call the function?
    Could you give me an example of this please? Or any other
    suggestions on what goes wrong?
    Code in the Parent
    root.inhoud.createEmptyMovieClip("thetext", "thetext",
    this.getNextHighestDepth());
    root.inhoud.thetext.loadMovie("uitrusting-wagenpark.swf");
    root.inhoud.thetext.lookupcar(wagen);
    Code in the Child
    (the function lookupcar)
    _global.lookupcar = function(carnr:String){
    trace("LOOKUPCAR, with car nr: " + carnr);
    Thanks in advance for all the help.

    Perfect....just to make sure i m taking care of it in a nice practical way....here is how i learned to access a file located in Child (researching other posts)
    is this the way you recommend it?
    (LoaderName.content as MovieClip).functionName(new Event("whatever"))
    and in Child File we have
    function functionName(e:Event)
    i have seen other ways of calling a function in Child Swf , like using EmbedSWF and etc. wanna make sure which one is a better practice. Thanks

  • On click at tree component it has to call SWF using XML

    Hi,
    I have created a flash file with name xmltoflash_tree.
    Incules a Tree component named "tree01". On my first frame of
    actions i have included "#include "test.as"". This is about my
    flash file
    In my Test.as :
    import mx.controls.Tree;
    var xmlLoader:XML = new XML();
    xmlLoader.ignoreWhite = true;
    xmlLoader.load("list.xml");
    xmlLoader.onLoad = function(success:Boolean):Void {
    tree01.dataProvider = this;
    tree01.initBranches();
    tree01.vScrollPolicy = "auto";
    Tree.prototype.initBranches = function(node:XMLNode):Void {
    if (node == undefined) {
    for (var i = 0; i < this.dataProvider.childNodes.length;
    i++) {
    this.initBranches(this.dataProvider.childNodes
    } else {
    if ( (node.attributes.isBranch == "true") &&
    !(this.getIsBranch(node)) ) {
    this.setIsBranch(node, true);
    if ( (node.attributes.isOpen == "true") &&
    !(this.getIsOpen(node)) ) {
    this.setIsOpen(node, true);
    for (var i = 0; i < node.childNodes.length; i++) {
    this.initBranches(node.childNodes);
    I created an XML file named as "list.xml" :
    Script inside this xml is :
    <?xml version="1.0" encoding="iso-8859-1"?>
    <node label="Select Application" isOpen="true">
    <node label="Application1" isBranch="true">
    <node label="Introduction to Application1"
    isBranch="true" >
    <node label="Testing1" />
    <node label="Testing2" />
    <node label="Testing3" />
    </node>
    </node>
    <node label="Application2" isBranch="true">
    <node label="Introduction to Application2"
    isBranch="true" >
    <node label="Testing1" />
    <node label="Testing2" />
    <node label="Testing3" />
    </node>
    </node>
    I have folder with name Treehelp. All my files are in this
    folder.
    xmltoflash_tree.fla
    test.as
    list.xml
    linktesting.swf
    I have SWF in the same folder named "linktesting.swf".
    I need to call "linktesting.swf" or any other swf files
    included in the same folder. when i click on "Testing1/ or any
    othe".
    Have to write the script in XML to call the swf file. Help me
    in this.
    Regards
    Ranjith Kumar. Bandi

    Add oneMore attribute in the XML Nodes,
    When selecting a Node in a Tree component you will recieve
    all the data of that particular xml node. using that you can load
    the Files
    <node label="Testing1" filePath="MyFirstSWF.swf"/>

  • How to call swf in swf at proper x,y co-ordinate

    Hello,
    can any tell me how to call a swf into anather swf but at
    proper x and y co-ordinates.
    thnx n regards
    justbipin

    You need to create a placeHolder movieClip and load the other
    swf into it
    and then set the x,y of that placeHolder clip.
    placeHolder.loadMovie("mySWF.swf")
    placeHolder._x=100;
    placeHolder._y=80;
    Dan Mode
    *THE online Radio*
    http://www.tornadostream.com
    *Must Read*
    http://www.smithmediafusion.com/blog
    *Flash Helps*
    http://www.smithmediafusion.com/blog/?cat=11
    "justbipin" <[email protected]> wrote in
    message
    news:e80cs7$4mo$[email protected]..
    > Hello,
    > can any tell me how to call a swf into anather swf but
    at proper x and y
    > co-ordinates.
    > thnx n regards
    > justbipin

  • HTML/javascript interaction with swf content - can I call swf functions from JS?

    Hi,
    I've created an AIR application where the
    intialWindow.content is a HTML page / JavaScript application. On
    this HTML page I want to include some SWF content as a plugin (a
    Flex 3 app), so I have an object tag.
    From my SWF I can call out to JavaScript using
    flash.external.ExternalInterface fine. I can also call methods
    within the AIR and Flex APIs via the window or runtime objects.
    However, if I try to call methods within my SWF from
    JavaScript, nothing happens. Further, I can pass a function
    reference from my SWF to JavaScript (via ExternalInterface), and
    while I can see a valid function reference in JavaScript, calling
    it doesn't call the function within the SWF.
    Is this not supported? Or is this something else, like an
    applicationDomain issue? My SWF object is loaded via the app:/ uri,
    so I didn't think it would be that.

    I hadn't tried that, and it does work. Thank you. Everyone
    should note though that the documentation here
    Flex
    3 - External Interface
    and
    Flash
    9 - ExternalInterface.html
    says:
    "Note: Adobe AIR currently does not support the
    ExternalInterface class."
    which by my reading means that none of this should work,
    although it clearly does.
    The page
    Example:
    Using the external API with a web page container was most
    helpful in finding the solution, since it mentions referencing the
    object id of the plugin (e.g.
    window['my-object-id'].functionToCall()) when referencing the
    callback function.
    This
    page has a more concise example.

  • Website calling *.swf and *flv files from C:\

    I am after information from someone who has achieved this. I
    have a website that has a swf embedded in it that is calling a
    swf/flv on my hardrive. Firstly is this possible or am I waisting
    my time even trying this. I do realise the security issues involved
    and I have read posts and tutorials about achieving this but I
    still have had no luck. CAN ANYONE HELP ME BEFORE I START PULLING
    MY HAIR OUT!!

    The reason why I want to access information from the hardrive
    is because the information is about 600mb in all but cut up into
    60mb parts or chapters. It is for an online learning system but
    Australian BroadBand speeds are still way to slow for this sort of
    system. I've tried to give these files permissions but I still get
    issues. I am considering using Adobe AIR Technology and making a
    desktop application that accesses small amounts of informaion from
    the server, so basically turning this project on it's head.
    If you do have some more information for me that would be
    great but I think I'll go the AIR track.

  • Calling swf to another swf

    Hi ....
    Ok here is the deal ... I have a banner rotator (in AS3) and works just fine.
    In another flash file I have this code that load's the banner rotator:
    this.addEventListener(Event.ENTER_FRAME, cargar);
    function cargar(e:Event):void {
        var newMedia:Loader = new Loader();
        var cont:MovieClip = new MovieClip();
        newMedia.load(new URLRequest("rotor_imagenes_as3_v2.swf"));
        cont.x = 0;
        stage.addChild(cont);
        stage.addChild(newMedia);
    And really calls the banner rotator, but don't play it. I put the files for me to understand what i'm talking about.
    Thanks ...

    an enterframe event is a loop.  use:
    cargar();
    function cargar():void {
        var newMedia:Loader = new Loader();
        var cont:MovieClip = new MovieClip();
        newMedia.load(new URLRequest("rotor_imagenes_as3_v2.swf"));
        cont.x = 0;
        stage.addChild(cont);
        stage.addChild(newMedia);

  • SWF calls up multiple SWFs - but Wordpress Paths are screwing it up?????

    Hi,
    I have a SWF I put on one of the sites I did, and honestly - I am very savvy - But with this one I am a bit baffled. This MAP SWF has 1 MAIN SWF then an SWF for each city the loads the City INFORMATION.
    You can see the way it is suppose to functions here - Click a region then choose a city. It loads a map
    http://edgelogistics.com/map.swf
    However on this page does not load the SWFs connected with the CITIES.
    http://edgelogistics.com/locations/
    I am assuming that it has to be an addressing issue. Here is the OBJECT SETUP I am using. It is not loading a FLA only SWF's so it must be hardcoded in the file with the address.. I tried it will the www and without.. did not doing anything..
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="775" height="513" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="menu" value="false" /><param name="wmode" value="transparent" /><param name="src" value="http://www.edgelogistics.com/map.swf" /><embed type="application/x-shockwave-flash" wmode="transparent" width="775" height="513" src="http://www.edgelogistics.com/map.swf" menu="false" quality="high"></embed></object>
    Thank you so much for looking at this.
    Jay

    From what I can see, the scenario fits the possible problem source.  When you link directly to the swf file, it is able to load whatever files it needs to because it was designed to do that in Flash testing.  But when you embed that swf file into an html page that lives in a different folder ("locations") the swf needs to have its targeting adjusted for the files it loads as if it were in that same "locations" folder.
    If that explanation doesn't come across clearly, the easiest way to explain a solution for this would be to say that if you can move all the swf files/folders into that locations folder, and adjust the url for the embedding code, chances are the problem will be solved.
    I don't know what the reference to an fla is meant to mean.  fla files are not used on a server, they just create the swf's which are.

  • Trouble getting "refpt"  to call swf files

    I am having trouble getting my buttons to activate a movie
    and/or 'lable' to show when buttons are rollOver.
    I have tried using reference pionts and a swap window to the
    left od my button panel. I just can not get it to work like usual.
    I am tying to have my pop-up appear on a layer above a
    "Zoomify Viewe" layer and do not think this is part of the problem.
    I'm just toast.??
    Here is the code I am using:

    Thanks Urami,
    I'll paste my html file. No clue how to attach files to this
    reply box.?
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>trigger</title>
    </head>
    <body bgcolor="#ffffff">
    <!--url's used in the movie-->
    <a href="info_box001"></a>
    <!--text used in the movie-->
    <!-- saved from url=(0013)about:internet -->
    <object
    classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
    http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
    width="630" height="473" id="trigger" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="movie" value="trigger.swf" /><param
    name="quality" value="high" /><param name="bgcolor"
    value="#ffffff" /><embed src="trigger.swf" quality="high"
    bgcolor="#ffffff" width="630" height="473" name="trigger"
    align="middle" allowScriptAccess="sameDomain"
    type="application/x-shockwave-flash" pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    />
    </object>
    </body>
    </html>
    Grant

  • What is the best way to pass a var from php to a swf to swf

    Hi,
    Whats the best most correct or professional (less chances of error or most efficient) way of sending a var from php to a swf container and then to a swf that is loaded with the loader class from the container???
    Thanks

    Hi Kglad thanks for the answer,
    Yes using AS3, I think I didnt give u enough info though.
    The thing is the php file is actually the index file which has the first swf lets call it conatiner.swf embeded and conatiner.swf then calls the other swf lets call it main.swf by using URLloader. So I dont think I can user URLloader on the index.php file, and I cant put the code in another .php file and call it because I need data from the index.php file specifically.
    Any ideas?
    I know I can use flash vars for the first step of the index.php to container.swf but im trying to avoid it cause im not so familiar with it or embedding and theres two diferent embedding methods im using depending on the site and im probably going to have to change them again later on cause im still having an issue.
    Thanks

Maybe you are looking for