Movieclip button in movieclip?

i have put the attached code in a frame, that's in a
movieclip. gotei13_thumbnail is a movieclip, that's in the same
movieclip as the script.
why does this not work?
if i copy the script to a frame on the main timeline, and
copy gotei13_thumbnail to the main timeline, it works just fine.
i'm guessing there's some more script i have to add?
please help me, asap. thank you.

i tried that
what i get is
"**Error** Symbol=charactersPage_mc, layer=gotei 13,
frame=185:Line 1: Statement must appear within on/onClipEvent
handler
this.onRollOver = function(){
**Error** Symbol=charactersPage_mc, layer=gotei 13,
frame=185:Line 4: Statement must appear within on/onClipEvent
handler
this.onRollOut = function(){
Total ActionScript Errors: 2 Reported Errors: 2"

Similar Messages

  • How do I use a button within a movieclip to go to the root?

    Hi there, I am new to flash and AS3 and need some help
    getting my buttons to work.
    I made a script for the file that i am working with that has
    buttons located within 2 movieclips. I want that button to load and
    image into a UILoader (problemLoader_mc) that I placed on the stage
    on the main timeline (the timeline that contains WeekBar_mc). The
    problem is that I don't know how to get to the root of the file to
    start a new directory to tell my function to load the image i want.
    I have tried multiple approaches including:
    MovieClip(root).problemLoader_mc.source = problemArray[0]
    MovieClip(parent).problemLoader_mc.source = problemArray[0]
    root.problemLoader_mc.source = problemArray[0]
    parent.problemLoader_mc.source = problemArray[0]
    (root as MovieClip).problemLoader_mc.source = problemArray[0]
    If anyone can help me out with this, I would greatly
    appreciate it, I am banging my head against a wall at the moment.
    (Also, please excuse my vague descriptions, I am still learning the
    official terms.)
    Here is the code that I have written that pertains to this
    problem:

    I have a mental block for reasoning things out as far as
    assigning the listener to an object two mc's away from the main
    timeline while having the function in the main timeline, so I may
    play with that on my own for awhile. One thing you didn't do
    though, was to pay the same attention to the problemArray[0]
    assignment in that function, which I assume also lives in the root.
    But here's what I'd do for the moment.
    Take all that code except the array and plant it in the
    timeline where WEEK1btn lives, modifying it as follows....
    WEEK1_btn.addEventListener(MouseEvent.CLICK, pload1);
    function pload1(event:Event)
    MovieClip(this.parent.parent).problemLoader_mc.source =
    MovieClip(this.parent.parent).problemArray[0];
    I haven't utlized root myself yet, so I am not comfortable
    offering you a solution that attempts it.

  • MovieClip buttons inside a MovieClip button inside another MovieClip button

    I am trying to make a Portfolio of my study abroad experience and can get something right about the movie clip buttons inside each other. I have a button to click on titled "travel" and a window shows up with more movieclip buttons to organize different locations of pictures. I can click on the button to have to slide of pictures but nothing happens. I have the "turnOffAllButtons"  coding and  also have the coding for stay clicked, but I can't get the 3rd set to show up. what am i not doing?
    I don't have any errors or output comments showing up

    I have it working now. what I did, I make a slideshow setup (gotoAndStop(1);) in a specific frame and the code I put in for the next, didnt work.
    this is was I have now, without the "turnOffAllButtons" coding:
    Main Button (actions Layer):
    stop();
    travelButton_mc.buttonMode=true;
    travelButton_mc.addEventListener(MouseEvent.ROLL_OVER, colorizetravelButton);
    function colorizetravelButton(givenEvent:MouseEvent){
      if (givenEvent.currentTarget.currentFrame != 50)
      travelButton_mc.gotoAndPlay(2);
    travelButton_mc.addEventListener(MouseEvent.ROLL_OUT, decolorizetravelButton);
    function decolorizetravelButton(givenEvent:MouseEvent){
      if (givenEvent.currentTarget.currentFrame != 50)
      travelButton_mc.gotoAndPlay(21);
    travelButton_mc.addEventListener(MouseEvent.CLICK, loadtravelLocations);
    function loadtravelLocations(givenEvent:MouseEvent){
      travelButton_mc.gotoAndStop(50);
      travelLocations_mc.gotoAndPlay(1);
    Inside the travelLocations_mc I have currently one button to show a slide of pictures, this is the second layer of buttoncode:
    stop();
    scotlandButton_mc.buttonMode=true;
    scotlandButton_mc.addEventListener(MouseEvent.ROLL_OVER, colorizescotlandButton);
    function colorizescotlandButton(givenEvent:MouseEvent){
      if (givenEvent.currentTarget.currentFrame != 50)
      scotlandButton_mc.gotoAndPlay(2);
    scotlandButton_mc.addEventListener(MouseEvent.ROLL_OUT, decolorizescotlandButton);
    function decolorizescotlandButton(givenEvent:MouseEvent){
      if (givenEvent.currentTarget.currentFrame != 50)
      scotlandButton_mc.gotoAndPlay(21);
    scotlandButton_mc.addEventListener(MouseEvent.CLICK, loadscotlandInfoPage);
    function loadscotlandInfoPage(givenEvent:MouseEvent){
      scotlandButton_mc.gotoAndStop(50);
      scotlandInfoPage_mc.gotoAndPlay(1);
    I turned the alpha up so you can see the mc that loads
    I currently have a keyframe at 60 with a code of stop(); so the travelLocations_mc will still
    does this make sense?

  • Help please!  I need code for a button to stop a movieclip, when both are in a nested animation.

    I'm working on a project that has a button and a movieclip, which we want the button to stop, both nested in a movieclip on the main timeline.
    The button instance = muteBtn
    The clip to stop instance = backmusic
    The movieclip they are nested in = ecard
    There's also a preloader that works just fine on the main timeline.
    I've seen a wide variety of ways to stop a streaming MP3 and they all look way too complicated for my current Flash knowledge level.  As far as I know, if the MP3 is in a movieclip, stopping that clip will also stop the MP3.  If that's just dead wrong and what I'm trying to do will never work, please just let me know so I can struggle in another direction.
    What I'd prefer though would be the coding to make this button work.  I've tried a wide variety of ways to code something that seems like it should be so simple, and keep getting the error "Access of undefined property muteBtn".  I'm assuming this means it can't find the muteBtn in the nested layer.  How do I better define the muteBtn?  Do I then need to add something else that more clearly defines where the clip I want it to stop is since it is nested too?  PLEASE HELP ME!! Thank you in advance!
    Some of what I've tried:
    function endMusic(e:Event):void {
        ecard.backmusic.stop();
    or
    function endMusic(e:Event):void {
        backmusic.stop();
    with...
    muteBtn.addEventListener(MouseEvent.CLICK, endMusic);

    When you target objects, you need to consider the path to the object based on where you are trying to target from.  So if your code is in the main timeline and your button is inside a movieclip, then you need to target the button via the movieclip...
       movieclipName.muteBtn.addEventListener(MouseEvent.CLICK, endMusic);
    As far as stopping a moiveclip resulting in stopping a sound from playing, it is not likely to work.  To stop a sound you need to target the sound to stop it.

  • Using the radio button component to go to a frame on a MovieClip

    hello,
    I am using the radio button component in Flash with a continue button.
    When the user clicks their option in the radio button and then clicks continue, I want it to go to a movieClips Specific frame.
    Here is the breakdown and the script I have so far is below.
    The radio group os named RadioButtonGroup
    The instance names for each of the three options are noviceButton,intermediateButton,expertButton
    My continue button has an instance name of continueButton
    and my movie clip I am trying to target has an instance name of level_mc
    here is my code so far:
    continueButton.enabled=false
    noviceButton.addEventListener(MouseEvent.CLICK, revealContinue);
    intermediateButton.addEventListener(MouseEvent.CLICK, revealContinue);
    expertButton.addEventListener(MouseEvent.CLICK, revealContinue);
    function revealContinue(evt){
        continueButton.enabled=true;
    continueButton.addEventListener(MouseEvent.CLICK, clickContinue);
    function clickContinue(evt){
    var frameNumber=mc_levels.Number(noviceButton.group.selectedData)
    gotoAndStop (frameNumber);
    the problem starts with my varFrame line-I don't know how to get it to go to the movieClip and gotoAndStop at a specific frame, based on which radio button was clicked and after the continue button is clicked.
    Does anyone out there have any ideas?
    thanks
    babs

    use:
    continueButton.enabled=false
    noviceButton.addEventListener(MouseEvent.CLICK, revealContinue);
    intermediateButton.addEventListener(MouseEvent.CLICK, revealContinue);
    expertButton.addEventListener(MouseEvent.CLICK, revealContinue);
    function revealContinue(evt){
        continueButton.enabled=true;
    continueButton.addEventListener(MouseEvent.CLICK, clickContinue);
    function clickContinue(evt){
    var frameNumber=mc_levels.Number(noviceButton.group.selectedData)
    level_mc.gotoAndStop (frameNumber);

  • How to load a movieclip from libary with a button?

    Hi!
    I am kinda new to Flash and i have a queston.I made a
    movieclip that i keep in the libary. I have a button that i want to
    load the movieclip on the screen while pressing it. Queston is: how
    or what kind of code do i put for the button to load the movieclip
    wich is in my libary? As i see there is no simple soulution for
    this with the script assistent? I got the option load movie but it
    only loads external files or i get error messages when trying to
    load my movie.
    Please help me with this.
    /Tobias

    there are a few things you'll need to do in order to achieve
    this, but it's not to complicated. First right-click the MC in the
    Library and select 'properties', then in the 'Linkage' section
    select the check box 'Export for ActionScript' and the type a name
    in the 'Identifier' field, hit OK. now you can access the MC by the
    linkage ID.
    the next thing you will need to know is 'where' you want to
    place the MC, figure out the x,y position. then on the main
    timeline, handle the 'button' code and we'll use 'attachMovie' to
    bring the MC to the Stage. within the attachMovie method we'll also
    pass the position you've decided upon. so it would look something
    like this:

  • Button inside MovieClip don't work...?!

    Hello,
    I\m traying to create AIR for Android app & I have 2 MovieClips in the main timeline the first in frame 35 and the second in frame 99 with the name of quary_mc. Inside the second movieclip there is a button with the name of sID_btn. When i addEventListener in frame 1 of the  main timeline it display:
    Error #1009: Cannot access a property or method of null object reference
    This is the code:
    quary_mc.sID_btn.addEventListener(MouseEvent.CLICK, displayData);
    function displayData(evt:MouseEvent):void
              trace("Hello");
    Regards,

    You will be unable to add the event listener to the button until frame 99 when it actually exists.
    Alternatively, you can just add the button on frame 1 at an alpha of 0 and then set it to 1 at frame 99. However, it will still get mouse input so you will need to set quary_mc.visible = false on frame 1 and quary_mc.visible = true on frame 99 to solve that issue.

  • How do I make buttons within a movieclip play from a specific frame in scene 1?

    Hi guys
    I have a movie clip on the main timeline. This movieclip has buttons that I want to play different frames in scene 1.
    At the moment, this is the code I'm using in scene 1.
    learnclouds_mc.anna_btn.addEventListener(MouseEvent.CLICK, clickanna);
    function clickanna(evtObj:MouseEvent){
    gotoAndStop("annasstory", "Scene 1");
    I'm getting the error below but have no idea what I should be doing.
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at Work_Life_Flash_Stage_1_fla::MainTimeline/frame4()
        at flash.display::MovieClip/gotoAndStop()
        at Work_Life_Flash_Stage_1_fla::MainTimeline/golearnclouds()
    i hope somebody can help me!

    If you only have the one scene, you do not need to include the scene argument in the goto method call.
    The 1009 error indicates that one of the objects being targeted by your code is out of scope.  This could mean that the object....
    - is not in the display list
    - doesn't have an instance name (or the instance name is mispelled)
    - does not exist in the frame where that code is trying to talk to it
    - is animated into place but is not assigned instance names in every keyframe for it
    - is one of two or more consecutive keyframes of the same objects with no name assigned in the preceding frame(s).
    If you go into your Publish Settings Flash section and select the option to Permit debugging, your error message should have a line number following the frame number which will help you isolate which object is involved.

  • Movieclip button AS 2.0 help

    I have a movieclip button with up-over and out states
    plays fine but in the over state I need to have two more buttons
    1 button for each icon
    I need to make the hit state in one area with room for two I would guess invisible hit state only buttonds on top of the icons?
    how do I get two separate working buttons in there?
    any help?

    OK, after looking around I see what I need to do is have Nested Movieclips in a drop down menu.
    The drop down menu I made is here
    http://www.mediafire.com/?lynnkzjhkjt
    I think I may have been unclear in what I need to do but when you open the fla you see that the movieclip in the over state needs to have two separate buttons (or movieclips) acting as buttons so I can go to another frame. the mc/buttons shpuld have the hit states or target the two icons.
    I have tried everything as I did see some things for AS 3.0 but not for 2.0
    anybody?

  • AS3 loading external swf files with buttons from inside a movieclip

    In my main .swf I have labels on the timeline, navs for those btns are on the first frame of the AS layer and each button sends the playhead to a different frame.
    On one frame called fr1 there is an mc called mc_1 that appears on stage when the playhead stops there. Inside mc_1 are a set of navigation buttons that need to call external .swfs.
    Do I add event listeners on the last frame of mc_1 for each button?
    how do I call the loaders for the swfs on the buttons since the swfs will load on the main timeline NOT the mc_1 timeline?
    So label on main timeline called fr1 will load external1 swf , on fr10 external 2.swf will load and so on.
    any help?

    The code for that button's event listener needs to be placed wherever it has direct access to the button.  Not necessarily on the same timeline, but in a place where both the button and the code are present at the same time.
    The code could be placed at the frame in the main timeline where the movieclip with the button(s) is, targeting the buttons via the movieclip (mc.button.addEvemtListener...) , unless the buttons are somewhere down the timeline of that movieclip.
    If they are down the timeline of that movieclip, then you would need to have the event listener also inside the movieclip, down its timeline where the buttons are finally settled in... being sure to assign instance names to the buttons at every keyframe.

  • Button not working into a movieClip

    Hi i have made a movieclip and there is 2 buttons into that movieClips I have added Events on those buttons but those are not working. here my code
    links.demoButton.addEventListener(MouseEvent.CLICK.democlick)
    links.livelinkButton.addEventListener(MouseEvent.CLICK.liveclick)
    function democlick(event:MouseEvent):void{
    trace('demo button working')
    function liveclick(event:MouseEvent):void{
    trace('live button working')

    if demoButton and livelinkButton were created in the ide (and not using actionscript), use:
    links.getChildByName("demoButton").addEvent...etc
    links.getChildByName("livelinkButton").addEvent...etc

  • Creating a sort of reset button for movieclips

    Hi, i've got 10 movieclips in my movie. I use them for a sort
    of colour sudoku game and i wanted to have a reset button which
    reset them all to the first frame (which is a blank colour) Anyway,
    my problem is that if the movieclip is already on that frame, it
    automatically increments when the button is pressed. Does anyone
    have a solution as to how i would fix this problem?

    post your code...

  • Button in movieclip to main timeline

    I have a button(A) that opens a movie clip which contains a
    button (B). I want button B to go to and play a frame on the main
    timeline, NOT a frame in the movieclip. Is this possible?
    If not, what I am aiming for is a menu of buttons, that are
    rollovers from which another menu pops up with buttons you can
    click.
    Help!
    Thanks

    Hi, Sorry I am new to ActionScript.
    This is what I wrote:
    this.menu_orange1.addEventListener(MouseEvent.CLICK,clickListener2);
    function clickListener2(event:MouseEvent):void {
    _root.gotoAndPlay("test");
    and the error message says:
    1120: Access of undefined property _root.

  • Actions on button or MovieClip instances are not supported in ActionScript 3.0?

    I have recently updated my Flash and I seriously regret it as everything seems to of changed. For instance I want to publish a movie i created in Action Script 3.0. In this movie i have buttons which have actions applied to them and everytime i go to publish the site, it brings up the error
    'WARNING: Actions on button or MovieClip instances are not supported in ActionScript 3.0. All scripts on object instances will be ignored.'
    How do I go about keeping my 3.0 elements but having buttons with actions applied to them. I am a complete beginner with Flash by the way so the answer would need to be completely straight forward.
    Thanks!

    okay, just to simplify this even further and to break it into steps..
    1: I Create a new button.
    2: I give it an instance name of say 'button'
    3: I place the following code in the timeline
    button.addEventListener(MouseEvent.CLICK,callFunction);
    function callFunction(e:Event):void{
    gotoAndPlay();
    Now here is where I am stuck. What do you need to add to this to navigate to another scene?
    Thanks again!!

  • Removing Splash Screen using button in Movieclip

    Hi
    I have created a shooting game and I am struggling to create a splash screen at the beginning informing the user of
    the controls with a button to start the game, which removes the splash screen. I am trying to add the splash screen in the main timeline
    using addChild event. I can get the splash screen to appear on the game and remove it when the playgame button is pressed, but this
    prevents all the other event listeners so I am not able to fire or move the ship.
    In the splash screen I have the code :
    Play_btn.addEventListener(MouseEvent.CLICK,playgame)
    function playgame(e:Event):void
    Play_btn.removeEventListener(MouseEvent.CLICK,playgame)
    parent.removeChild(this);
    and in the main timeline I have :
    addChild(splashscreen);
    Can anyone give me some guidance, thanks for reading this

    Hi
    thanks for taking the time, I don't know how to upload the fla so here is my code.
    The code in the splashscreen MovieClip, which has a button called Play_btn is :
    Play_btn.addEventListener(MouseEvent.CLICK,playgame);
    function playgame(e:Event):void
    parent.removeChild(this);
    Play_btn.removeEventListener(MouseEvent.CLICK,playgame)
    and the code in the main timeline is :
    //import some important flash libraries.
    import flash.events.KeyboardEvent;
    import flash.events.Event;
    import flash.display.MovieClip;
    import flash.display.Sprite;
    import flash.sampler.Sample;
    var score:Number=0;
    var countCollisions:Number =0;
    var astArray:Array = new Array();
    var enemyshipArray = new Array();
    var enemybulletArray = new Array();
    var explosionArray = new Array()
    var speed:Number = 10;
    var key_left:Boolean = false;
    var key_right:Boolean = false;
    var key_up:Boolean = false;
    var key_down:Boolean = false;
    var key_space:Boolean = false;
    var shootLimiter:Number=0;
    var splashscreen:MovieClip = new Splash();
    //Play_btn.addEventListener(MouseEvent.CLICK,playgame);
    splashscreen.x = 0;
    splashscreen.y = 0;
    addChild(splashscreen);
    //removeChild(splashscreen);
    background.addEventListener(Event.ENTER_FRAME,backgroundmove);
    function backgroundmove(e:Event):void
    background.x -= 1;
    if(background.x < -200)
    background.x = 749.95;
    this is how you can comment over a number
    of different lines
    var timer:Timer = new Timer(1000, 10);
    timer.addEventListener(TimerEvent.TIMER, AddAsteroid);
    timer.start();
    var timerenemyship:Timer = new Timer(2000, 10);
    timerenemyship.addEventListener(TimerEvent.TIMER, Addenemyship);
    timerenemyship.start();
    stage.addEventListener(KeyboardEvent.KEY_DOWN,KeyDown);
    stage.addEventListener(KeyboardEvent.KEY_UP,KeyUp);
    var ship:MovieClip = new Ship()
    var enemyship:MovieClip = new EnemyShip()
    addChild(ship);
    function Addenemyship(e:TimerEvent):void
    var enemybullettimer:Timer = new Timer(2000, 10);
    enemybullettimer.addEventListener(TimerEvent.TIMER, Addenemybullet);
    var enemyship:MovieClip = new EnemyShip();   
    enemyship.x = 800;
    enemyship.y = Math.round(Math.random()*400);
    enemyshipArray.push(enemyship); 
    addChild(enemyship);
    enemybullettimer.start();
    function Addenemybullet(e:TimerEvent):void
    var enemybullet:MovieClip = new EnemyBullet();
    enemybullet.x = enemyship.x+50;
    enemybullet.y = enemyship.y+50;
    enemybulletArray.push(enemybullet);  
    addChild(enemybullet);
    enemybullet.addEventListener(Event.ENTER_FRAME,moveenemybullet);
    function moveenemybullet(e:Event):void
    enemybullet.x -=30;
        if(enemybullet.hitTestObject(ship))
       removeChild(ship);
    enemyship.addEventListener(Event.ENTER_FRAME,enemyshipmove);
    function enemyshipmove(e:Event):void
    enemyship.x -=10;
    for(var i=0; i<enemyshipArray.length; i++)
         if(enemyshipArray[i].hitTestObject(ship))
    // EXPLOSION
    var explosion:MovieClip = new Explosion();
    addChild(explosion);
    explosion.x =ship.x;
    explosion.y = ship.y;
    explosionArray.push(explosion);
    for (var l:int=0; l<explosionArray.length; l++)
    if (explosionArray[l].currentFrame == 10)
    removeChild(explosionArray[l]);
    explosionArray.splice(l,1);
    // END OF EXPLOSION  
            MovieClip(enemyshipArray[i]).removeEventListener(Event.ENTER_FRAME, enemyshipmove);
            removeChild(enemyshipArray[i]);
            enemyshipArray.splice(i, 1);
            countCollisions++;
             if(countCollisions >= 2)
             ship.gotoAndPlay(87);
       else
             ship.gotoAndPlay(6);
    function AddAsteroid(e:TimerEvent):void
    var asteroid:MovieClip = new Asteroid();   
    asteroid.x = 800;
    asteroid.y = Math.round(Math.random()*700);
    astArray.push(asteroid);  
    addChild(asteroid);
    asteroid.addEventListener(Event.ENTER_FRAME,asteroidmove);   
    function asteroidmove(e:Event):void
    asteroid.x--
    for(var i=0; i<astArray.length; i++)
         if(astArray[i].hitTestObject(ship))
            MovieClip(astArray[i]).removeEventListener(Event.ENTER_FRAME, asteroidmove);
            removeChild(astArray[i]);
            astArray.splice(i, 1);
            countCollisions++;
             if(countCollisions >= 4)
              ship.gotoAndPlay(87);
       //removeChild(ship);
       else
             ship.gotoAndPlay(6);
    addEventListener(Event.ENTER_FRAME,Main);
    function Main(event:Event)
    CheckKeys();
    function KeyDown(event:KeyboardEvent)
    if(event.keyCode == 37){  //checks if left arrowkey is pressed.
      key_left = true;
    if(event.keyCode == 39){  //checks if right arrowkey is pressed.
      key_right = true;
    if(event.keyCode == 38){  //checks if up arrowkey is pressed.
      key_up = true;
    if(event.keyCode == 40){  //checks if down arrowkey is pressed.
      key_down = true;
    if(event.keyCode == 32){  //checks if down arrowkey is pressed.
      key_space = true;
    function KeyUp(event:KeyboardEvent){
    if(event.keyCode == 37){  //checks if left arrowkey is released.
      key_left = false;
    if(event.keyCode == 39){  //checks if right arrowkey is released.
      key_right = false;
    if(event.keyCode == 38){  //checks if up arrowkey is released.
      key_up = false;
    if(event.keyCode == 40){  //checks if down arrowkey is released.
      key_down = false;
    if(event.keyCode == 32){  //checks if down arrowkey is released.
      key_space = false;
    function CheckKeys()
    shootLimiter += 1;
    if(key_left)
      setDirection(1);
      ship.x -= 5;
    if(key_right)
      setDirection(0);
      ship.x += 5;
    if(key_up){
      ship.y -= 5;
    if(key_down){
      ship.y += 5;
    if((key_space) && (shootLimiter > 8))
    shootLimiter = 0;
    var b = new Bullet();
    addChild(b);
    // ADD SOUND
    var bulletsound:Sound=new SoundEnemyShot()
        bulletsound.play();
    // END SOUND
    b.x = ship.x + 50;
    b.y = ship.y + 3;
    addEventListener(Event.ENTER_FRAME,moveBullet);
    function moveBullet(e:Event):void
    b.x +=10;
      if(b.x > 600)
       if(contains(b))
       removeChild(b);
              removeEventListener(Event.ENTER_FRAME,moveBullet);
      for(var i=0; i<astArray.length; i++)
       if(astArray[i].hitTestObject(b))
       removeChild(b);
       removeChild(astArray[i]);
          score +=10;
       score_txt.text = score.toString() ;
       removeEventListener(Event.ENTER_FRAME,moveBullet);
    for(var i=0; i<enemyshipArray.length; i++)
      if(enemyshipArray[i].hitTestObject(b))
      removeChild(b);
      removeChild(enemyshipArray[i]);
            enemyshipArray.splice(i, 1);
      MovieClip(enemyshipArray[i]).removeEventListener(Event.ENTER_FRAME, moveBullet);
    function setDirection(param) {
    if (param == 0) {
      ship.scaleX = 1;
    } else {
      ship.scaleX = -1;

  • Referencing a button on main stage from inside a movieclip

    I am banging my head against the wall on this.
    On the main stage I have a button that I have made invisible once the file is loaded.  Inside a movieclip I have on frame 15 the following actionscript 3 code
    button_mc.visible = true;
    I want the button to become visible at the end of this movieclip.  I am not using an external as3 file, I am putting the as3 code in its own layer on the first frame.
    I know it has something to do with the path to the button, but I cannot figure it out.  If there is anyone who can point me in the right direction for referencing instances by instance name that reside on the main satge from inside a movieclip I would be very grateful.
    Thanks
    Thepopguy

    Try:
    MovieClip(this.parent).button_mc.visible = true;

Maybe you are looking for

  • Protect Crystal Report File

    I have created a report using CR8.5 and I want to protect the file from being opened in design mode to accidental change of formulas, parameters, etc. Something similar to Excel that provides  password protection to VBA code. Is there anyway to imple

  • How do i remove a web site from creative cloud?

    I have errantly signed up too many websites on my cloud account and have used up all my 5 sites. How do I remove a site so I can use that slot for another live one?

  • While executing a jar file I am getting an error

    while exec a jar file i am getting an error invalid file (bad magic number): Exec format error i tried to execute it with the commnad java -jar test.jar or by directly too ./test.jar

  • Request.getParameter() from same page as HTML form

    I have a jsp page with a form. form contains a textfield, once the user submits the form, i want jsp scriptlet to get the value of the user input and carry out processing on it within the same page and give a result. problem is the first time the pag

  • The bookmarks button does not appear in my browser

    The button is supposed to be next to the home button, but it is not there