How to communicate a button to a movie_clip inside of UiLoader component using AS3?

Hi, i'm making a flash application to test various paints, for a company.
I have movie clip on stage having some buttons on left side and a uiloader on other side which loads an external swf file on button(thumb_01) click-target. In main movie clip there are two buttons. 1 trigger a function to select a wall and 2nd trigger a function to select roof. External swf(movie_01.swf) file has two movie clips 1 is a wall(mask_01) and 2nd is roof(mask_02). Now the problem is i want to click a button to select wall inside of external swf file to change it's color. I'm sure that the problem is in path through which i'm trying to select a wall movie which is inside of UiLoader. Can any one tell me What'll be the path to trigger a function to a movie clip inside of Uiloader?
Here is my code for Button to select a wall or roof ==================================
import flash.events.MouseEvent;
import fl.motion.MotionEvent;
var targetObj:Object;
selectWall_btn.addEventListener(MouseE… selectWall);
function selectWall(evt:MouseEvent):void {
targetObj = uiloader.movie_01.mask_01; <--------- I think problem is in this path....
trace ("Wall is selected!");
Here is code for uiloader ========================================…
import fl.containers.UILoader;
Object(this).slider_mc.thumb_01.addEve… loadMovie_01);
function loadMovie_01(evt:MouseEvent):void {
trace ("Movie is Loading!");
var uiLoader:UILoader = new UILoader();
uiLoader.source = "movies/movie_01.swf";
uiLoader.scaleContent = false;
uiLoader.x = 291;
uiLoader.y = 19;
addChild(uiLoader);
uiLoader.addEventListener(Event.COMPLE… completeHandler);
function completeHandler(event:Event) {
trace("Number of bytes loaded: " + uiLoader.bytesLoaded);
Error is this....
Scene 1, Layer 'ActionsScript', Frame 1, Line 43
1120: Access of undefined property uiLoader.
Can any one Help me?

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

  • How to skin the UI Component using AS3

    Hi,
    My application demands skinning the scroll bar component using  coding.
    Aware of manual skining but how can we change the skin programmatically using AS3.
    Help please.

    When you create content dynamically, using the dot notation doesn't work and you have to use getChild...  methods if you want to access via the parents.  However, you shouldn't need to do that since you already have a direct reference to the object...
    nextChild.addEventListener(MouseEvent.CLICK ,onChildClick);
    function onChildClick(evt:MouseEvent):void
    trace("Last Child is Clicked");
    You probably could have realized this when you were implementing this line (assuming it worked)...
    myChild.addChild(nextChild);
    With the parent approach to targeting, wouldn't you have tried to use... myMovie.myChild.addChild(nextChild); ?
    and "Click" should be "CLICK"

  • [IDCS2]How to move the Snippet in a folder inside the Indesign Document Using Script?

    Hi
    How should i move all the snippet objects in a folder in to an Indesign Document using Javscript?
    Thanks
    myriaz

    Once you have the snippet in your document, how do you move it/select it? My snippet is a text frame with a table in it.
    This does NOT work:
    var myFoot = myDocument.pages.item(0).place("Hard Drive:Users:Casey:Desktop:footer.INDS")
    myFoot = myFoot[0]
    myFoot.geometricBounds = ["1", "1", "1", "1"]
    The snippet gets placed, but my error says "Object does not support the property or method 'geometricBounds'. This code works for normal images I place.
    JS - Mac - CS3
    Casey

  • How can I tile an image on stage to fill the background using AS3?

    Hi,
    I have a small image which is to be tiled on background filling it completely. How can I code it?
    Thanks.

    I don't know if you cna draw directly to the stage or not (i think not) but this would do the job
    package
              import flash.display.Bitmap;
              import flash.display.Sprite;
              import flash.events.Event;
              public class Main extends Sprite
                        [Embed(source="flash.png")]
                        private var Picture:Class;
                        public function Main():void
                                  if (stage)
                                            init();
                                  else
                                            addEventListener(Event.ADDED_TO_STAGE, init);
                        public function init(e:Event = null):void
                                  removeEventListener(Event.ADDED_TO_STAGE, init);
                                  var background:Sprite = new Sprite();
                                  addChild(background);
                                  var image:Bitmap = new Picture();
                                  background.graphics.beginBitmapFill(image.bitmapData);
                                  background.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
                                  background.graphics.endFill();

  • How to let the character in my flash game make a jump using AS3?

    i want to make the character in my flash game make a jump when the player presses a key,e.g. 'space',even the player release the key instantly,the character will still finish the complete jump process.Hope somebody will give me some advice, Thank you so much!!!

    what's the problem?

  • How can I rename buttons in dialog popup ?

    Hello.
    I want rename buttons "OK", "Cancel" with my names in popups.
    I create new values in domen WDR_POPUP_BUTTON_KIND
    Next enhance interface IF_WD_WINDOW with new attributes:
    CO_BUTTON_CP type WDR_POPUP_BUTTON_KIND
    But i have problem in CL_WDR_INTERNAL_WINDOW->IF_WD_WINDOW~SET_BUTTON_KIND:
      case me->buttons-button_kind.
        when co_buttons_abortretryignore.
          wa_button-button      = co_button_abort.
          wa_button-button_text = cl_wdr_texts=>get_text( '201' ).
          wa_button-tooltip     = cl_wdr_texts=>get_text( '201' ).
          wa_button-is_enabled  = abap_true.
    This code show only predefined type of buttons can use. 
    How can I rename buttons in dialog popup ?

    When you subscribe to button event  you can rename the button
    * Popup
      DATA lo_window_manager TYPE REF TO if_wd_window_manager.
      DATA lo_api_component  TYPE REF TO if_wd_component.
      DATA lo_window         TYPE REF TO if_wd_window.
      lo_api_component  = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
      lo_window         = lo_window_manager->create_window(
        window_name          = 'W_POPUP'
        message_display_mode = if_wd_window=>co_msg_display_mode_selected
        button_kind          = if_wd_window=>co_buttons_ok
        message_type         = if_wd_window=>co_msg_type_none
        default_button       = if_wd_window=>co_button_ok
      DATA:  l_api TYPE REF TO if_wd_view_controller.
      l_api = wd_this->wd_get_api( ).
    " subscribe to button event
      lo_window->subscribe_to_button_event(
                   button            = if_wd_window=>co_button_ok
                   BUTTON_TEXT       = u2018Approveu2019 " renaming the button text
                   action_name       = 'ON_OK_POPUP'
                   action_view       = l_api
                   is_default_button = abap_true ).
      lo_window->open( ).
    Radhika

  • How to remove the buttons in ALV GUI?

    Hi All,
    I am using the FM REUSE_ALV_GRID_DISPLAY for disaplying the ALV grid. i need how to remove these buttons ( mail word processing, loal file, Mail recipient,  ABC analysis, Microsoft Execl and Graphics ) from the ALV Gui?
    please give solution.
    Regards,
    Santha

    hi,
    IT_EXCLUDING TYPE SLIS_T_EXTAB OPTIONAL
    you need to append the Fucntion codes to the it_exclude and then pass it to the parameter it_excluding.
    append '&ABC' to it_excluding.
    append '&BAC' to it_excluding.
    call function 'REUSE_ALV_GRID_DISPLAY'
    IT_EXCLUDING = it_exlcuding
    Regards
    Anver

  • How to handle Back button in IA06 BDC

    Hi all,
    I am calling IA06 inspection screen for an task list operation using BDC from my custom program. on this screen user can change the SAP data. if I save the task list then it's working fine.
    But I have one issue how to control back button, when user make any changes on this screen and click on back button because it calls all the previous screens which i skipped using BDC.
    Or for this particular functionality there is any Function module same as for Characterstics as "CLFM_OBJECT_CLASSIFICATION"
    Please advice.
    Thanks,
    Sanket Sethi

    Hi all,
    Please suggest if there is any function module/ API  to call Task list characteristic screen directly; same as for Task list classification screen using Function module CLAF_CLASSIFICATION_OF_OBJECTS.
    Thanks,
    Sanket Sethi

  • How to delete help button in the wizard and dialogs.

    Hello,
    I am trying to delete the Help button in the wizard and dialogs provided by bibeans and having problems. Can someone give me an advise regarding the following three issues please? Thank you.
    bibeans:bibeans903a
    JDeveloper:JDeveloper903
    1)Deleting the Help Button from the Print Dialog.
    I'm using "oracle.dss.dataView.gui.PrintDialog" for the Print Dialog and this class has method to delete the Help button(setHelpEnabled(Boolean)).
    But, the Help button is always displayed even when I set false for this method like below.
    PrintDialog.setHelpEnabled(false);
    2) Deleting the Help button from Open Dialog and BI Explorer.
    I am using "PersistenceObjectChooser" class for Open Dialog and "Explorer" class for BI Explorer. But, these classes does not have a method to delete the Help button like the PringDialog class has. How can I delete the Help button for these dialogs?
    3) Deleting the Help button from Calculation Builder.
    I am using "CalcBuilderStepStorage" class to build a calculation and trying to delete the Help button like this.
    ((DefultBuilderDialog)calcBuilderStepStorage.getContainer()).getWizard().setHelpAvailable(false);
    But, again the Help button will be displayed

    hi,
    Use this code..
    REPORT  Z_TEST999                               .
    DATA itab TYPE TABLE OF sy-ucomm.
    PARAMETERS test(10) TYPE c.
    AT SELECTION-SCREEN OUTPUT.
      APPEND: 'E' TO itab.
      CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
           EXPORTING
                p_status  = sy-pfkey
           TABLES
                p_exclude = itab.
    Regards,
    Sailaja.

  • In latest version of MF there`s missing button, which was in previous version: between buttons back/forward and the typing bar there used to be little flash, which showed few last pages I have just browsed. How can I restore it?

    In latest version of MF there`s missing button, which was in previous version: between buttons back/forward and the typing bar there used to be little flash, which showed few last pages I have just browsed. How can I restore it?

    If you mean the drop marker then you can still get the History of the Back and Forward buttons if any by either Left-Click and hold for a second or by Right-Clicking them.
    If you still want the drop mark there also then there is this Extension at https://addons.mozilla.org/en-US/firefox/addon/backforward-dropmarker/
    Also the abbreviation for Firefox is '''Fx'''

  • Is it possible to create a single texbox? and how to delete a button on a form? please asap, badly n

    Is it possible to create a single texbox? and how to delete a button on a form? please asap, badly needed it right now. thx -regards gustavo

    Hello Gustavo,
    You can create a single textbox using the textbox option here (This is for you to enter text - not for the visitor): http://jingsite.businesscatalyst.com/jing/2013-09-30_2212.png
    If you want to create a textbox for the visitors to enter text, then you need to enter a form, and you can delete the "message" field from the "simple contact" form, but not the name and the email fields (those are mandatory and can't be deleted).
    You may want to check external forms in case you want to have the form rather customized, to check if you can have forms with single textbox. An example would be "Jotform".
    Hope this helps.
    Cheers
    Parikshit

  • How to create SAVE button in Workbook using BI IP Functionality

    Hi All,
    I have Real-time Infocube (ZCUBSDID) with me. Planning has been done on the cube using BI-IP (like Aggregation level, filter, planning function and planning sequence are present there).
    As an Input i have everything in Quality system like I can access query in Bex Anlyzer (Input Ready Query) and also i have workbook associated with the query. SAVE button is also present on workbook which is giving result based on fiscal year and version.
    Now my task is to create workbook on Development system with the same functionality as Quality System.
    I have same Query available on DEV system also. I created new  Workbook but SAVE button is not available in my workbook.
    Can anyone suggest how to create SAVE button in my new workbook.
    I am new in IP side so please let me know if i can get any help from workbook which is already present in Quality system.
    Which type of analysis i should do to come out with solution.....otherwise let me know step by step procedure to create SAVE button on workbook using BI-IP functionality.
    It will be great help. My advance thanks goes to you people.
    Thanks,
    Rupali Singh

    Check points 19 & 20 on this link http://help.sap.com/saphelp_nw2004s/helpdata/en/43/a033e0f56e21b5e10000000a1553f6/frameset.htm.
    Command to be called on SAVE button is SAVE_AREA as explained in the point 20.
    Regards,
    Deepti

  • How can i make buttons in an article to go for other articles in Folios Builders for Ipad?

    I am trying to make buttons in an index, for goingo to other articles, but they never worked here. When a i put Go to Destination, and choose de Indd file, it does not work.
    Can i make a scrollable frame a button either? When i tryed, it did not work, not even the button, and the scrollable frame.
    Please, need some help here.

    WHat is navto? is navegate to...?   How can i do this?
    thanks a lot for your attenttiosn.
    Em 29 jan 2014 às 06:26, Bob Levine <[email protected]> escreveu:
    Re: How can i make buttons in an article to go for other articles in Folios Builders for Ipad?
    created by Bob Levine in Digital Publishing Suite - View the full discussion
    Go to destination is unsupported in DPS. You should be using go to url with a navto: command.
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/6064623#6064623
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/6064623#6064623
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/6064623#6064623. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Digital Publishing Suite at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • How to setup the button inactive in pf-status?

    who can tell me how to setup a button inactive in pf-status so that the button is inactive when the program is running?
    there is a sample of button '&SUM' in PF-STATUS 'STANDARD'(lines 303) of program 'RM07MKON'.

    Hi huanzhiyu,
    In a custom (Z) program you can make PF status buttons and subsequently their OK codes inactive by using the following command:
    SET PF-STATUS 'STANDARD' EXCLUDING '&SUM'.
    And if you need to exclude more than one OK code
    data: itab type sy-ucomm occurs 0,
          wa type sy-ucomm.
    move '&SUM' to wa. append wa to itab.
    move '&ADD' to wa. append wa to itab.
    set pf-status 'STANDARD' excluding itab.
    Hope this helps.
    Regards,
    Aditya

  • How to disable hold button in purchase order creation.

    hi
    how to disable hold button in purchase order creation.

    Select single * from VBAK where clause
    ---It fetches single record from the database, based on the condition you specified in the where clause.
    Where as select * from VBAK up to 1 row
    ---Fetches first record if the condition specified in the where clause is satisfied, otherwise it doesn't fetch any record

Maybe you are looking for