TextInput inside MovieClip

Hello,
I am creating a game pretty much like jeopardy. What is
happening is that you click on the number value you want, like 100
for example. When it gets clicked on, there is a tween that occurs
and then the question appears on the screen along with all of the
contestant names.
If one of the contestants knows the answer, the 'host' clicks
on their name. I won't go any deeper than that. I can get the names
to appear in as text, but it will not appear inside of a movieclip.
Attached is my code.
Any help would be greatly appreciated.
Thanks
Doug

all your movieclips have the same instance name. fix that.
and use the following to reference your textfields:

Similar Messages

  • Change Stage Frame From Inside MovieClip?

    How Do I Change Stage Frame From Inside MovieClip?
    Heres my code so far:
    hh.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
    function fl_MouseClickHandler(event:MouseEvent):void
        gotoAndStop(2);
    i tried (root).gotoAndStop(2); but i got an error , #1061 ..
    Thanks in Advance...
    ASAP would be nice..

    well your a smart *** now arnt you   Haha..
    I missed 1 painful word in that line of code thanks heeps..

  • Draw inside movieclip/graphic with Actionscript

    Hi.
    How I can draw inside movieclip/graphic element with Actionscript?
    If i have example movieclip-element in my project and want to draw a single dot in its coordinate (10,10), how I can do that?
    ty m8s!

    The easiest way to draw inside a movieClip is the graphics class.
    You could do something like:
    this.graphics.lineStyle(1, 0x000000);
    this.graphics.moveTo(10, 10);
    this.graphics.lineTo(11, 11);
    This isn't perfect when drawing pixels, however - it only has methods for lines and shapes(circles, rectangles etc).
    If its important for you to draw a single pixel and accuracy is more important you may want to consider converting your Movieclip to a BitmapData class, which has methods for setting Pixels. Realistically though, if you didn't know about the graphics class, then that'll probably be what you're after.

  • 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.

  • Indexing instances of specific class inside MovieClip authored with Flash Pro

    Hi there.
    I'm writing a class that extends MovieClip and that is linked to the MovieClip Object authored via Flash Pro during development (Father object).
    The hierarchy of this MovieClip Object is hidden from me - everything I know is that it may contain instances of other Class that was authored during development and extends MovieClip in the same manner (Son objects).
    I have no information regarding names or hierarchical positions of these Son objects inside Father object.
    Now the question is: how to get them listed?
    So approach I've taken was to implement current events:
    public class Son extends MovieClip
         public static const INITIALIZED : String = "son_initialized";
         public function Son ()
              this.dispatchEvent (new Event (INITIALIZED));
    public class Father extends MovieClip
         public var son : Vector<Son>;
         public function Father ()
              son = new Vector<Son> ();
              this.addEventListener (Son.INITIALIZED, this.onSonInitialized);
         public function onSonInitialized (event : Event)
              this.son.push (event.target);
    Well, this code compiles with no errors whatsoever, but it turns out that onSonInitialized gets never called. I assume that's because children constructors are called ahead of their parent one.
    Is there any way to get them listed?
    Thanks in advance.

    kglad,
    I'm trying to get an array of references to Son objects (Son extends MovieClip), randomly located deep inside display list hierarchy of Father object (extends MovieClip too).
    The Father movieclip is authorized in Flash Professional and is a black box for me - I can only manipulate Father.as and Son.as.
    Since I can't know exactly their pathes and names (i.e. father.child1.child5OfChild1.son32 for example), I decided to make them self-aware, dispatching event during construction time, messaging everybody that this instance of Son exists:
    public function Son ()
         this.dispatchEvent (new Event (INITIALIZED));
    And then I attached a listener inside Father's constructor:
    public function Father ()
         this.addEventListener (Son.INITIALIZED, this.onSonInitialized);
    The idea was that this event listener should have been catching all the Sons, located inside Father. But it doesn't work that way - Father's constructor seems to be called after all constructors of its children, so this event listener catches nothing.
    I've worked this around by straightforward display list traversing - it works, but doesn't look so elegant. May be there is still a way to make it work through events?

  • Dynamic text is inside movieClip

    I am working on flash & AS file, in flash file (main.fla) dynamic text is inside that movieClip (myButton) .I will like to send some text to that particular dynamic text field inside the movieClip (myButton) from AS file
    as file code is
    var myButton:Button;
    var myText:text;
    myButton.myText.text="Custom Msg";
    I import .as file in flash but it is not showing can anybody help me?

    This is working fine but my problem is that, in my another application I am importing the class from as file in that as file I have one loop
    if(errorCode == 0){
             trace("welcome ");
             mc.myText.text="Custom Msg";
              }else{
                 trace("Error loging in to Server Error Code : "+ errorCode)
    It will trace message properly
    my problem is that I will like to put "Custom Msg" in dynamic text which is in MovieClip (mc) of fla file, how could I go wtih this ?
    If I include same as file in flash It will shows as error
    1037: Packages cannot be nested. What the solution for this ?

  • Class Inside MovieClip Giving Runtime Error

    Hey guys.
    I'm trying to place an instance of a movieclip (instance
    name: tehMovieClip) from the library within another movieclip
    (instance name: parentMovieClip) on the stage. tehMovieClip, the
    movieclip going inside another movieclip, belongs to a class called
    CollisonDetection (linkage properties, class:CollisonDetection,
    Base Class: flash.display.MovieClip). When I put tehMovieClip
    inside parentMovieClip, I get this runtime error:
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    If I just place tehMovieClip on the stage by itself, it works
    fine but I need it to be inside parentMovieClip. So what should I
    do?
    Just for your information, CollisonDetection extends the
    project's DocumentClass which extends MovieClip.
    Thanks in advanced!

    Thanks for that buddy.
    quote:
    Originally posted by:
    SwapnilVJ
    Is the movie clip your are placing linked from library to a
    class?
    The movieclip in question (the one I am placing inside
    another movieclip) is linked to a class.
    quote:
    Originally posted by:
    SwapnilVJ
    If yes. Is the Class linked to the movieclip have a
    Constructor method with parameters?
    Well this is my current constructor:
    public function CollisonDetection() {
    playerRefFromCollisonDetection.x = 600;
    Now that you've said that, I deleted that middle line and it
    seemed to work
    quote:
    Originally posted by:
    SwapnilVJ
    If Yes. you found the problem.
    And solution will be to update the class' constructor to have
    no parameters.
    Thanks buddy, but what if I need to have statements inside
    the constructor such as triggering methods/functions inside the
    class?

  • Loaded video inside movieclip

    Hi everybody,
    I'm working with several videos each inside their own movieclips. When I click my forward button to jump to the next video I get the second
    video playing over the first one especially towards the end part of the first video. I can play and stop the movies just fine but it's the gotoAndPlay that's causing me problems right now with forwarding and rewinding clips.
    Hope my explanation was clear cause I'm just starting out with AS3
    Here's the code if it can be useful,
    Any help would be appreciated.
    import fl.video.*;
    navbar.visible = true;
    navbar.addEventListener(MouseEvent.MOUSE_OVER, showmenu);
    function showmenu(e:MouseEvent):void{
            navbar.alpha = 1;
    navbar.addEventListener(MouseEvent.MOUSE_OUT, hidemenu);
    function hidemenu(e:MouseEvent):void{
            navbar.alpha = 0;
    navbar.next_btn.addEventListener(MouseEvent.CLICK, nextButtonClick);
    navbar.prev_btn.addEventListener(MouseEvent.CLICK, previousButtonClick);
    navbar.play_btn.addEventListener(MouseEvent.CLICK, playButtonClick);
    navbar.stop_btn.addEventListener(MouseEvent.CLICK, stopButtonClick);
    navbar.menu_btn.addEventListener(MouseEvent.CLICK, menuButtonClick);
    function stopButtonClick(e:MouseEvent):void
    if(delay1)
    delay1.VidDesign1.stop();
    delay1.stop();
    else if (delay2)
    delay2.Video2.stop();
    delay2.stop();
    else if (delay3)
    delay3.VidDesign3.stop();
    delay3.stop();
    else if (delay4)
    delay4.VidDesign4.stop();
    delay4.stop();
    else if (analysis1)
    analysis1.VidDesign5.stop();
    analysis1.stop();
    else if (analysis2)
    analysis2.VidDesign6.stop();
    analysis2.stop();
    else if (analysis3)
    analysis3.VidDesign7.stop();
    analysis3.stop();
    stop();
    function playButtonClick(e:MouseEvent):void
    if(delay1)
    delay1.VidDesign1.play();
    delay1.play();
    else if(delay2)
    delay2.VidDesign2.play();
    delay2.play();
    else if(delay3)
    delay3.VidDesign3.play();
    delay3.play();
    else if(delay4)
    delay4.VidDesign4.play();
    delay4.play();
    else if (analysis1)
    analysis1.VidDesign5.play();
    analysis1.play();
    else if (analysis2)
    analysis2.VidDesign6.play();
    analysis2.play();
    else if (analysis3)
    analysis3.VidDesign7.play();
    analysis3.play();
    play();
    function previousButtonClick(e:MouseEvent):void
    if(delay1)
    delay1.VidDesign1.stop();
    delay1.stop();
    else if (delay2)
    delay2.Video2.stop();
    delay2.stop();
    gotoAndPlay("delay1");
    else if (delay3)
    delay3.VidDesign3.stop();
    delay3.stop();
    gotoAndPlay("delay2");
    else if (delay4)
    delay4.VidDesign4.stop();
    delay4.stop();
    gotoAndPlay("delay3");
    else if (analysis1)
    analysis1.VidDesign6.stop();
    analysis1.play();
    else if (analysis2)
    analysis2.VidDesign7.play();
    analysis2.play();
    gotoAndPlay("analysis1");
    else if (analysis3)
    analysis3.VidDesign7.stop();
    analysis3.stop();
    gotoAndPlay("analysis2");
    gotoAndStop(currentFrame - 250);
    function nextButtonClick(e:MouseEvent):void
    if(delay1)
    delay1.VidDesign1.stop();
    delay1.stop();
    gotoAndPlay("delay2");
    else if(delay2)
    delay2.VidDesign2.stop();
    delay2.stop();
    gotoAndPlay("delay3");
    else if (delay3)
    delay3.VidDesign3.stop();
    delay3.stop();
    gotoAndPlay("delay4");
    else if (delay4)
    delay4.VidDesign4.stop();
    delay4.stop();
    else if (analysis1)
    analysis1.VidDesign5.stop();
    analysis1.stop();
    gotoAndPlay("analysis2");
    else if (analysis2)
    analysis2.VidDesign6.stop();
    analysis2.stop();
    gotoAndPlay("analysis3");
    else if (analysis3)
    analysis3.VidDesign7.stop();
    gotoAndStop(currentFrame + 250);     
    function menuButtonClick(e:MouseEvent):void
    if(delay1)
    delay1.stop();
    else if (delay2)
    delay2.stop();
    else if (delay3)
    delay3.stop();
    else if (delay4)
    delay4.stop();
    else if (analysis1)
    VidDesign5.stop();
    else if (analysis2)
    VidDesign6.stop();
    else if (analysis3)
    VidDesign7.stop();
    gotoAndPlay(1);

    if the videos are removed from the stage when you change frames you can use a removed_from_stage listener to stop each video.

  • ActionScript inside Movieclip is SOMETIMES ignored

    Hi,
    I am working on something similar to a slideshow where
    buttons are used to move forward and backward in the time line.
    On one of these "slides" there is another button, a MovieClip
    with a few frames inside (i.e. the rollover and mousedown states
    etc.) and ActionScript in Frame 1 that make the button work
    (rollovers and the like).
    If I play forward in this slideshow, everything works.
    If I play backwards to the frame that has this button, then
    all ActionScript inside this button is completely ignored
    (including trace), and the button will endlessly cycle through the
    frames inside (even though I tried various STOP commands from
    inside and outside the movieclip).
    The interesting thing is that I have a very similar slideshow
    with a similar button that does NOT have this issue. If I
    copy/paste the working button to replace the bad one, the same
    thing happens to this button, so it somehow is local to this one
    file.
    There are no error messages coming up, and I don't even know
    if there IS any code that would disable script inside a movieclip.
    I checked the code inside the MovieClip and found nothing
    wrong - it only has the stop command, a few addevenlisteners and
    their corresponding functions in frame 1.
    I just don't get why it works in one file but not in this one
    - the best part is that whenever I create a new slideshow, I simply
    create a copy of the last slideshow file, so the basics of all
    these files should be identical...
    Another thing that completely throws me for a loop is that
    when I add any random shape (e.g. a square) into the frame that has
    the BACK button that brings me to the broken button, then it works!
    So I have a workaround, but I would really like to know what
    causes this - I'd prefer a fix to a workaround that might break
    some day, too.
    Any idea what could possibly cause something like this and
    what I can do about this?
    Thanks!

    you probably have a corrupt swf.
    to test, copy all the assets to new swf and see if the problem persists.

  • Inside movieclip script?

    Hey, I am wondering how I can use a script inside a movieclip outside the movieclip, for an example. The first frame in the movie clip:
    var RoXYZ
    RoXYZ = 3.14;
    And outside the movieclip it's:
    circle._visible = true;
    RoXYZ = 3.1415926535
    if(RoXYZ == 3.14){
    circle._visible = false;
    What i am trying to do is that if the movieclip reaches a specific frame a script is triggered. Is this possible?

    From inside a movieclip you can talk to the _parent object/timeline using "_parent" to target it.  So if you wanted to tell the _parent to move to a certain frame, inside the movieclip you could use...
    _parent.gotoAndStop(some frame);
    Or if there was a function in the _parent you could use...
    _parent.someFunction();
    or maybe...
    _parent.someFunction(RoXYZ); // passing the RoXYZ variable as an argument
    And if you needed to target the main timeline from inside some buried movieclip, you can use _root instead of _parent.

  • Accessing Button inside Movieclip/ScrollPane

    Hello all,
    I'm trying to understand how to build a button inside a movieclip.  I have a template that has movieclips within movieclips, and when I create a button (all using AS2) the button will work if I test the scene, but in the whole flash movie it does not work.  I also have some buttons located inside a ScrollPane that also do not call correctly.
    For my button I am using this code:
    facebookbtn.on (release) {
    getURL("http://www.facebook.com/","_blank","GET");
    ^ This is placed on the button "facebookbtn". I also tried using: _root.bgPages.pg1.facebookbtn.on (release), to no avail.
    For the one inside a ScrollPane I am attempting to call a javascript function:
    on(release){
         import flash.external.ExternalInterface;
         ExternalInterface.call("GroupDelegate","dayone1");
    ^ This also does not work, with or without the button name before on(release).
    I'm putting the FLA file here so that if anyone has the time, could help me with this quick problem. Thanks!
    FLA: Download FLA

    Do not place code inside objects with code on(blah2x). It will lead to unpredictable behaviors and besides it is bad practice. Centralize all your code on one frame in the timeline. Use this format on the main timeline:
    import mx.utils.Delegate; //declare at top only ONCE
    YourButton.onRelease = Delegate.create(this, YourFunctionCall);
    or
    YourButton.onRelease = function()
       //do your stuff here
    Do the same thing with the ExternalInterface. You can put the import at the top along with Delegate.

  • StageWebViewBridge from inside MovieClip [HELP]

    I'm trying to implement stageWebViewBridge from inside of a movieclip ..   It's generating this issue because stage is null.     Does anyone know how to implement this inside a movieclip ?
    Error: StageWebViewDisk.initialize( stage ) :: You must provide a valid stage instance
    // this is our main view
    var view:StageWebViewBridge;
    //**** STAGE WEBVIEW BRIDGE
    /* init the disk filesystem */
    StageWebViewDisk.addEventListener(StageWebviewDiskEvent.END_DISK_PARSING, onInit );
    StageWebViewDisk.setDebugMode( true );
    StageWebViewDisk.initialize(stage);

    well your a smart *** now arnt you   Haha..
    I missed 1 painful word in that line of code thanks heeps..

  • SimpleButton inside MovieClip Symbol

    I want to create various button panels contained in separate
    MovieClip(symbols) created and laid out in a movie clip. I want to
    use flash button objects on each panel. Then swap panels at will
    that bring the buttons along with the panel so all I have to do is
    call..panel1 = new panelOne; panel2 = new PanelTwo, etc...If I
    create a class for each button with its functionally built in how
    can I access the button from the panel? I figure I have to import
    the buttons in the panel class before it will work? I tried
    panel1.getChildAt(x) but that didn't seem to work. Do I have to
    dynamically add the buttons as children to be able to access them
    with actionscript.
    Thanks!

    From inside a movieclip you can talk to the _parent object/timeline using "_parent" to target it.  So if you wanted to tell the _parent to move to a certain frame, inside the movieclip you could use...
    _parent.gotoAndStop(some frame);
    Or if there was a function in the _parent you could use...
    _parent.someFunction();
    or maybe...
    _parent.someFunction(RoXYZ); // passing the RoXYZ variable as an argument
    And if you needed to target the main timeline from inside some buried movieclip, you can use _root instead of _parent.

  • Problem reloading swfs inside movieclip in IE

    I'm not quite sure whats going on. I have a website i'm working on http://www.tulum14.com and it works fine in safari and firefox, but when I run it in explorer it doesn't.  Whats going on is that when you go to the homes section of the site, each home's section is a swf that is loaded into the main movieclip.  In explorer these swfs load fine the first time around, but when you return and want to load the swf/section and see it again, they get stuck and although they appear to load, i'm not sure if they have and are getting stuck on the first frame or they are not loading, or there is something going on with the cache.
    I am loading from the main movieclip using a container with the following code:
    var homeLdr:Loader = new Loader();
    var homeURL:String = (MovieClip(root).gotoArea)+"Eng.swf";
    //gotoArea names the swf to load
    var homeURLReq:URLRequest = new URLRequest(homeURL);
    homeLdr.load(homeURLReq);
    homeLdr.x = -500;
    homeLdr.y = -250;
    MovieClip(root)[MovieClip(root).gotoArea + "_holder"].addChild(homeLdr);
    //each instance of the holder clip is named after the area it should load
    stop();
    the loader script to check and see if the swf is loaded before running it is:
    function progressHandler(event:ProgressEvent):void {
        var percent1:int;
        percent1 = (Math.round(event.target.bytesLoaded/event.target.bytesTotal*100));
        trace(percent1);
        if (percent1==100) {
            percent.x=539;
            this.gotoAndPlay(3);
        } else if (percent1!=100) {
            percent.x=541;
        percent.text=String(percent1);
    this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
    stop();
    any ideas? help?
    I appreciate it.
    Thanks
    alfarovive

    it would be best to change your preloader to the loading swf.
    but you can use your current set up:
    function progressHandler(event:ProgressEvent):void {
        var percent1:int;
        percent1 = (Math.round(event.bytesLoaded/event.bytesTotal*100));
        trace(percent1);
        if (percent1==100 || event.bytesLoaded==0) {
            percent.x=539;
            this.gotoAndPlay(3);
        } else if (percent1!=100) {
            percent.x=541;
        percent.text=String(percent1);
    this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
    stop();
     this.loaderInfo.addEventListener(event.COMPLETE,f);
    function f(e:Event){
    var pe:ProgressEvent=new ProgressEvent("complete");
    progressHandler(pe);

  • Button inside movieclip on stage

    What do I have to do to get the button to work? I view the swf and there is no active button.
    I need the button inside the clip to be active. I can't find the answer. Thank you.

    no i put a button from the library inside the clip to see if i could access a button once movie played and i couldnt see the states of that library version if I viewed the scene I could.
    I was going to create my own button, which I will, but I don't think I will be able to get to it once publised and I'm frustrated.
    I think I have run into this before, it's been a while. Is it an enable thing?

Maybe you are looking for

  • Reduce File Size doesn't work!

    When I click the (new) option 'Reduce File Size' in Keynote '09 the app prompts a estimated new size which is smaller than the current size. When I click on 'Reduce' the app doesn't do anything except for showing an error report which tells me someth

  • Cannot package my classes

    i cannot call some methods from the classes that i have packaged

  • Question about B1if-Database in SQL-Mgmt-Studio

    Hello, We have made some changes in the configuration in SLD. We made some more Di-Proxy-Ports and then made Proxygroups for the Databases. Nearly every half hour, in SQL-Mgmt Studio we can see this "task" ? During the time, this task is online, the

  • Error/Issues Installing 11g R2 on Win7 64-bit Ultimate Ed

    I know this question may have been posted before...but I'm also having issues installing 11g R2 on Windows 7 64-bit Ultimate edition with 4GB RAM. It's consistently givine failed check during Prerequisite Checks: - Physical Memory failed - Available

  • HT5085 ITunes Match artwork - can it be changed???

    Once I have done my initial match is it possible to change my album artwork? Some of my album art wasn't right when I matched and I have now changed this artwork so it is correct but when I re-match the artwork on my non PC devices doesn't display th