Linking out from an external swf

I am loading a swf into a web page from an external server
and I can not get the buttons that link out to work.
Example:
I have a swf with a square button at
http://mixxncompany.com/button.swf.
When you click on this button it opens a new window for google.com.
But when I load this swf (by pointing to
http://mixxncompany.com/button.swf)
at
http://dreamlifemedia.com/button.html,
it does not open the link.
ActionScript used:
myButton.onRelease = function() {
getURL("
http://www.google.com", "_blank");
What is stopping this from linking out, and what can I do
about it?

I finally figured it out. And of course it had to be the one
place I wasn't looking, the embed code.
I had this line in my embed code (not sure how or why it was
there)
<param name="allownetworking" value="internal" />
Once I removed it, it was all good.

Similar Messages

  • Loading an external SWF from an external SWF

    Hello,
    I'm somewhat caught between a rock and a hard spot on a flash
    site project. Here is the situation:
    I have created a parent movie (which loads all external SWFs
    inside of it) that has the menu navigation built into it. However,
    my client wants me to place some more links inside of the external
    SWFs that lead to other pages (external SWFs) of the site. Is this
    at all possible? I was hoping there is a way to tell a button in an
    external SWF to make the parent movie switch between external SWFs.
    Any and ALL help is very much appreciated. Thank you.
    Another question: does this involve using the _parent script?
    Elijah

    Hello,
    Thank you for replying. Here is exactly what I'm needing to
    do:
    We will call the parent file "index.swf". Inside "index.swf"
    I have a "holder" for external swf files to load into when I call
    on them from the main menu buttons on "index.swf". When a customer
    comes to the site, the "index.swf" file initially loads
    "welcome.swf". Inside of "welcome.swf", I have some images that I
    want to make into links to other external swf files.
    My problem is when someone clicks on one of those pictures I
    want the "index.swf" file to open up the corresponding external swf
    file in its "holder", where "welcome.swf" currently resides. Also,
    all of these swf files ("index.swf" included) have stand-alone FLA
    files, none are attached to one another. I have never worked with
    "levels" before, would that be necessary in this case? I have
    attached the code for the external swf loader.
    I hope that gives you a better idea of what I'm trying to
    accomplish.
    Thanks again.
    Elijah
    CODE:

  • Remove event listener from loaded external swf

    I have a main movie timeline that loads an external swf. When I unload the swf from the main timeline I get an error from this:  my_FLVPlybk.addEventListener(VideoEvent.COMPLETE, vidEnd);
    is there any way to remove the event listener from the loaded swf from the main timeline?
    THANKS!

    if you're publishing for fp 10+, use unloadAndStop() applied to your swf's loader.  that has a fair chance of solving the problem.
    if that fails, you should explicitly stop my_FLVPlybk.

  • Loading class from an external .swf file

    Hi,
    My flash application has lots of resources which will change all the time. In order to keep the the user from having to download my main .swf file over and over again, and in order to keep the main file's size low, I would like to put the resources into separate .swf files and load them dynamically from a url using a Loader.
    Once downloaded I would like to extract the classes that are in the resource swf and use them in the main swf. Can anyone share some code for doing this? Note that I am not just interested in using a symbol from the resource swf. I would like to use a class, with all of its methods and everything, and my main swf does not contain the class definition. Only the resource swf does.
    Thanks!!

    This is a great question for flash programming.
    And when you know the answer to this, you are likely to use it on daily basis like the top level programmers  of an agency.
    ApplicationDomain is your answer and the adobe docs has a chapter on this.
    ApplicationDomain is where all of your classes will be loaded into and when you use a loader you have the ability to target this with the laoderContext.
    AplicationDomain.currentDomain loads all classes into the main app and if your main app already has these classes, then the app uses the parents classes
    new Application.Domain() specifies a seperate repo of classes that are loaded in so that classes in the main app will not be confused by the classes in a loaded swf. that refer to the same names.
    this locks down the communication between the swfs but will use the newer updated classes on the child when a child is loaded in with the same class names as the parents.
    new ApplicationDomain(currentDomain)  will enclose a new repo with the parent repo of the class definitions.

  • AS3 pass variables-values from loaded external swf to parent swf

    Hi,
    I am working on an eLearning project that uses a main SWF (SWF1) and a second SWF (SWF2) with 2 quizzes in it. Published to AIR for Desktop and Android, SWF1 and SWF2 are packaged together in the AIR desktop or AIR APK exports.
    I can use a loader in SWF1 to call and run SWF2. What I am having difficulty with, need some help, is how to get the 2 scores from the 2 quizzes in SWF2 and load these values (each is a Number) back into SWF1. Once back in SWF1, they will be written to String and then displayed in a text box using textbox.text.
    While I've searched online and found examples for sending variables from parent to child SWF's, so far not able to find an understandable/useable AS3 script example for getting variables from child to parent SWF.
    Any help appreciated.
    Best Wishes,

    Hi,
    Still stuck. Can't get SWF2 to go back to SWF1 frame 2.
    SWF1, based on Kiran's AS file with the class AppEvent (class is not called in SWF1 until frame 2, and is called in SWF2 frame 9) loads SWF2 using:
    //SWF1, frame 2
    stop();
    import flash.display.Loader;
    expB100.addEventListener(MouseEvent.CLICK, L1, false, 0, true);
    function L1(e:MouseEvent):void {
    loaderL1.load(new URLRequest("Hotspot13.swf"));
    loaderL1.contentLoaderInfo.addEventListener(Event.COMPLETE, onChildLoaded);
    addChild(loaderL1);
    expB100.visible = false;
    function onChildLoaded(evt:Event)
        var child:DisplayObject = evt.target.content as DisplayObject;
        child.addEventListener(AppEvent.CHILD_DATA, getChildData);
        addChild(child);
    function getChildData(evt:AppEvent):void
        trace(evt.data.var1,evt.data.var2);
        tTest.text = String(evt.data.var1);
        tTest2.text = String(evt.data.var2);
    I wonder if there is some confusion between MovieClip and DisplayObject when SWF2 tries to return to SWF1 frame 2, using MovieClip(parent.parent).gotoAndStop(2); and gets an error?:
    Error #1034: Type Coercion failed: cannot convert flash.display::Stage@2f1ef71 to flash.display.MovieClip.
        at Hotspot13_fla::MainTimeline/onClick()[Hotspot13_fla.MainTimeline::frame9:124]
    Hotspot13 is SWF2; SWF2 frame 9 uses the following to try to return to SWF1 frame 2, causing the above error:
    function onClick(event:MouseEvent):void
        trace(this,this.parent,this.parent.parent);
        dispatchEvent(new AppEvent(AppEvent.CHILD_DATA,{var1:score1,var2:rbselectedT},true)); 
        MovieClip(parent.parent).gotoAndStop(2);   
    Or maybe the AppEvent.as file is imported in frame 1 when it should be imported in another later frame like SWF1 frame 2 where it is first used?
    Best Wishes,

  • Importing flash symbols from an external SWF using URLrequest

    Hello.
    I'm trying for several days now to properly import flash symbols into a flex application.
    i can't only @Embed because the swf file that contains the skins will not be available locally so i need to use URLRequest.
    This is what I've got so far.
    1. I created a flash file, lets call it foo.swf that contains several elements in the library and each element has both `Export for ActionScript` and `Export for runtime sharing` on. one of the elements is called 'test' which is a movieclip of an image.
    2. i created a flex project that creates the swf flashSkins.swf that contains the following Wrapper class:
            package
                import flash.display.Sprite;
                    public class Wrapper extends Sprite
                     [Embed(source="foo.swf",symbol="test")]
                        [Bindable]public static var test: Class;
    I tested to make sure that this class properly fetchs symbols from the flash file properly
    using the following code:
        <fx:Script>
            <![CDATA[
                public var wrapper:Wrapper;
            ]]>
        </fx:Script>
            <mx:Image source="{Wrapper.test}"/>
    it loads the image and shows it properly.
    3. I created another swf file that will fetch the flashSkins swf and import the Wrapper class from it. this is where i fail.
            public function loadSkins():void
                    bgLoader = new Loader();
                    var bgURL:URLRequest = new URLRequest('http://files.xpogames.com/flashSkins/flashSkins.swf');
                    bgLoader.contentLoaderInfo.addEventListener(Event.INIT,onLoaded);
                    bgLoader.load(bgURL);
                public function onLoaded(e:Event):void {
                    var clazz:Class = bgLoader.contentLoaderInfo.applicationDomain.getDefinition('Wrapper') as Class;
                    var a:Object = new clazz();
                    theimage.source=a.test;
            ]]>
          </fx:Script>
            <mx:Image id="theimage" />
    I tried using getDefinition with 'wrapper' or 'Wrapper' but on both cases i get an error that the variable is not defined.
    any ideas?

    Did you try using the Event.COMPLETE instead of Event.INIT?

  • What is or isn't possible on iOS?  (Not having Loader, loadBytes(), external swfs, etc)

    My basic question is:  "What are the classes which we should not use for iOS using the packager."
    I have been trying for a few days trying to get a simple Flash app to run on the iPad.  A very simple app (with sound!) with just 2 classes works fine (Performance is a whole other issue.  We will get to that).  But if I try anything else, all I get is a white/black screen on the iPad.  So it would be really nice to know what classes, functions, etc we CANNOT use for the Packager.
    I have fairly simple app (not as simple as 2 classes) which loads some art assets via URLRequest/Loader, puts them on the stage.  Fairly common standard practice in AS3.
    I've read about not able to load an external file using the Packager.  So to fix the situation of loading assets, I have looked into the [embed] tag, which seems to work.  I hope the blogger doesn't mind, but this page is an excellent source on what works and doesn't work with the [embed] tag in it's various flavors:  http://www.richardleggett.co.uk/blog/index.php/2010/03/08/flash_builder_and_flash_pro_asse t_workflows.  For example, AS3 in a swf is stripped out from an external swf using [embed].
    The best way to load an external swf file for iOS seems to be using [embed] with "application/octet-stream" and load the swf through ByteArray (Option #4 in the link above).  This works great on the PC.  HOWEVER, on iPad, it fails.  The [embed] tag works on the iPad with the other ways, so my guess is that loadBytes() does not work.  Is this true Adobe/Flash guys?  Can you confirm this?
    My initial question is "why is this not allowed on iOS?".  If it is because of the fact that it uses a Loader, can it be changed so it's not using a Loader to construct a MovieClip?  I have a ByteArray with the raw swf/MovieClip data.  Why can't I construct a MovieClip from it without going through Loader?
    This loadBytes() failure seems to be the only thing preventing me from using the normal pipeline of Flash development in loading external assets.  If there are other ways people have found, please share!
    Now on to performance.  Adobe, can you post some examples/samples of code which runs at decent performance?  Like a "tech demo" of what is possible using the Packager running on iPad/iPhone.  That would be extremely helpful for everyone.  I have done a lot of the optimizing suggestions on various sites and pages ( and by Adobe http://www.adobe.com/devnet/flash/articles/optimize_content_ios.html), but I am not seeing the 30 fps performance that is MORE than possible on iPhone/iPad.  Displaying and moving around Bitmaps (I don't use any vector graphics) should be blazing fast.  Quake runs on iPad without any problems and that code is 10 years old.  Moore's law dictates that drawing Bitmaps using CPU should be faster than a 3D engine written 10 years ago...  I am trying out the new iOS 4.2 which is supposed to be "significantly" better, but I am still stuck on loadBytes().
    So at this point, I am blocked on loadBytes() and my performance for a simple app which draws a few Bitmaps and MovieClips is terrible.  I am hopeful some people out there have figured out some solution (there are lots of clever people out there) and I will stumble on to something.  But being forced to go native Objective-C seems to be my only option at this point.
    In summary, here are the questions I would like to ask the Adobe/Flash group for some more help/information/advise:
    - Why is Loader not allowed on iOS?  Is it a technical limitation of the hardware/os/Flash?  Will it never be supported?  What is the future of this class on iOS?
    - Why is loadBytes() not allowed on iOS?  I have the raw embedded data in memory.  I don't need to make a remote call so security should not be an issue.  Can I create a MovieClip without using Loader?
    - Why is AS3 stripped from the timeline when a Symbol is retrieved using [embed]?  Maybe this is the same reason loadBytes() fails, but if I could use [embed] and get a copy of the Symbol, that is what I need.  (There are issues with the mx.core.MovieClipLoaderAsset/Asset, but it is better than being blocked by loadBytes())
    - What are some apps you guys have written that we can use to compare PC vs iOS?  Again, a "tech demo" or sample code of what you as experts in Packager for iOS have done which runs at decent framerate (30+fps) would be of tremendous help.  If the Adobe/Flash group hasn't gotten the current Packager for iOS to handle more than 50+ 2D Bitmaps on screen running at 30+fps, that would be good to know.  Please let us know what the experts and owners of your software are capable of getting the most throughput using the Packager.  I'd hate to sound a bit fed up/angry, but I think you are wasting a lot of people's time and energy with a piece of software that, to me, seems like it was a bit early to release.  Flash can do some great things.  If it can do it on iOS, even better.  But PROVE it to us that it's possible, before having your customers run into barriers imposed on us by trial and error.
    Thanks.

    I have hardly ever seen a post here from someone at Adobe, so you may need to be patient.
    Read this article, and get its associated demo files, to see some good performing tech demos:
    http://www.adobe.com/devnet/flash/articles/optimize_content_ios.html
    Back to your main point, loaders are working, what isn't working for you is accessing of things in the library of a successfully loaded swf, that have been set to Export for ActionScript. That means that the swf you have loaded has an ActionScript Class, to represent the library symbol. iOS Flash apps are native ARM code, and don't include the virtual machines that a browser plugin has, and so it's not able to interpret ActionScript. That may be why it would fail.
    Now, I can think of at least a couple of reasons why you might want to have external swfs with elements that you want to reuse in the main swf. One would be if you're intending to make a lot of them, like say if you wanted to have an Asteroids game and the ability to use artwork from a set of different swfs. Another reason might be if you want to skin your interface, by taking specific elements from the loaded swf and using them in the main swf. That way you could have artists preparing those swfs for you, and you just include them in your package, and load the one you want.
    There is a way to do either of those things. The second one can be done by having the item as a named symbol on the stage of the loaded swf. With a to-be-loaded swf named "inner.swf", that has a movieclip on its stage named "mc1", this script in the main swf would load that external swf and use its symbol on the main swf's stage, without having to make the inner swf's symbol use ActionScript:
    var req:URLRequest = new URLRequest("inner.swf");
    var ldr:Loader = new Loader();
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loaded);
    ldr.load(req);
    function loaded(e:Event) {
    var mc:MovieClip = e.target.content as MovieClip;
    var innermc:* = mc.mc1;
    innermc.x = 50;
    innermc.y = 50;
    addChild(innermc);
    For the other case, you can take the item off the stage of the loaded swf and draw it into a bitmapdata, and then make as many bitmaps from that as you like. Here's the above example, only it adds the original movieclip to the main swf stage, and also creates a bitmap that looks the same:
    var req:URLRequest = new URLRequest("inner.swf");
    var ldr:Loader = new Loader();
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loaded);
    ldr.load(req);
    function loaded(e:Event) {
    var mc:MovieClip = e.target.content as MovieClip;
    var innermc:* = mc.mc1;
    innermc.x = 50;
    innermc.y = 50;
    addChild(innermc);
    var bmd:BitmapData = new BitmapData(innermc.width,innermc.height);
    bmd.draw(innermc);
    var bm:Bitmap = new Bitmap(bmd);
    bm.x = 150;
    bm.y = 150;
    addChild(bm);
    So, the thing to learn is that a native ARM code application does not have an ActionScript interpreter in it, and if you need to do something that normally requires interpreting ActionScript, find another way to do it.

  • Screenshots from external swfs

    How can i draw a movieclip that contains an external swf onto
    a BitmapData variable?
    I'm loading the movieclip with:
    moviecontainer=_root.createEmptyMovieClip("moviecontainer",10);
    moviecontainer.loadMovie("pacman.swf",0);
    Then i initialise the BitmapData var with:
    var snap:BitmapData = new BitmapData(Math.floor(nwidth),
    Math.floor(nheight),false);
    When a button is pressed i try this:
    snap.draw(moviecontainer,new Matrix());
    I expected the BitmapData snap to contain a screenshot from
    the external swf pacman.swf, but it doesn't.
    Does anyone know what i'm doing wrong?

    Thanks! I was close to giving up, but this really works
    great.
    The code for the php script is:
    <?php
    $data=explode(",",$_POST["img"]);
    $im=imagecreatetruecolor(max(1,$_POST["iwidth"]),max(1,$_POST["iheight"]));
    imagefill($im,0,0,imagecolorallocate($im,255,255,255));
    $i=0;
    for($x=0;$x<$_POST["iwidth"];$x++){
    for($y=0;$y<$_POST["iheight"];$y++){
    $r=hexdec(substr($data[$i],0,2));
    $g=hexdec(substr($data[$i],2,2));
    $b=hexdec(substr($data[$i],4,2));
    $color=imagecolorallocate($im,$r,$g,$b);
    imagesetpixel($im,$x,$y,$color);
    $i++;
    imagepng($im);
    ?>
    i changed the code inside the two for-loops in the .fla to:
    tmp = snap.getPixel(a, b).toString(16);
    pixels.push(tmp);

  • Any way to disable quiz click boxes from a parent SWF?

    We've got a parent SWF that serves as a navigational shell, allowing users to move between different Captivate slides which are essentially embedded SWFs. Some of these SWFs are Captivate hot spot quizzes. We've run into a fairly significant issue - when a Captivate slide has a click box, it sets up an event listener for that box. Unfortunately, when a user moves off of that SWF, the event listener is still in place (note: we're not actually unloading the SWF, we're simply hiding it and showing the next SWF). Once a user clicks into the new SWF, the following exception gets thrown:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at captivate.veela_as3::rdClickHandler/CheckSpriteClick()
    at captivate.veela_as3::rdClickHandler/CheckAllClicksDown()
    at captivate.veela_as3::rdClickHandler/onMousePress()
    We've narrowed this down to the click boxes and the event listeners associated with them. I need to know if there's some way that our parent SWF can call into the Captivate quiz SWF in order to disable those click boxes once the user moves off of the SWF. I know that we can disable them from within the quiz itself using an advanced action, but I'm just not sure if the same can be done from an external SWF (ideally, we would just call an advanced action from the parent SWF - I have no idea if this is possible).
    Any help would be much appreciated.
    - Terence

    First question, why are you simply hiding and not unloading them?
    If you can hide, I am assuming through a visible false or alpha = 0; then it seems like you would have the ability to relocate them as well, and since the loaded swf is housing its own buttons and hit areas they would move with their parent...
    So a cheap fix if you can access the objects would be to move them out of view, like to
    .x = -5000
    .y = -5000
    That might work...and might be the easiest way to "Re-add them to the stage without losing info, I am assuming the hide and not unload is for keeping score or something?
    You could then move them back to 0,0 if you needed them again...
    might help you

  • XML TREE calling external .swf

    Thanks to some research and the help from you guys, I am
    getting the hand of
    this XML tree business for Flash 8.
    Now, my question to you is this:
    How can I create a clickable link for (let's say) my nome
    Fornecedor 1.
    I would like to click on this link and call an external .swf,
    which I would
    load into an empty MC.
    Thanks again!
    <node label="Comercio e Servicos">
    <node label="Materiais Basicos">
    <node label="areia">
    <node label="SP">
    <node label="Fina">
    <node label="Fornecedor 1" /> //
    THIS WOULD BE THE CLICKABLE ITEM to call an external swf.
    <node label="Fornecedor 2" />
    </node>
    <node label="Media">
    <node label="Fornecedor 1" />
    <node label="Fornecedor 2" />
    </node>
    <node label="Grossa">
    <node label="Fornecedor 1" />
    <node label="Fornecedor 2" />
    </node>
    </node>

    To sum up:
    Clicking on a <node label> to call an external .swf
    "Sergiomon" <[email protected]> escreveu na
    mensagem
    news:eli0tj$aqd$[email protected]..
    > Thanks to some research and the help from you guys, I am
    getting the hand
    > of this XML tree business for Flash 8.
    >
    > Now, my question to you is this:
    >
    > How can I create a clickable link for (let's say) my
    nome Fornecedor 1.
    > I would like to click on this link and call an external
    .swf, which I
    > would load into an empty MC.
    >
    > Thanks again!
    >
    >
    >
    > <node label="Comercio e Servicos">
    > <node label="Materiais Basicos">
    > <node label="areia">
    > <node label="SP">
    > <node label="Fina">
    > <node label="Fornecedor 1" /> //
    > THIS WOULD BE THE CLICKABLE ITEM to call an external
    swf.
    > <node label="Fornecedor 2" />
    > </node>
    > <node label="Media">
    > <node label="Fornecedor 1" />
    > <node label="Fornecedor 2" />
    > </node>
    > <node label="Grossa">
    > <node label="Fornecedor 1" />
    > <node label="Fornecedor 2" />
    > </node>
    > </node>
    >

  • I can't copy my old iPhoto library from a external HD to my new mac?

    Hi. I just bought a new mac and want to have all my old iphoto pictures from my old mac into my new iPhoto library. I've tried to copy the old iPhoto library into a external HD(works fine), but the problem is that I can't copy it out from the external HD an in to my new mac again. It just say that it doesn't work because it doesnt have enough storage.
    I don't get why it would say that, because the old iPhoto library is 89.55 GB and I haven't used any memory at all on my new macbook pro, and my old macbook pro has memory enough to have the iPhoto library on it (the mac is 5 years old and has almost a full memory), so why can't my new macs memory manage the iPhoto library when my old mac can? It doesn't make sense at all.
    I've googled it, and it says everywhere that it should work by simply copy to external HD and move over the library from there and into the pictures folder, but this definitely doesn't work for me.
    I hope that some please can help me with this, I don't know what do to.

    Do you know how much space the cheapest macbook pro with reatina has?
    http://www.apple.com/mac/compare/notebooks.html
    A basic MBP may only have
    128GB solid-state drive

  • External .swf not loading on HTML pages

    Good morning,
    I'm having trouble and I was hoping someone could shed some light on what I'm doing wrong. I have a main .swf file from which external .swf files are being loaded through the use of buttons.
    When I preview the animation, everything works just fine. The problem occurs when I put the animation on the website where it needs to be. The main animation appears like it's supposed to, but the buttons are not successful in loading the external .swf files. I've made sure that all .swf files are on the server but still nothing. Could anyone help? I'm not sure what the problem is.
    Here's the AS:
    stop();
    var presentationLoader:Loader = new Loader();
    addChild(presentationLoader);
    //Navigation
    presentation1.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation2.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation3.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation4.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation5.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation6.addEventListener(MouseEvent.CLICK, buttonClick);
    function buttonClick(event:MouseEvent):void
    presentationLoader.load(new URLRequest(event.target.name + ".swf"));
    function homeClick(event:MouseEvent):void
    presentationLoader.unload();
    Thank you,
    - Cmarcoux

    For anyone having a similar problem in the future, the solution is in bold:
    stop();
    var presentationLoader:Loader = new Loader();
    addChild(presentationLoader);
    //Navigation
    presentation1.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation2.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation3.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation4.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation5.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation6.addEventListener(MouseEvent.CLICK, buttonClick);
    function buttonClick(event:MouseEvent):void
    presentationLoader.load(new URLRequest("../../media/flash/" + event.target.name + ".swf"));
    function homeClick(event:MouseEvent):void
    presentationLoader.unload();
    For the animation to work on a website, the file path was needed.

  • External swf and the tween class

    i have an external swf which i import into my main swf using
    the loadMovie command. my external swf has some tween class
    animations in it. if i run the main movie, the external swf movie
    runs fine of course...but the tween classes are not loaded. am i
    missing somthing?
    here is the code from the external swf file which is applied
    to a clickable movie clip of course.
    this.onRollOver = function() {
    rewind = false;
    play();
    var squaretween = new mx.transitions.Tween(previewthumb,
    "_xscale", mx.transitions.easing.Elastic.easeOut, 0, 1200, .5,
    true);
    var squaretween = new mx.transitions.Tween(previewthumb,
    "_yscale", mx.transitions.easing.Elastic.easeOut, 0, 1200, .5,
    true);
    squaretween.onMotionFinished = function() {
    loadMovie("hotairlarge.swf",
    "_root.homecontainer.printworkcontainer");
    any help would be great!

    try inserting the following to line 1,frame 1 your main swf:

  • Button from External SWF to Play Movie in Main SWF

    Hi Guys,
    Ok I'm working in Flash 8, Action Script 2;
    I'm building a website, in which the 'Gallery Page' has a link to an external swf file, which is a scrolling clip of thumbnails.
    What I want to do, is create each thumbnail into a button, which will then play a Movie Clip from a frame located in the Main swf file.
    (So basically, each thumbnail button is a small photo, will play that photo in a large scale as a movie)
    eg.
    thumbnail1_btn  needs to go to main swf and play movieclip1.mc, frame 1
    thumbnail2_btn nends to go to main swf and play movieclip1.mc, frame 2
    I'm unsure of the code for this? Or if I've built this up wrong?
    If someone could help me out, that would be great!

    If you haven't set _lockroot on the loaded SWF, than a simple _root call from the loaded SWF will talk to the main SWF.
    IE:
    on(release){
    _root.gotoAndPlay(1);
    If you did set the lockroot, then call the level directly, via:
    on(release){
    _level0.gotoAndPlay(1);
    Once on the root level, you can access a movie clip as normal.
    So:
    on(release){
    _level0.movieClip1.gotoAndPlay(1);
    will call the movie clip "movieClip1" which resides on the timeline of _level0 (which is main.swf in your instance), and tell it to jump to the first frame and start playing.

  • Loading from library conflicts with loading external swf

    I'm very new to ActionScript, so this might be incredibly basic. However, I've Googled and read myself into a coma and I'm not finding a solution.
    I have a movie with 6 navigation buttons.  Four of them load external .swf slideshows, and they work fine - as each file loads, the previous one clears the stage, etc.  The other button that I currently have set up is loading, from the library, an image.  The problem I'm having is that the slideshows replace each other on the stage - they're not stacking, they're replacing - but when the user selects the button that loads the image, the image overlays the last-selected slideshow.  If the user selects the image first, the image is visible when two of the external files transition.  Because of that 6th button, which is not yet even started, it's not desirable to me to simply set up the single image as another external file; if it's at all possible, I need to be able to pull from a library file when I build that last button.
    What I'd like to do - because there is no logical order that the buttons should be selected in - is figure out how to tell every button to remove the image file on click.  I've tried using this in the four buttons that link to the slideshows, to deal with the image (that's the one called quoteImage):
         if(myLoader != null && contains(quoteImage)){
            myLoader.removeChild(quoteImage);
    which has the advantage of not giving me any errors, but doesn't actually fix my problem.  I've tried many, many other things, and I'm just really stumped on what exactly I need to do to make this work the way I want it to.  Based on the fact that the books and online resources I've been using don't really cover this specific example, I suspect it might be an incredibly idiot thing to do, but I'd really like it to work this way if that's possible.
    The code as it stands, with the global variables and the first two buttons (the next three are identical to the second button and the sixth button doesn't exist) looks like this:
    var myLoader:Loader=new Loader(); 
    var quoteImage:Bitmap;
    stop();
    // Loads quoteImage from library
    btnQuotes.addEventListener(MouseEvent.CLICK, showquote);
    function showquote(event:MouseEvent):void {
    var myBitmapDataObject:myBitmapData = new myBitmapData(500, 350);
    var quoteImage:Bitmap = new Bitmap(myBitmapDataObject);
    quoteImage.x=150;
    quoteImage.y=180;
    addChild(quoteImage);
    // Loads industrial.swf from external file
    btnIndustrial.addEventListener(MouseEvent.CLICK, showindustrialcontent);
    function showindustrialcontent(event:MouseEvent):void {
    var myURL:URLRequest=new URLRequest("industrial.swf");
    myLoader.x=150;
    myLoader.y=180;
    myLoader.load(myURL);
    addChild(myLoader);
    Help is very much appreciated.

    I see now how to import and display a library class object
    using:
    var MovieClipClass:Class =
    Class(loader.contentLoaderInfo.applicationDomain.getDefinition("myLibraryAsset"))
    var movieClip:Sprite = new MovieClipClass();
    addChild(movieClip)
    But this seems to only work for SWF's published for AS3 Flash
    Player 9.
    I need to do the same for SWF's published with AS2 Flash
    Player 7.
    Any ideas?

Maybe you are looking for

  • A long-time Arch user is looking for an alternative

    Hello Arch users, I know that this forum is probably not the best place to ask a question like that but I'll try anyways: I have been using Archlinux for more than 5 years and I really like the simplicity and the Arch philosophy. However, as I cannot

  • Screen dim / Wake up

    A couple of nit pick things... One is the screen dimming, sometimes it does it with the option even being turned off. I know about the work-around but I was wondering if anyone came up with an actual solution to this. When I wake up sometime the scre

  • Problem w/ Duplicate PLD Template

    Good day mentors, I used Duplicate PLD Template to copy from a source PLD. In which now I have already have the correct design/configuration for client's lx300 printers. The problem I am facing now is that the source document or PLD was from Delivery

  • SQL Management Studio Installation Problems

    My hard drive crash and I'm forced to use Windows 8 on my laptop for a while. Visual Studio 2012 installed okay but I cannot get the SQL Management Studio to install. I have SQL Management Studio 2005 CD's and I've also tried to download and install

  • Finder window size not saved when cmd+click

    Hi. I'm not sure if anyone else is having this problem. I look through the forum but didn't find it posted. I re-sized my finder to a certain size and have done the same to some other folder such that they are basically all different sizes. However,