Help with gotoAndStop as3

I have two scenes. Main scene and Building 1 Scene.
If i put this code on my Main scene actionscript layer it does not work.
bldg1_thumb1.addEventListener(MouseEvent.CLICK, bldg1_thumb1Click);
function bldg1_thumb1Click(event:MouseEvent):void{
    gotoAndStop (2, "Building 1");
But if I make a new actionscript layer inside my Building 1 scene it does work.
how do i make this work by keeping all AS in my main scene?

Keep everything in one scene or keep the code where the object it targets exists.  If the code to add the event listener to the button is in scene 1 and the button is in scene 2, the button won't work... they must co-exist in the same frame.

Similar Messages

  • Help with FLVPlayback (as3)

    Hi There,
    I hope someone can save me with this.
    I am currently working on a project (AS3), where I have 2 frames, with 2 videos (using the FLVPlayback component).
    and I want to switch from one video to the next video, however the catch is when i switch to the next video I want the new video to play at the previous video time.
    example:
    Video 1 plays,  10 sec later, you click a button to go and see the next video (in another frame) and that new Video starts 10 sec into it.
    This is the codes I been using so far:
    import fl.video.VideoEvent;
    import fl.video.MetadataEvent;
    video1.addEventListener(VideoEvent.PLAYHEAD_UPDATE, timer);
    function timer(e:VideoEvent):void {
        var newTime = video1.playheadTime;
    nextFrame_btn.addEventListener( MouseEvent.MOUSE_UP, nextFrame);
    function nextFrame (MouseEvent):void
                gotoAndStop(2);
          video2.playheadTime = newTime;
    This doesn't work and I do not know what I am doing wrong.
    many thanks if you can help.

    Hi thanks for your reply.
    Ok I change the names of the button, etc to stop conflicts.. so this is the code:
    import fl.video.VideoEvent;
    import fl.video.MetadataEvent;
    var newTime:int;
    video1.addEventListener(VideoEvent.PLAYHEAD_UPDATE, counterX);
    function counterX(e:VideoEvent):void {
        newTime = video1.playheadTime;
    switch1_btn.addEventListener( MouseEvent.MOUSE_UP, switch1);
    function switch1 (MouseEvent):void
          gotoAndStop(2);
          vid1.playheadTime = newTime;
    It kind of works.. but I get these errors:
    The video player is in the connection error state. It enters this state when a video stream attempted to load but was unsuccessful. There are two possible reasons for the error: no connection to the server or the stream was not found.
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at brid_fla::MainTimeline/counterX()
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at fl.video::FLVPlayback/http://www.adobe.com/2007/flash/flvplayback/internal::handleVideoEvent()
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::doUpdateTime()
              at flash.utils::Timer/_timerDispatch()
              at flash.utils::Timer/tick()

  • Need help with this as3 code please

    i got a book called
    actionscript 3.0 adobe flash cs4 pro classroom in a book
    well im on lesson 2 and i followed every step to the letter its supposed to let the user choose a language but when i play the movie the text i want to come up is scrambled for some reason?
    so if some one could help thanks
    i am using cs5 idk if that matters
    http://www.mediafire.com/?memijczzo1y

    In CS5, go to "Text"---->"Font Embedding...". ( Pic.1 )
    Click on "All", ( Pic.2 )
    Then click the "Add" button. ( Pic. 3 ) The font will appear below.
    Then OK
    Pic.1
    Pic. 2
    Pic. 3
    Test your movie.
    Should work now.

  • Help with simple AS3 rollover plays flv

    hi Folks
    I am brand new to AS but am committed to learning it.  This is my very first simple project....
    I would like an flv on the stage to play back when you roll over an invisible button next to it.  I have three layers in the Timeline: a button, a video and an actions layer
    I have imported the flv to the stage ("clouds"), and made the button.  The code I have so far on the actions layer on frame one is:
    clouds_btn.addEventListener(MouseEvent.ROLL_OVER, playClouds);
    function playClouds(event:MouseEvent):void {
    play("clouds");
    playClouds();
    As I understand this: On the first line we define the button instance (clouds_btn); add an event listener to it; describe in the parentheses the parameters: a rollover mouse event triggering the function I have named "playClouds"
    Then I write the function: naming, identifying it as a mouse event.  The actual function between the curly braces has me stumped and that is as close as I could come by myself.  I can't find a list of "actions" anywhere- (play, gotoandPlay, etc) and i am very unclear on the syntax
    Then on the last line I call the function, which i *think* is necessary here.
    Questions:
    Do I need a stop(); anywhere in this code.  Why?
    Do I need 2 functions (rollOn, rollOff) to make this work?
    I am sure the code and my understanding of it needs some real help...
    Any hard info, pointers to documentation, online resources, etc. would be great.  Its a pretty hard thing to learn on your own......
    Thanks!

    If you have planted the video along the timeline, then your code should be...
    stop();  // to stop the timeline in the first frame
    clouds_btn.addEventListener(MouseEvent.ROLL_OVER, playClouds);
    function playClouds(event:MouseEvent):void {
         play(); // to play the timeline

  • Need help with as3 for popup window

    I am nearing the end of the semester in my Flash Animation class. I have learned very simple AS3 things, code snippets etc. I am trying to find the actionscript for coding a very simple popup window, but have not found a clue.
    Here's what I want to do...I have a white box with some type on the stage. When a person clicks on the white box, I want a popup to open that is larger, that will contain the same type but larger. That box will have an x so it can be dismissed. I don't want to do this in html, only in Flash CS5. I don't want a browser window, I just want a bigger version of the smaller box. I know how to build both boxes, just don't know how to write the code. I know there will be an on-click mouse event listener, and then I am lost.
    Can anyone help with the code I might use? It would be most appreciated.

    It would be something along the lines of... (using instance names relative to your description)...
    popup.visible = false;
    whiteBox.addEventListener(MouseEvent.CLICK, showPopup);
    function showPopup(evt:MouseEvent):void {
         popup.visible = true;
    popup.popupX.addEventListener(MouseEvent.CLICK, hidePopup);
    function hidePopup(evt:MouseEvent):void {
         popup.visible = false;

  • Help with unloading images AS3

    Please can anyone help me. I am new to Action Script and flash and am having a nightmare unloading images. The code below works but I keep getting the following error messages:
    TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/removeChild()
    at index_fla::MainTimeline/clickSection()
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/removeChild()
    at index_fla::MainTimeline/clickSection()
    Any help with this would be much appreciated.
    var ImgReq01:URLRequest=new URLRequest("images/home/01.jpg");
    var ImgReq02:URLRequest=new URLRequest("images/home/02.jpg");
    var ImgReq03:URLRequest=new URLRequest("images/home/03.jpg");
    var ImgReq04:URLRequest=new URLRequest("images/home/04.jpg");
    var ImgReq05:URLRequest=new URLRequest("images/home/05.jpg");
    var imgList:Array=[ImgReq01,ImgReq02,ImgReq03,ImgReq04,ImgReq05];
    var imgRandom = imgList[Math.floor(Math.random()* imgList.length)];
    var imgLoader:Loader = new Loader();
    imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
    imgLoader.load(imgRandom);
    function onComplete(event:Event):void
      var randomImage:Bitmap = Bitmap(imgLoader.content);
      randomImage.x=187.4;
      randomImage.y=218.1;
      addChild(randomImage);
    //handle events for info buttons...
    information. addEventListener (MouseEvent.CLICK, clickSection);
    home. addEventListener (MouseEvent.CLICK, clickSection);
    galleries. addEventListener (MouseEvent.CLICK, clickSection);
    function clickSection (evtObj:MouseEvent) {
    //Trace shows what's happening.. in the output window
    trace ("The "+evtObj.target.name+" button was clicked")
    //go to the section clicked on...
    gotoAndStop (evtObj.target.name)
    // this line is causing errors when navigating between the gallery and information buttons
    var Image:Bitmap = Bitmap(imgLoader.content);
      removeChild(Image);

    you really should be adding the loader to the displaylist, not the content.
    try:
    var ImgReq01:URLRequest=new URLRequest("images/home/01.jpg");
    var ImgReq02:URLRequest=new URLRequest("images/home/02.jpg");
    var ImgReq03:URLRequest=new URLRequest("images/home/03.jpg");
    var ImgReq04:URLRequest=new URLRequest("images/home/04.jpg");
    var ImgReq05:URLRequest=new URLRequest("images/home/05.jpg");
    var imgList:Array=[ImgReq01,ImgReq02,ImgReq03,ImgReq04,ImgReq05];
    var imgRandom = imgList[Math.floor(Math.random()* imgList.length)];
    var imgLoader:Loader = new Loader();
    imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
    imgLoader.load(imgRandom);
    function onComplete(event:Event):void
    imgLoader.x=187.4;
    imgLoader.y=218.1;
      addChild(imgLoader);
    //handle events for info buttons...
    information. addEventListener (MouseEvent.CLICK, clickSection);
    home. addEventListener (MouseEvent.CLICK, clickSection);
    galleries. addEventListener (MouseEvent.CLICK, clickSection);
    function clickSection (evtObj:MouseEvent) {
    //Trace shows what's happening.. in the output window
    trace ("The "+evtObj.target.name+" button was clicked")
    //go to the section clicked on...
    gotoAndStop (evtObj.target.name)
    // this line is causing errors when navigating between the gallery and information buttons
    if(this.contains(imgLoader){
      removeChild(imgLoader);

  • Need help with AS3 to play movies

    Here is my what I'm working with: Flash CS3, AS3. I have 4
    buttons and 4 movies (each button will be asigned to play one of
    the 4 movies).
    Not sure if this is the best layout but here is what's
    included in my file. I have an Actions layer, 4 buttons (on 4
    different layers), 4 embedded movies (on 4 different layers...all
    about 5-8 seconds long). I'm sure this is simple but figuring out
    the code for AS3 is like learning Chinese....I need major help with
    this.
    Lets say that my buttons have instance names like button1,
    button2, button3, button4, and my movies have instance names like
    movie1, movie2, movie3 and movie4. Here's the catch. I don't want
    the movies viewable (or seen) until the user selects one of the
    buttons. So if the user selects button1 the movie will appear (next
    to the button without any contols...just a movie with a border) and
    play. If the user hovers off or moves the mouse off the button, I'd
    like for the movie to disappear.
    Can someone please give me the the code needed so that when I
    select button1 that it will play movie1, button2 w/ movie2....and
    so on.
    Thanks for your help!

    Here is the link to the fla file.
    http://joshhicks.com/flash/flashfile.html
    I updated the link to the latest swf
    http://joshhicks.com/flash/del2.html
    I added stop(); to the 1st frame of each moive and this fixed
    the movies from playing in the background unseen. If you can help
    me with one last question...then the file will be complete. As of
    now when you select one of the movies, it plays once thru and
    starts back at frame one (loops) which is the way I want it to
    play. But if you hover off one of the buttons while the movie plays
    (lets say when the movie is showing the number 2) when you go back
    to view the same movie, it will start where you left off (it will
    start on the fram showing 2 and not 1). How can this be set up to
    play from the beginning of each movie everytime you happen to go
    back and click on the button? Thanks

  • Help with adding image onclick

    Hey everyone,
    I am making a simple game in AS3 and need help with adding an image once they have click on something.
    On the left of the screen are sentences and on the right an image of a form. When they click each sentence on the left, writing appears on the form. Its very simple. With this said, what I would like to do is once the user click one of the sentences on the left, I would like a checkmark image to appear over the sentence so they know they have already clicked on it.
    How would I go about adding this to my code?
    var fields:Array = new Array();
    one_btn.addEventListener(MouseEvent.CLICK, onClick1a);
    one_btn.buttonMode = true;
    function onClick1a(event:MouseEvent):void
        fields.push(new one_form());
        fields[fields.length-1].x = 141;
        fields[fields.length-1].y = -85;
        this.addChild(fields[fields.length-1]);   
        one_btn.removeEventListener(MouseEvent.CLICK, onClick1a);
        one_btn.buttonMode = false;
        //gotoAndStop("one")
    two_btn.addEventListener(MouseEvent.CLICK, onClick2a);
    two_btn.buttonMode = true;
    function onClick2a(event:MouseEvent):void
        fields.push(new two_form());
        fields[fields.length-1].x = 343.25;
        fields[fields.length-1].y = -85;
        this.addChild(fields[fields.length-1]);
        two_btn.removeEventListener(MouseEvent.CLICK, onClick2a);
        two_btn.buttonMode = false;
        //gotoAndStop("two")

    I don't know where you're positioning the button that should enable/disable the checkbox but for "one_btn" let's just say it's at position: x=100, y=200. Say you'd want the checkbox to be to the left of it, so the checkbox would be displayed at: x=50, y=200. Also say you have a checkbox graphic in your library, exported for actionscript with the name "CheckBoxGraphic".
    Using your code with some sprinkles:
    // I'd turn this into a sprite but we'll use the default, MovieClip
    var _checkBox:MovieClip = new CheckBoxGraphic();
    // add to display list but hide
    _checkBox.visible = false;
    // just for optimization
    _checkBox.mouseEnabled = false;
    _checkBox.cacheAsBitmap = true;
    // adding it early so make sure the forms loaded don't overlap the
    // checkbox or it will cover it, otherwise swapping of depths is needed
    addChild(_checkBox);
    // I'll use a flag (a reference for this) to know what button is currently pushed
    var _currentButton:Object;
    one_btn.addEventListener(MouseEvent.CLICK, onClick1a);
    one_btn.buttonMode = true;
    function onClick1a(event:MouseEvent):void
         // Check if this button is currently the pressed button
         if (_currentButton == one_btn)
              // disable checkbox, remove form
              _checkBox.visible = false;
              // form should be last added to fields array, remove
              removeChild(fields[fields.length - 1]);
              fields.pop();
              // clear any reference to this button
              _currentButton = null;
         else
              // enable checkbox
              _checkBox.visible = true;
              _checkBox.x = 50;
              _checkBox.y = 200;
              // add form
              fields.push(new one_form());
              fields[fields.length-1].x = 141;
              fields[fields.length-1].y = -85;
              this.addChild(fields[fields.length-1]);
              // save this button as last clicked
              _currentButton = one_btn;
         // not sure what this is
        //gotoAndStop("one")
    I'd also centralize all the click handlers into a single handler and use the buttons name to branch on what to do, but that's a different discussion. Just see if this makes sense to you.
    The jist is a graphic of a checkbox that is a MovieClip symbol in your library exported to actionscript with the class name CheckBoxGraphic() is created and added to the display list.
    I made a variable that points itself to the last clicked button, when the "on" state is desired. If I detect the last clicked button was this button, I remove the form I added and the checkbox. If the last clicked button is not this button, I enable and position the checkbox as well as add the form.
    What is left to do is handle the sitation where multiple buttons are on the screen. When a new button is pushed it should remove anything the previous button added. This code simply demonstrates clicking the same button multiple times to toggle it "on and off".

  • Help with linking buttons to Scenes

    Hey,
    Rookie to Flash and AS3. Just needed some help with my buttons. Im making a flash program about pancakes (random I know). I have a "Mainmenu" scene and then a "Recipe" scene. I have a button on my mainmenu which takes me to the recipe page when I click it, the code behind the button is
    "stop();btn_recipe.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);function mouseDownHandler(event:MouseEvent):void {
    gotoAndStop(1, "Recipe");
    Then when I arrive at my recipe page I have a button which will take me back to my MainMenu, the code behind that button is:
    "stop();btn_home.addEventListener(MouseEvent.MOUSE_DOWN, mouse5DownHandler);function mouse5DownHandler(event:MouseEvent):void {
    gotoAndPlay(1, "MainMenu");
    So I run my program and the first button works and takes me to recipe page but the button to get to the main menu does nothing, click it and no response or anything
    Please help

    First, hopefully having all your code mushed onto the same line is a copy/paste error, otherwise it should look like...
    stop();
    btn_recipe.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    function mouseDownHandler(event:MouseEvent):void {
         gotoAndStop(1, "Recipe");
    If the intention is to click the buttons to make them work, then you should use CLICK instead of MOUSE_DOWN.  MOUSE_DOWN can be a persistent state whereas CLICK involves releasing it afterwards.
    As for the code to get you back home, where is it located on the timeline?  Are you getting any error messages when you try to use it?
    One thing you should learn to use is the trace() function.  It is useful for troubleshooting.  You can use it now to see if your second button is talking to the function at all...
    stop();
    btn_home.addEventListener(MouseEvent.CLICK, mouse5DownHandler);
    function mouse5DownHandler(event:MouseEvent):void {
         trace("the button works okay");
         gotoAndPlay(1, "MainMenu");
    If you don't get that message in the output panel, you'll know the button is not properly coded to work.
    Most folks here will recommend you get away from using scenes in a design that includes navigation--they have a history of being problematic.  Instead of using scenes, divide the one main timeline up into sections or use movieclips for the sections and manage their visibility... or do a bit of both.

  • Help with If statement please

    Hi,
    First Special thanks to Kglad for the help with the AS1 to AS3 conversion.
    I've been able to link up my buttons to play a different frames of the movie. this was my novice way of finally getting the programming to work.
    In frame 95 I have
    var myLoader:Loader = new Loader();
    addChild(myLoader); var url:URLRequest = new URLRequest("page1.swf");
    myLoader.load(url);
    in frame 165:
    var myLoader1:Loader = new Loader();
    addChild(myLoader1); var url1:URLRequest = new URLRequest("page1.swf");
    myLoader1.load(url1);
    My buttons link to 116 which plays a frame and loads ^
    in frame 226: removeChild(myLoader).
    But if the user has looped back into home from another part in the movie clip then it would need to remove myLoader1 instead of myLoader.
    I'm guessing there is some really dynamic way to solve the programatic nightmare i'm developing, but I'm really novice.
    So what i need is an if statement for frame 226
    That would do something:
    if(myLoader <> null
         removeChild(myLoader)
    else(
    removechild(myLoader1)
    Anyone have a method for this?

    yes, you can use the same urlrequest but just change its url property:
    // initialize, for example in frame 1.  this is done once and never again:
    var loader:Loader=new Loader();
    var urlR:URLRequest=new URLRequest();
    //  then in frame 2, for example:
    urlR.url="page1.swf";
    loader.load(urlR);
    //  in frame 20, for example:
    urlR.url="page2.swf";
    loader.load(urlR);
    // in frame 30, for example:
    urlR.url="page3.swf";
    loader.load(urlR);
    //etc.  if you're loading any swfs that play streams (sound or video), you'll want to add some code to this.

  • Need Help With Video In Flex Mobile

    Hi,
    I have been searching quite a bit for information on this and have found really nothing useful for my problem. So far, I've converted the actionscript code posted here: http://www.adobe.com/devnet/flash/articles/osmf-media-player.html
    to work within my ios mobile project. The problem is that no matter what I have tried, I can hear the video but not see it. That codes uses the OSMF framework, which uses StageVideo I think, so I've tried setting the application background alpha to 0 as has been posted about; still no video though. The project is also set to use direct rendering. I've even tried some bare bones AS code to implement the StageVideo, as others have posted here, but still same thing. So can anyone either show me a working example or provide any suggestions on what I might be doing wrong?
    thanks

    Hi, Keith Lee -
    I'm sorry that I cannot help with your problem, but I'm posting a few URLs that may perhaps help - 
    Working with video: http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7e1a.html
    Getting started with stage video: http://www.adobe.com/devnet/flashplayer/articles/stage_video.html
    Stage video articles and tutorials: http://www.adobe.com/devnet/flashplayer/stagevideo.html
    ActionScript reference: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/StageVideo. html
    Thanks,
    Mallika Yelandur
    Adobe Community Help & Learning

  • Need help with a simple basketball game.

    Hi im new here and I need help with making this simple basketball game.
    Im trying to recreate this game from this video. Im not sure if he is using as2 or as3
    Or if anyone could help me make a game like this or direct me to a link on how to do it It would be greatly appreciated.

    If you couldn't tell whether it is AS2 or AS3, it is doubtful you can turn it from AS2 into AS3, at least not until you learn both languages.  There is no tool made that does it for you.

  • Help with Errors please!

    Hi, I'm building a Flash website.
    I've used frames with names to contain the different 'pages'
    of the site. On the frame called 'SVHS1' I've built an XML mp3
    player with buttons and a volume slider.
    I'm having a couple of problems with this section of the
    site.
    Firstly: when I 'test movie' and navigate to the mp3 player
    section it all works fine, the mp3s load correctly, the playback
    controls work fine, and the volume slider does what it's supposed
    to do. But if I've used the volume slider to adjust the volume (and
    only then) and then navigate to the next frame 'SVHS2' (or any
    frames that are later in the main timeline) I get multiple
    occurrences of the following error in the output pane:
    TypeError: Error #1009: Cannot access a property or method
    of a null object reference.
    At PSPWebsite1_fla::MainTimeline/adjustVolume()
    I understand (from reading other posts/help etc.) in
    principle what is causing this, but my knowledge of AS3 is too
    limited to know exactly what is wrong with my script or how to fix
    it.
    Secondly: if I press the stop button on my mp3 player and
    then navigate to another frame (any frame before or after
    ‘SVHS1’) the site works fine, and the mp3 player works
    perfectly if I go to that frame again. But if I navigate to another
    frame without first stopping the song it continues to play even
    though I’m not on the mp3 player frame, and if I go back to
    the mp3 player before the song has finished it starts playing
    automatically from the beginning of the first song in the XML list
    again and simply doubles up the sound, which is horrible. When this
    happens the playback controls only affect the 2nd version
    (understandably).
    I think this is probably quite simple to fix, assuming that I
    have to write some script that tells the mp3 player to stop playing
    if/when the user navigates away from that frame...but I don’t
    know how to do this.
    Any help with either of the above would be much appreciated.
    The attached script is for the mp3 player frame.

    You can consider the trace function as being a "can you hear
    me now" helper (instead of an annoying tv commercial gimmick). It
    displays whatever it's told to in the same output window that you
    see that error message come up in. There are two ways I'll usually
    use it.
    I'll often end up simply using a trace("here"); as a means of
    seeing where a process is getting hung up. I gradually move that
    line of code thru what I know to be the step by step sequence of
    the code until "here" no longer shows up. It normally indicates
    that the preceding line of code is where the ball got dropped.
    In AS3, which is often a little more helpful when it trips on
    something, such as the error message you received which tells you
    there's a problem in the adjustVolume function, you can use it to
    see what element in that function is either undefined or out of
    scope.
    Place... trace(vol); ... just after the first line of code in
    that function to see if vol is a number. If it is, then you know
    that line is okay and you can move on to check the next line. If it
    isn't a number, then move the trace before that line and change it
    to... trace(volume_mc.slider_mc.x); ... and see if it is a value.
    If it isn't, then change the trace to check to see what
    trace(volume_mc); results in.... so on and so on.
    It's basically a process of working your way thru code to
    narrow down what piece is the undefined/out-of-scope (or a syntax
    error) element that is causing the problem.

  • Please help with LoaderContext().checkPolicyFile

    Hello everybody, i'm newbie in as3 and I need your help with
    a such problem. It's need to download gif pictures. Flash widget
    and source of gif pictures are placed in different domains.
    Locally in Flashcs3 environment it works okay but if I put it
    on IIS server I get the such error message from security box under
    the firefox browser:
    SecurityError: Error #2123: Security sandbox violation:
    LoaderInfo.content:
    http://www.mydomain.com/test/widget.swf
    cannot access www.seconddomain.com/gif/submit_but.gif. No policy
    files granted access.
    at flash.display::LoaderInfo/get content()
    at com.techwire.classes::ResourceLoader/completeBmpHandler()
    For this case I've found the such solution:
    Security.loadPolicyFile("
    http://www.mydomain.com/test/crossdomain.xml");
    var context:LoaderContext = new LoaderContext();
    context.checkPolicyFile = true;
    loader.load(request, context);
    in crossdomain.xml :
    <cross-domain-policy>
    <allow-access-from domain="*" secure="false"/>
    </cross-domain-policy>
    But after that I have the same error message. What i am doing
    wrong? Help me please..
    code of class:
    public class ResourceLoader extends Dispatcher
    public function ResourceLoader():void
    Security.loadPolicyFile("
    http://www.mydomain.com/test/crossdomain.xml");
    loader = new Loader();
    request = new URLRequest();
    loader.contentLoaderInfo.addEventListener(Event.CO MPLETE,
    completeBmpHandler);
    loader.contentLoaderInfo.addEventListener(IOErrorE
    vent.IO_ERROR, ioBmpErrorHandler)
    public function loadResources(urlsArray:Array=null):void
    var context:LoaderContext = new LoaderContext();
    context.checkPolicyFile = true;
    request = new URLRequest(my_url);
    //loader.load(request);
    loader.load(request, context);
    private function completeBmpHandler(event:Event):void
    count++;
    resources.push(Bitmap(Loader(event.target.loader).
    content));
    var loader:Loader = event.target.loader;
    var textureMap:BitmapData =
    event.target.content.bitmapData.clone();
    }

    What is the domain that you're loading the gif from?
    if your loading swf is at
    http://www.mydomain.com
    You need
    Security.loadPolicyFile("
    http://www.seconddomain.com/crossdomain.xml");
    And the crossdomain file at that location needs to grant
    access to your mydomain.com or to "*" which is all domains as per
    your example.

  • Can you help with the code to publish Flash to my own domain.

    Thank you for your help, I publish the my site to my own domain, I do not use .Mac, I tested your code and ity works well on .Mac, can you help with the code to publish to my own domain.
    Thank you again

    You appear to have just collected a variety of code snippets and thrown them together, including a section of AS2 code ( gage.onRelease = function() {... )
    The suggestion I offered yesterday still stands.  You should find a tutorial regarding AS3 and the atan2 function.  Beyond that, what you show suggests this is a school assignment.  You should seek help from your fellow students and instructor if that is the case.

Maybe you are looking for

  • Security update broke Citrix

    I use Citrix to access my office network, and have been using the latest version (10.00.6) since it was launched a week or so ago. Today I installed the new Leopard security updates on my MacBook, and now Citrix won't work - I get an error message "E

  • Why does "other" take up so much space on my iPhone?

    I got an iPhone 5s 16 GB at the end of June 2014.  I keep running out of memory and when I recently plugged my phone into iTunes, I noticed that "other" is taking up around 3 GB of space. I know the usual delete pictures and browsing history spiel, a

  • PEOPLE WITH DEAD PIXELS ATTENTION

    if you have a dead pixel, i had one and have sent it back, they will fix. be careful sometimes dead pixels can spread and take over whole screen!!

  • Oracle 8i SQL - Dealing with no records matching a value

    Warning: before you read this, please understand I'm no expert on SQL, so it's quite likely I screwed something obvious up... I'm trying to do a query kind of like the following: SELECT BOM.COMPONENT, BOM.QTY_PER, BOM.PARENT, BOM2.PARENT_QTY_PER FROM

  • Gmail email print is small and I don't know how to adjust it.

    When I open my email the message print is so small I cannot read it. Some say it is an adjustment on the zoom feature in google which I don't know about or where to find the adjustment. Others have said that it is the settings in gmail again which I