LoadMovie in as2

hi everybody
i am working in as2 under flash cs3 aon windows xp
i develop an audio player which can play dynamic audio files
of two formats "mp3" and "swf" from remote servers..
The issue is when i embed the player in html and make it live
to access through the internet..
it plays mp3 files without any issue but it cannot play swf
files from one specific server and it can play swf files from other
remote servers, the problem is really very strange since it works
fine on linux OS but not on windows.
and secondly when i hardcode the address of that specific
server which passed from html in actionscript and then i press
control+enter it plays the swf sound. but when i publish it with
hardcoded url in it and play the html file it doesnt play the
sound...
i try System.security.allowDomain("that specific server url")
and even i try System.security.allowDomain("*") but it doesnt
solve the problem.
i am unable to figureout the problem ..
plz help..
thanks

hi
actually mp3 audio file from same server working fine.
and swf audio file from same server plays only when i
hardcode the url in flash code and play it via ctrl+Enter and when
i publish it, then it doesnt works for me. so if it is still a
security issue then i also try crossdomain policy file and also use
System.security.allowDomain("www.servername.com")
so what can be the other possible option to cope down this
issue?
thanks

Similar Messages

  • AS2 drag and drop a masked content from loadMovie clip

    In the main content, when I have a movie clip like this   a1.a2.a3 while  a3 inside a2 and a2 inside a1, and a2 is a masked layer movie clip.
    I can drag and drop the masked content (while a1 stay still) with like this   a1.a2.onPress = function () { startDrag(this); }  and a1.a2.onRelease = function () { stopDrag(); }
    but then what i need is a1 stay in main content, while moved a2.a3 to an external .swf, and use loadMovie to put .swf(a2.a3) back into a1, and I can still drag/drop a2.a3 when a1 stay still.
    I tried differetn methods they all not working.  I've learned that you need to create another MC inside a1 like this a1.a4.a2.a3 ( while a2.a3 from loadMovie clip). it only work if I want to drag a1. but if I want to drag masked content a2.a3 it still doesn't.
    I really need help it's a project for work.

    if I apply drag to a1.a4 , it will still move the whole thing but not just masked content which is in a2.a3
    I pretty much given up on this one at this point..   gonna just throw everything into just one big swf save the struggling time,
    but thank  you for your input.

  • LoadMovie() &  XML.onLoad query(AS2)

    Hi all :)
    I have a Flash file that uses the loadMovie () to load JPG
    files successfully, example:
    imageuri = "../images/00_proto" + var1 + ".jpg";
    holder_mc.holder0.loadMovie(this["imageuri"]);
    Working
    Example
    'holder_mc' is the container clip and 'holder0' is the clip
    that stores the loaded JPG file, this works fine.
    I am upgrading the Flash file using an XML database, code
    example:
    var statesXML:XML = new XML();
    statesXML.ignoreWhite = true;
    statesXML.load("../XML/USA.xml");
    statesXML.onLoad = function(success)
    // XML loading excluded
    // Problem code
    imageuri = "../images/00_proto" + var1 + ".jpg";
    _parent.holder_mc.holder0.loadMovie(this["imageuri"]);
    The JPG's are not being loaded into the 'holder0' clip from
    inside the XML.onLoad() method. Spent hours trying to fix this,
    still have not resolved the problem. Any responses much welcomed!
    regards
    John
    www.javono.com

    Hi John,
    Its diffcult as I don't know what you've tried before, but my
    first stop would be to trace out imageurl to make sure the path to
    the image is correct (although usually you'll get an error message
    if not). Are you sure you need _parent. on the start of that path?
    Have you tried it without that?
    Tom.

  • LoadMovie- loading an external swf into movieclip in AS3

    Im extremely frustrated.........im trying to do something
    that was once very simple, which has now become over complicated
    unecessecarily.....i want to do a simple loadMovie type action and
    load an external clip into a movieclip called ph. my AS2 code would
    be:
    loadMovie("ExternalMovieClip.swf","ph");
    or
    on(release) {
    loadMovie("ExternalMovieClip.swf","ph");
    This no longer works. Can somebody tell me the new code that
    i would use with AS3 to do exactly what i just demonstrated? I
    honestly dont even want to touch AS3. The only reason i want to use
    it is because it makes skinning the components SOOOOOO much easier
    than AS2. That is the one and only reason im trying to convert to
    AS3. All the new load movie AS3 examples ive seen on google look
    like half a page long to do what i used to do in 2 lines. There
    must be a simpler and much easier way. I am a designer. It looks to
    me like Adobe went back to making flash for programmers only again
    leaving us designers out of the mix. Someone please help me, im
    desperate. I also have other old code that im sure im going to have
    to convert to AS3 for it to still work, and i may eventually need
    help with that as well, but ill stick with this loadMovie problem
    for now. Any and all help is appreciated. Thanks

    have a look here:
    http://www.smithmediafusion.com/blog/?p=381
    use this:
    var i =new Loader();
    i.load(new URLRequest(”yourSwf.swf”));
    myMC.addChild(i)
    myMC is the name of your clip on the stage.
    Dan Smith > adobe community expert
    Flash Helps >
    http://www.smithmediafusion.com/blog/?cat=11
    http://www.dsmith.tv

  • Load external swf thats AS3 in a AS2 swf

    i have a website made in actionscript 2, and now i need some
    functions from actionscript3 that actionscript 2 doesnt have, so im
    trying to load a external actionscript 3 swf in to a actionscript 2
    swf, is this possible?
    im using _root.mc.loadMovie("ms.swf");
    cuz it doesnt seem to work

    ah ok thanks
    have any idea how to load text into swf in AS2.0 without
    having a tag like text= ... because as far as i know only AS3's
    URLLoader can do it.

  • Strange behaviour of .swf movies - AS2/AS3

    Hello from Italy,
         this is my first post and I think I need some help from the experts...
         I am putting together an interactive Flash movie which is made of several different small movies. For the sake of clarity, I'll call them A.swf, B.swf, ..., Z.swf. The movies are launched from each other depending on certain buttons I've implemented.
         The first one, A.swf, is actually a sort of "main menu": it grants access to all the other movies and it is also the point of return from them when a certain button is pressed.
         Important: All the movies are scripted in AS3, except for the last one which, for a number of reasons, is scripted in AS2.
         The return from any (but the last) movie to the first, say B.swf to A.swf, is implemented like this:
    function eventResponseSole(event:MouseEvent):void {
    var myLoader:Loader = new Loader();
    addChild(myLoader);
    var url:URLRequest = new URLRequest("A.swf");
    myLoader.load(url);
    sole_btn.addEventListener(MouseEvent.CLICK, eventResponseSole);
         This is, of course, AS3.
         The last movie, which is scripted in AS2, returns to A.swf like this:
    luna_btn.onRelease = function() {
    loadMovie("A.swf", _root);
         The strange behaviour is this: if I launch Z.swf and navigate with the proper button up to A.swf, everything works. But if I launch A.swf, navigate to Z.swf and attempt to return, this doesn't work. There are no problems, instead, moving up and down between movies scripted in AS3, that is with the first bit of code I've pasted. My guess is that the syntax in AS2 is correct, but something stops A.swf from "launching itself" when the control is transferred to Z.swf, but the movie is launched in the original window. Is this diagnosis reasonable? And if so, would someone kindly provide a way out of this? Re-doing Z.swf in AS3 is not an option, I'm afraid, it will have to stay as it is. I also have to add I've tried some solutions by setting _lockroot, but this doesn't seem to work.
         Many thanks in advance!
         Marco Olivotto

    Mixing AS2 into AS3 is not without stipulations... and I am no expert on translating those stipulations, but here is what the Flash documentation says regarding the matter... the third paragraph may be significant to your case:
    - ActionScript 3.0 code can load a SWF file written in ActionScript 1.0 or 2.0, but it cannot access the SWF file's variables and functions.
    - SWF files written in ActionScript 1.0 or 2.0 cannot load SWF files written in ActionScript 3.0. This means that SWF files authored in Flash 8 or Flex Builder 1.5 or earlier versions cannot load ActionScript 3.0 SWF files.
    The only exception to this rule is that an ActionScript 2.0 SWF file can replace itself with an ActionScript 3.0 SWF file, as long as the ActionScript 2.0 SWF file hasn't previously loaded anything into any of its levels. An ActionScript 2.0 SWF file can do this through a call to loadMovieNum(), passing a value of 0 to the level parameter.

  • How to load an AS3 swf file into a AS2 swf file?

    Hi,
    i am trying to display a swf file using AS3 in a flash site which uses AS2. I know that loading the swf file in the normal way, into a dummy movieclip (loadMovie) or into a new level (loadMovieNum), doesn't work. The AS2 based flash site doesn't understand the new file. Is there another way to get around this problem?
    Many thanks
    92 North Ltd
    Leeds website, graphic and web banner design
    Phone 0113 815 1158
    http://www.92north.com

    Thanks kglad. Will give that a try
    92 North Ltd
    Leeds website, graphic and web banner design
    Phone 0113 815 1158
    http://www.92north.com

  • Can your loadMovie "file name" = timeline frame number?

    I have a simple slideshow that has 70 slides. Each slide is on a frame in the main timeline and I have the following AS 2:
    loadMovie("Data/5.swf", "container");
    stop();
    There will be 70 SWF files in that Data folder. Instead of having to manually type in 1, 2, 3, 4, 5...in that "Data/5.swf" attribute, is there a way to just tell it to load the SWF number based on the current frame? Frame 1 in the timeline loads 1.swf, frame 2 loads 2.swf, etc.
    That way I can just put the same AS on each frame instead of having to manually go in and type each one.
    Thank you!
    Scot

    Hey, kglad. I remember you!
    I adjusted it for AS2:
              loadMovie("Data/"+this._currentframe+".swf", "container");
      stop();
    Thanks!!!
    Scot

  • Flash Update Breaks loadMovie command

    After a recent update of the Flash player, a number of older swfs have suddenly stopped working after many years. It has just happened in the last month. First in Chrome and now Firefox, IE, and Safari in both Windows and MacOS. The problem appears to be related to the loadMovie command. All of the affected SWFs were written in AS2 and our clients aren't willing to pay for recoding the files in AS3. Specifically, the loadMovie command is no longer loading JPEG files into a movie clip holder. An example of a script command that suddenly stopped working is this:
    photoFile = "images/front_"+_global.projName1+".jpg";
    photo.loadMovie(photoFile);
    The image file names and directory structures have not been altered. There have been no identifiable changes to the servers these scripts reside on.
    Is this a bug with the recent Flash Player updates? I hope the loadMovie command is not being deprecated. Any help would be appreciated.

    Hi
    I've noticed that too.
    One friend reported that his portfolio website doesn't work anymore. Its one main.swf file which loads gallery.swf file which holds photos.
    It was working fine for me, than I realised that my flash player is 11.5, after I upgraded it into latest 11.6 it stopped working.
    Website is full screen swf. When gallery (button click) load attempt is made, instead of loaded gallery, blank screen is shown.
    Right click shows: "Movie not loaded" message
    gallery.swf is loaded with this command: loadMovie("gallery.swf", "GalleryHolder");
    It's 3 years old AS2 project.
    It's not big deal for me because Ill re-make it with jquerry gallery, and flash is generally being hated anyway.
    Im not happy about bad hype against flash but we need to move on.
    But it could make big problems for other people because their projects will stop working.
    Regards

  • I need an AS2 button that closes out a pop-up window...

    So, I’ve constructed a portfolio site with ActionScript 2.0, but I would like the pop-up window that displays the portfolio image to have its own ‘X’ button that closes the swf movie from the browser.  I’m assuming that the code begins something like this:
    on(release){
    //actionscript 2.0 code that closes the browser window.
    Any suggestions on how this will work across platforms and browsers?
    Best,
    R.

    Hi kglad,
    My main flash as2 file has a stage size of 1200 width x720 height.  I’ve looked online through various methods on creating pop-up browsers that will display a portfolio image when a button on the main.swf is clicked.  Having no luck in finding what I needed (most tutorials just give getURL examples where the image is displayed in a separate tab), it finally dawned on me to create an overlaying movie, of the same size as the document size, on the top layer of the primary flash stage.  Setting the movie symbol as ‘invisible’ keeps the movie symbol inactive and invisible until called by an action.  The button on the main.swf that calls the movie has the following as2 script attached to it:
    on(release){
                   loadMovie("images/aauComp.swf", _root.movie2);
    However, the aauComp.swf file is where the exit button is located.  I need to implement an on(release){} method onto the exit button in aauComp.swf  that will close the movie out in the main.swf file.  Here’s the double wammy, though: the exit button on the called movie file, aauComp.swf, does not recognize any gotoAndStop(); or on(release){} functions relating to itself when it is loaded. For instance, since I could not find any functions that would close the movie out and return me to the main.swf interface, I wrote the following command on the ‘exit’ button in aauComp.swf:
    on(release){
                   _root.gotoAndStop("blank_frame");
    Where “blank_frame” is within a scene of aauComp.swf that is completely empty – which should, in theory, allow for interaction with the main.swf below the loaded movie since there is nothing on that layer of the loaded aauComp.swf movie.  Make sense?  The ‘exit’ button works fine when aauComp.swf is tested and published by itself, but when it is called into the main.swf with the loadMovie(); function, the 'exit' button will not work and, so, it will not forward to the “blank_frame”.
    Any suggestions?  Let me know if you need anything clarified.
    Thanks.

  • Help with loadMovie function

    Hello,
    I have a flash file with a movieclip on the stage - instance name "hold_mc". Currently I am loading an external swf file (named tester.swf) into this movie clip with the following actionScript:
    loadMovie("tester.swf", "hold_mc");
    This works fine and once loaded, 'tester.swf' begins playing from frame 1.
    However... I would like to add some code that lets me specify a frame or better still - a frame label - that "tester.swf" will begin to play from once it is loaded into "hold_mc". It sounds like it should be relatively straight forward, but after trawling the web for an age I cant seem to find a solution that actually works.
    Any help would be greatly appreciated!
    John

    I too recommend the MovieClipLoader class. I think for AS2 that you might want to use the onLoadInit event (this will all make more sense when you check out the help files) though instead of onLoadComplete. I know that certain properties are not available at onLoadComplete. I'm not sure if that includes frame labels, but I'm sure they will be available at onLoadInit.

  • AS3 parent loading in AS2 child that in turn loads in jpegs *Problem*

    Hiya everybody.
    I'm getting a bald patch on my head from frustration with the following problem.
    I have a parent AS3 swf which loads in a AS2 swf like so;
    stop();
    var ldr:Loader = new Loader();
    ldr.load(new URLRequest( "as2child.swf"));
    addChild(ldr);
    contained in the AS2 file is the following script which loads in jpegs when the user clicks the next button, etc.
    //stuff that loads in different photos
    stop();
    var i:Number = 1;
    //load first image straight away.
    function initialloadup () {
    i = 1;
    startLoading("pic"+i+".jpg");
    initialloadup();
    next_btn.onRelease = function () {
    /*on clicking next image button load next image in sequence*/
    i++;
    if (i > 11 ) {i = 1};
    startLoading("pic"+i+".jpg");
    trace("pic"+i+".jpg");
    prev_btn.onRelease = function () {
    //on clicking previous image button load prev image in sequence
    i--;
    if (i < 1 ) {i = 11};
    startLoading("pic"+i+".jpg");
    function startLoading(whichImage) {
    loadMovie(whichImage, "imageLoader");
    however when you view the AS2 swf via the AS3 swf it does not seem to load in the jpgs when requested.
    I need to retain the AS2 file so cannot rewrite in AS3 as the image loading thing is only a small part of the AS2 file.
    Any ideas? might it be to do with how the AS2 is read in AS3?
    Cheers for your reading this
    Melacroso

    Hi Ned,
    Cheers for your thoughts. I've heard of the lockroot thingymajig. Tried it out but to no avail.
    I've attached a zip file containing the fla's and swf's and jpgs, just incase anyone yourself included might have anymore ideas.
    Thanks for your time
    Alec

  • Override loadMovie on MovieClip instance in AS 2

    Hi all,
    is there a way to override the loadMovie function of the
    MovieClip object via AS2 but only for one sepcific movieclip
    instance?
    I know there is a way using prototype to override the
    funciton globaly, but I only need to modify the behaviour of
    loadMovie on a specifc movieclip.
    in flash 8 using:
    myinstance_mc.loadMovie = function (url){
    // do what i want
    seems to work, but not in MX2004
    Any ideas?

    it seems nobody knows the answer to this question, well maybe
    another way could work:
    is there a way to add a listener on a movieclip object that
    informs another object/class once the loadMovie function of this
    movieclip is called?
    I tried overriding the onLoad onData events of the movieclip,
    but those get deleted once loadMovie is called on the
    movielcip

  • CS3 and AS2: Embedding an external swf file

    Hey everyone,
    I have built a few flash sites before and am trying to make one that is slightly more complicated and allows for dynamic, database stored images and text. I have built a dynamic gallery based on an XML feed in AS2 which works fine. I am trying to embed it into another FLA file that contains the remainder of the site (the gallery will be one page of the main site). I have tried a ridiculous number of different methods but just cannot get it to work. The gallery is built in AS2, so I am using an AS2 FLA file for the main template it is to be embedded in. The simplest method i have tried that i think should work is to create a new AS2 fla file, edit the actions on my actions layer to be:
    Empty.loadMovie("My Gallery.swf");
    I have then created a new layer for the content and added a MovieClip to the top left of it, named Empty. I have set the instance name of this movie clip to be Empty. From what I have understood from my reading this is the simplest way to display the external file but for some reason it just will not work. It seems to see My Gallery.swf as when i delete it from the local directory i get an 'Error opening URL 'file:///D|/Websites/My Gallery.swf'' message. This message does not appear when this file exists locally, however it just opens a blank screen with nothing within it.
    I have been reading numerous tutorials and posts and i'm pretty sure i'm being thick, but for some reason i can't seem to get it to work!
    Thanks so much for any light you could shed on this for my guys, it's driving me crazy!
    Dave

    I have  checked that a number of times and unless i'm going crazy (which is distinctly possible) then the instance name is set to Empty. I have uploaded a zip file containing the fla and swf file and the test swf file that is being embedded. You can download it here.
    Thanks so much for your help, i really am completely stumped and i know it's going to be something crazy i'm doing and i'm going to hate myself when i finally discover why!
    Dave

  • [CS3] FL 3.0 - AS2: _parent property not working!

    Hey Guys,
    I am not able to access the functions and variables of a parent SWF from a loaded SWF using the _parent notation in FlashLite 3.0 - AS2.
    Check the attachment.... I have attached the source files. Please unzip them and check that when you publish the parent.fla it loads the child.swf via a loadMovie() and then at the last frame of child.swf I have tried to access some property and method from parent.swf using _parent and I am not able to do so......
    Can somebody tell me why this is happening and what is the workaround for this!
    As ever,
    Vinayak Kadam

    Your parent swf needs to allow access for scripting by the child.  Read the Flash 8 security documentation for the full details on this.
    To solve it you should use system.security.allowDomain("*")
    Mark

Maybe you are looking for

  • Using Dynamic Variable Names

    I am hoping someone can help me out with this. I am creating my own record that has the format (id_1, title_1, id_2, title_2...id_50, title_50). I was wondering if there was a way that I could iteratively assign values to each attribute in this recor

  • 8800 GT availability - Non Apple brand?

    Hi, I bought a Jan08 8 core last month. I wanted to get the 512 mb Nvidia card, but I was told it wouldn't be available for 6-8 weeks. Since I needed the box for a specific job and couldn't wait, I went ahead and bought it with the stock ATI card. I'

  • Missing security classes

    Hi all, I have updated Security Class dimension via EPMA (added but also removed some classes). Deploy was successful and the application is in sync with EPMA. When I wanted to update security class access via HSS, I couldn't find new classes and old

  • Address Book Application/library/plist - unglued

    I had an issue with my address book. I really dislike this application for many reasons. Anyway, I looked at my console and found this entry: 2007-06-07 20:29:08.061 Help Viewer[345] -[SearchController openIndices:] caught a VTWIN exception. Bad inde

  • Booting different Mac operating systems.

    In the Windows world, the user can set up a computer to allow the selection of different operating system versions, such as Win98, WinXP, WinVista, to be chosen at startup. Can this be done with Leopard, or possibly Snow Leopard? I'd like to upgrade,