How load variables to a movie clip on a masked layer on my main time line

the problem I have is that I been trying to load text from a
text file news.txt into a movie clip on my main time line the
problem is when the layer where the video clip is locates is masked
the variables will not load, but it does work when the layer is
unmasked, but then the website does not work the way it is suposed
to look.
any Idea on how I can get arround this????

PArt of the problem will be due to declaring the uiLoader inside of a function.  When you do that you limit its scope to within that function.  You should declare it outside of any function if you need to access it in more than one function.
import flash.events.MouseEvent;
import fl.motion.MotionEvent;
var uiLoader:UILoader;
var targetObj:Object;
The other problems I see regard the line you point to.  It is not spelling the name the same, using a lowercase "l". Also, if you want to target what the UILoader contains, you should target its "content" property, as in...
targetObj = uiLoader.content.mask_01

Similar Messages

  • Passing a variable from a movie clip to the main timeline

    Hi,
    I'm having trouble passing a variable from a movie clip in my
    flash file to the main timeline.
    I have a movieclip with the instance name IntroNav which
    contains several buttons. Clicking a button sets the variable
    "page" to a specific name, i.e. page = "home"
    However, outside of the movie clip, on the main timeline I am
    unable to call this variable, and "page" seems to have no value.
    Can anyone tell me why this is and how to solve it?
    Thanks

    Umm, yes ... declare your variables correctly.
    var page:String = new String(); //proper complete
    var page:String; //strict typing
    var page:String = "home"; //stirct typing with value
    declaration
    Do not declare the variable in your buttons, you would have
    to do so in every button and be constantly resetting the value.
    Declare it on the main timeline at the lowest level. You do not
    need to use it as a _global, you just need to resolve your path
    issues. You can 'set' the variable value from a button, without any
    problem, but you have to call to the variable correctly.
    You do not 'name' a variable as "_root.page" , the '_root'
    refers to the lowest level of the SWF or the main timeline, as does
    a call to ' _level0' (that's a zero). If the variable is declared
    on the main timeline, and you're calling from the MC/button or
    anywhere you can refer to the variable by calling to it by
    the proper path of '_root.page'
    To set the variable from any of your button/MC instances
    call:
    _root.page = "value"; OR _level0.page = "value";
    But you must have the varibale declared on the main timeline,
    and only once and the playhead should be stopped or it will reset
    the value to the default upon looping.

  • How do I separate short movie clips loaded from my digital camera to iPhoto 11 at the same time pics are downloaded and how do I get those video clips to a dvd that will play on a dvd player

    When loading pics to iphoto 11 from my camera, occassionaly it will include some video clips with the description of Movxxxx. I wonder if someone could direct me to some straight forward instructions as to how to transfer these video (movie) clips, which now exist in iphoto, to a dvd that will play on a dvd player as one might  expect to see a video play, including the audio that was captured at the time of filming.
    Thanks in advance for any assistance you can offer this novice.

    You need to open iMovie and it will have a event library called iPhoto Videos, click on that and the videos will load in the window next to it, then you make a new project in iMovie.  Then open iDVD and make a new project then import the movies to the program then burn to a DVD..

  • How to build a custom movie clip that will be used as a cell renderer for column in a grid ?

    i want to build a datagrid that shows a picture and underneath it a name.
    the problem is i dont want to see all of the pictures, but all the pictures that have certain requirements, so i cant just make one movie clip that includes all the pictures and names.
    so my question is how do i build a movie clip that contains photo and text?.

    You do not create movieclips on the timeline using code, though you can create them and add them as children of something that has been manually placed in the timeline.
    To create a MovieClip using code you use: 
        var mc:MovieClip = new MovieClip();
    If you need to add an image, then however you intend to acquire the image, after it has been acquired, you add it to the MovieClip using:  
        mc.addChild(img); 
    where img is the instance of whatever form of object the image takes (Bitmap, Loader)
    If you need to add a TextField to the MovieClip then you use: 
        var tf:TextField = new TextField();
        mc.addChild(tf);
    and you can set up properties for the textfield such as the font and color and position as well after it has been instantiated (the first line).

  • How to stop , play nested movie clips....

    Hi all,
    I'm calling a swf file in a container_mc, which is in
    another swf file(Interface), by loadMovie() method. The Major
    problem I've stucked with is that in the interface I'm having a
    Play/Pause Button, which is not stopping the nested movieclips of
    the external swf file which is loaded in the container_mc
    movieclip.
    The other major issue is that I'm not able to add a
    progressbar(sliderbar) which runs according to the animation, to
    this interface. Please help ASAP

    I have a similiar situation however the container_mc has me
    puzzled, I'm not sure what that is - perhaps you can answer my
    question:
    I have a master swf called index.swf. The index.swf has a
    main tool bar of buttons which load frames; each frame is named to
    coincide with the main bar button (i.e. genInfo, setup,
    mainentance, etc). This works perfectly. My problem is with Movie
    Clips.
    Each frame has a sidebar which loads external swfs (i.e.
    genInfo.swf) - each external swf is made up of a series of Movie
    Clips which run in succession along the timeline; each Movie Clip
    belongs within its own frame (i.e. MCseg1 is in frame seg1; MCseg2
    is in frame seg2, etc).
    I need to pause and play each individual Movie Clip at will;
    I have built two buttons (pauseBtn and playBtn) into a Movie Clip
    called MCpausePlay. The first frame of MCpausePlay contains the
    pauseBtn; this frame is coded with the global "stop();" In order to
    move to frame(2) which contains the playBtn, the pauseBtn is coded
    with -
    on(release) {
    gotoAndPlay(2);
    The playBtn is coded:
    on(release) {
    gotoAndPlay(1);
    When clicked, the MCpausePlay moves from pause to play.
    That's all I have been able to get this to do.
    How do I code MCpausePlay to pause and then play each
    individual Movie Clip? (How do I get a Movie Clip to control other
    Movie Clips?). Should I code the Movie Clip, the frames within the
    Movie Clip, or each individual button within the Movie Clip? And,
    does this MCpausePlay belong on the Index.swf file, or should it be
    on each external swf? Or perhaps built in to every Movie Clip? I
    have tried all and have not had any success.

  • How to increase on(press) movie Clip value

    I have a variable at frame 1,
    var a=0;
    i have a movie clip and i am writing a code on it
    on(press){
    a=a+1;
    trace(a);
    bt the tracing value is showing NaN, how can i increase that
    value ??
    even if i am doing the same thing with button then its
    working fine.
    but the problem with Movie Clip. so any one can tell me, how
    can i solve this problem ?
    Thanks

    to make a variable global just put _global. in front of it...
    like _global.a = 0
    As for tracking clicks on several movies, here is what I
    would do:
    All this code would go on your main time line, but change
    yourMC1 and yourMC2 to the names of your movies. duplicate as
    needed.

  • Putting a preloader for a loaded .swf in a Movie Clip

    I am trying to use a preloader for a larger .swf file that loads inside of a movie clip. I was wondering what code might work and where to put it. (preloader is a .swf).  I am using CS4, ActionScript 1.0.  Thanks.

    it does nothing in that context.  so use:
    container._x =-258;
    container._y =-235;
    container.loadMovie("gallery.swf");
    this.onEnterFrame=function(){
    // if you have a textfield with instance name preloaderTF
    preloaderTF.text=Math.round(100*container.getBytesLoaded()/container.getBytesTotal())+"% Loaded";
    if(container.getBytesLoaded()>100&&container.getBytesLoaded()>=container.getBytesTotal()){
    delete this.onEnterFrame;

  • How do I get a movie clip to play fully in an iphoto slide show.

    How do I get a movie clip to play fully in an iphoto slideshow.  Right now it only plays for a few seconds, while the complete clip is 22 seconds.

    Bring up the Settings pane for the slideshow and click on the movie clip in the tray at the top.  Then in the Settings pane click on This Slide button and set the play time to the actual length of the movie clip. 
    OT

  • How can i let a move clip complete his motion tween movement after dragging and dropping it

    hi how can i let a move clip complete his motion tween movement after dragging and dropping it
    i am using this code and there is a motion tween applies to the movie clip r_mc
    r_mc.addEventListener(MouseEvent.MOUSE_DOWN,fun); r_mc.addEventListener(MouseEvent.MOUSE_UP,fun2); function fun(event:MouseEvent):void { stop(); r_mc.startDrag();
    function fun2(event:MouseEvent):void {
    play(); r_mc.stopDrag();

    i have a simple .fla file wich contains MC that has
    a motion tween(its moving from the left to the right of the stage)
    this motion tween covers the whole time line (  there is only 50 frames in the time line)
    i mean in the frame 1 the MC appears in the left of the stage
    and in the frame 50 the MC appears in the right of the stage and there is a motion tween between them
    every thing till now working well
    i want to make that MC dragabble
    so when i drag the MC i will use stop()
    and when i drop it i will use play()
    but the problem is that the mc doesnt move and complete
    his motion tween movement when i drop it
    for example the MC will be in the middle of the stage in frame 25
    in this frame (25) i am draging the MC ,stoping the timeline,dropping the MC and resum playing the timeline again
    but the MC freezes in the middle of the stage and doesnt go to the right of the stageo until the flash loops and start from the frame 1 again
    here is the example wich i am worikng on
    http://www.mediafire.com/?ia47r4owha7sz8v
    thank u very much and sorry for my bad English

  • How do you make a movie clip face the mouse

    How to you make a movie clip rotate so it's always facing the
    mouse?

    thanks a lot! I got the code to work, I just modified it a
    bit.

  • HT6196 how do I edit  a movie clip to get rid of unwanted parts of a clip

    how do I edit a movie clip in thelatest version of I movie to get rid of unwanted parts of a clip

    You can split a clip into pieces using Quicktime Player.  See:
    http://support.apple.com/kb/PH5879?viewlocale=en_US&locale=en_US
    for details.
    Second question:
    I don't know what you want to acheive but yhe only way I can think of to move a precise time into a clip is to select it and trim it - whilst trimming the time amount trimmed is displayed.  Stop when you have the right amount then position the playhead there.  You can then 'untrim it' and he playhead will be at the desired spot.
    Geoff.

  • How do I stop a movie clip from looping

    I am using Action Script 3 and the 'stop()' function is not working to stop my movie clips from looping continuously.
    I have added the 'stop()' function to the last frame on the timeline of each movie clip.
    I originally built the .fla file in Flash CS6 using Action Script 2 where it was working with no problems (I have since upgraded and don't have access to CS6 anymore).
    I have all the separate movie clips positioned on Frame 1 of my main stage with the following script to start them playing:
    Cigarette_Reveal.play();
    KickTheHabit.play();
    BallMove.play();
    BallFlip.play();
    Offer.play();
    I want each of these movie clips to stop playing after one animation sequence is complete.
    Please help!

    Turn on strict mode in your publish settings. This will allow you to see the compiler errors that are preventing the actionscript in your fla from compiling correctly.

  • How do I acces a var from the main time line in to a movieclip?

    I'm making a quiz-type animation, since I'm new with ActionScript I had developed my own way to make this work.
    I want to add like a meter that shows one out three position depending on the answer given, I had made this animation as a movieclip but now I need it to react according to the answer, so it changes on every question to do that I need to access the variables I'm using in the main time line, how can I access the the main time line variables from the movie clip?
    The movie clip (meter) is basically the background and the questions will change and advance on top of that movie clip so it'll change with each answer until you get the final result.
    Since I cant attached my FLA file here I could email my it to whom may want to help me, THANK YOU!!!

    I kinda of make it work using what you suggested: var meterVar = MovieClip(this.root).userAnswer;, but I have different problems now I'm getting this error: TypeError: Error #1009: Cannot access a property or method of a null object reference.
         at divameter2_fla::MovieClip_1/frame1() and the meter movieclip only change from the original position to the second and stays there even if the first answer supose to sent it to the third or four position. here is the code for the main and movie clip:
    Main:
    The following code I have it in separate frames, I know is probbably not the best way to do it but I'm new with AS.
    Frame 1:
    stop();
    messageBox.text = "";
    var userAnswer:int;
    var rbg:Object = rbA.group;
    var finalScore:int;
    btnCheck.addEventListener(MouseEvent.CLICK, nextBtn);
    function nextBtn(evt:MouseEvent):void {
                 userAnswer = int(rbg.selectedData);
                 if(userAnswer == 0) {messageBox.text = "Please select an option";
                 }else{
                     finalScore = userAnswer;
                     gotoAndPlay(2);
    Frame 2:
    stop();
    messageBox.text = "";
    var rbbg:Object = rbbA.group;
    btnCheckTwo.addEventListener(MouseEvent.CLICK, nextBtnTwo);
    function nextBtnTwo (evt:MouseEvent):void {
                 userAnswer = int(rbbg.selectedData);
                 if(userAnswer == 0) {messageBox.text = "Please select an option";
                 }else{
                     finalScore = finalScore + userAnswer;
                     gotoAndPlay(3);
    Frame 3:
    stop();
    messageBox.text = "";
    var rbcg:Object = rbcA.group;
    btnCheckThree.addEventListener(MouseEvent.CLICK, nextBtnThree);
    function nextBtnThree (evt:MouseEvent):void {
                 userAnswer = int(rbcg.selectedData);
                 if(userAnswer == 0) {messageBox.text = "Please select an option";
                 }else{
                     finalScore = finalScore + userAnswer;
                     gotoAndPlay(4);
    Frame 4:
    stop();
    messageBox.text = "";
    var rbdg:Object = rbdA.group;
    btnCheckFour.addEventListener(MouseEvent.CLICK, nextBtnFour);
    function nextBtnFour (evt:MouseEvent):void {
                 userAnswer = int(rbdg.selectedData);
                 if(userAnswer == 0) {messageBox.text = "Please select an option";
                 }else{
                     finalScore = finalScore + userAnswer;
                     gotoAndPlay(5);
    Frame 5:
    stop();
    messageBox.text = "";
    var rbeg:Object = rbeA.group;
    btnCheckFinish.addEventListener(MouseEvent.CLICK, finishBtn);
    function finishBtn (evt:MouseEvent):void {
                 userAnswer = int(rbdg.selectedData);
                 if(userAnswer == 0) {messageBox.text = "Please select an option";
                 }else{
                     finalScore = finalScore + userAnswer;
                     if (finalScore > 4) gotoAndPlay(6);
                     if (finalScore > 9) gotoAndPlay(7);
                     if (finalScore > 13) gotoAndPlay(8);
    The las theree frames are the 3 different results and the code they have is only a stop();
    The following is the movieclip code:
    stop();
    var meterVar = MovieClip(this.root).userAnswer;
    var btnCheck = MovieClip(this.root).btnCheck;
    var btnCheckTwo = MovieClip(this.root).btnCheckTwo;
    var btnCheckThree = MovieClip(this.root).btnCheckThree;
    var btnCheckFour = MovieClip(this.root).btnCheckFour;
    btnCheck.addEventListener(MouseEvent.CLICK, nextBtn);
         function nextBtn (evt:MouseEvent):void {
                 if (meterVar == 1) {gotoAndPlay(2);
                     if (meterVar == 2) gotoAndPlay(3);
                     if (meterVar == 3) gotoAndPlay(4);
                 }else{ gotoAndPlay (1);
    btnCheckTwo.addEventListener(MouseEvent.CLICK, nextBtnTwo);
         function nextBtnTwo (evt:MouseEvent):void {
                 if (meterVar == 1) {gotoAndPlay(2);
                     if (meterVar == 2) gotoAndPlay(3);
                     if (meterVar == 3) gotoAndPlay(4);
                 }else{ gotoAndPlay (1);
    btnCheckThree.addEventListener(MouseEvent.CLICK, nextBtnThree);
         function nextBtnThree (evt:MouseEvent):void {
                 if (meterVar == 1) {gotoAndPlay(2);
                     if (meterVar == 2) gotoAndPlay(3);
                     if (meterVar == 3) gotoAndPlay(4);
                 }else{ gotoAndPlay (1);
    btnCheckFour.addEventListener(MouseEvent.CLICK, nextBtnFour);
         function nextBtnFour (evt:MouseEvent):void {
                 if (meterVar == 1) {gotoAndPlay(2);
                     if (meterVar == 2) gotoAndPlay(3);
                     if (meterVar == 3) gotoAndPlay(4);
                 }else{ gotoAndPlay (1);
    I had attached the almost working FWS file

  • How do I use a variable to set movie clip properties?

    I'm building a simple contact page that allows users to
    select a city from a comboBox. I'd like to pass the selected
    comboBox data through a variable that controls a movie clip with
    the same name. (already on the stage)
    locationListener.change = function (loc_obj:Object) {
    var loc_mc = loc_obj.target.selectedItem.data;
    loc_mc._visible = true;
    So far this hasn't worked. I've tested hardcoding the movie
    clip instance name (Atlanta._visible = true) and it works, but I
    can't figure out why using the variable loc_mc won't trigger
    interaction with the movie clip.
    Something simple, I assume. Thanks in advance for any
    help.

    clbeech:
    I tried using your suggestion, but for some reason it doesn't
    recognize it as naming the movie clip instance. I traced the
    variable and confirmed that the correct value (Atlanta) is being
    passed.
    I assume this is because the variable is not declared as a
    MovieClip, but I can't figure out how to convert it inside the
    function.

  • How to load swf into a movie clip?

    i have an swf file i want to load into a movie clip within my
    flash file, i think im supposed to use loadmovie () instead of
    loadmovienum, can anyone help me out? thanks

    loadMovie("X",Y);
    Where x is: the url of the swf file you want to load.
    Where y is: the name of the movieclip you want to load it
    into. You must give the movieclip an instance name.
    For example, if I wanted to load '1.swf' into a movieclip
    with an instance name of "loaderclip," my code would be:
    loadMovie("1.swf", loaderclip);

Maybe you are looking for

  • Removing corrupt messages in Apple Mail

    I have 6 identical messages in Apple Mail dating from 2006. I cannot delete them or move them. I've been told it is due to the messages being corrupted. OK. How do I get rid of them?

  • 19:9 Aspect Ratio

    Hi, I'm don't work with video much but have to convert things from time to time into DVD. I was given a 19:9 ratio to work w/ this time but I only see 4:3 and 16:9 as options on DVDSP. What pixel dimensions(width, height) should the video be created

  • Stack Trace Error in Web Dynpro App

    Hi, I am getting the following error when the RFC Bapi call is invoked from my WD Application: java.lang.ArrayIndexOutOfBoundsException: -1      at com.sap.mw.jco.JCO$MetaData.getType(JCO.java:9391)      at com.sap.aii.proxy.framework.core.JcoBaseTyp

  • Error in OpenReport, Export to PDF

    Post Author: Tussan CA Forum: Crystal Reports My code: CRAXDDRT.Application CA = New CRAXDDRT.Application(); CRAXDDRT.Report CR; CR = CA.OpenReport("report.rpt", CRAXDDRT.CROpenReportMethod.crOpenReportByTempCopy); CR.ExportOptions.DestinationType =

  • Biztalk server 2010

    what is the cause of saving 0 byte file in repository. Please any one tell me exactly cause for this issue....