Accessing a movie from another movie (class)

Hi all!,
Ok, this is a little bit complicated to explain, but I will
try my best. First, please click on the link below to see the
mockup that I did:
Link
to mockup
Now for some explanation:
First of all, the Flash makes use of an XML file to grab some
data. This part was freakin complicated and it's actually a
programmer who helped me with that but he is very unfamiliar with
AS on the whole so he couldn't really help me with the rest. OK so
basically in the first frame I am loading the XML, then what you
are seeing on the stage is in frame 2.
on the stage there are 2 movies:
1. scrollPane_mc
2. cables_mc
For now you can check and uncheck the items in the scroll
pane and you can roll over the cables to see their names.
1. scrollPane_mc
scrollPane_mc is a scroll pane component that has a movie
called cableList_mc as source.
cableList_mc itself is an empty movie with just 1 frame and
which dynamically grabs a movie called cableListItem_mc (itself
attached to a class of the same name) from the library and
duplicates it, based on data from the XML file.
code in cableList_mc:
var startY:Number = -0.8;
for (var cableName:String in VPN_Utils.cables) {
var listItem:cableListItem_mc = new cableListItem_mc();
listItem.name = cableName;
listItem.x = 0;
listItem.y = startY;
listItem.cableNameText.text =
VPN_Utils.cables[cableName][0];
addChild(listItem);
startY += 18;
code for cableListItem_mc.as (1 cableListItem_mc is basically 1
checkbox item):
package {
import flash.display.*;
import flash.events.*;
import flash.text.TextField;
import VPN_Utils;
public class cableListItem_mc extends MovieClip {
private var checked:Boolean = true;
public function cableListItem_mc() {
addEventListener (MouseEvent.MOUSE_DOWN, swap);
private function swap(e:MouseEvent):void {
if (checked) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
checked = !checked;
trace (this + " " + this.name + " is " + checked);
2. cables_mc
cables_mc on the other hand just contains several movie
clips, placed manually on the stage and all of them based on the
class VPN_Cable.as
code for VPN_Cable.as:
package {
import flash.display.*;
import flash.events.*;
public class VPN_Cable extends MovieClip {
public function VPN_Cable() {
addEventListener (MouseEvent.MOUSE_OVER, onMouseOver);
addEventListener (MouseEvent.MOUSE_OUT, onMouseOut);
private function onMouseOver(e:MouseEvent):void {
text_mc.visible = true;
private function onMouseOut(e:MouseEvent):void {
text_mc.visible = false;
So basically now what I want to achieve is to control and
talk to the cables from the scroll pane. So when I uncheck "Cable
1" in the scroll pane, "Cable 1" on the stage should turn invisible
for example.
I hope this is clear....
Thanks a lot! in advance!
jon.

Hi kglad!
uhhh, thnx a lot for u reply =] but it's not exactly this
that i'm looking for. Well yeah, i know i have to assign mouse
listeners to my checkboxes (....) (and I already have actually),
but could you give some details about that? That would help
greatly. My problem is that I don't know how to talk to the cables
(which are in a separate movie) from the checkboxes (which are in
yet another movie).
Thanks!
And happy new year!
jon.

Similar Messages

  • Accessing a JTextField from another class

    I 've got 2 classes I am trying to get the value of a JTextField that located in a second class see the code
    class1 myClass = new class1();
    String text = myClass.jTextField1.getText();
    System.out.print(text);What happens is when i run the program and enter some text in the jTextFild1 and then click on my Jbutton it does not print anything
    the JButton is in the caller class
    Could anyone explains to me what is wrong

    an example would help maybe....
    if you want to access your jtextfield from another class then:
    import javax.swing.*;
    public class FieldHolderClass {
    public JTextField jtf = null;
    public FieldHolder() {
      JFrame jf = new JFrame();
      jtf = new JTextField();
      jtf.setText("this is the text that is here when other callerclass seeks for text");
      jf.getContentPane().add(jtf);
      jf.setVisible(true);
    public class CallerClass {
    public static void main(String args[]) {
      FieldHolderClass fHolder = new FieldHolderClass();
      System.out.println((fHolder.jtf.getText());
    }of course i have not written any swing app for a long time, so i might have forgotten everything... so, don't flame me when that code does not compile.
    the thing that it's supposed to show, is that you make a <b>public</b> variabel (jtf) and you simply ask for it from another class by typing holderclass instances name dot and that variable name (in this case jtf) and dot and then call the method on that variable (or object...)
    it might also be that you want your code to work the way that when you enter a text into jtextfield, then after pressing enter it would get printed on terminal...
    in that case you should also register some Listeners... i remember that back when i was just getin' to know java then i had problems with it as well... but then again, i didn't read any manuals...
    i hope i was somewhat help...

  • How to call a Java class from another java class ??

    Hi ..... can somebody plz tell me
    How to call a Java Class from another Java Class assuming both in the same Package??
    I want to call the entire Java Class  (not any specific method only........I want all the functionalities of that class)
    Please provide me some slotuions!!
    Waiting for some fast replies!!
    Regards
    Smita Mohanty

    Hi Smita,
    you just need to create an object of that class,thats it. Then you will be able to execute each and every method.
    e.g.
    you have developed A.java and B.java, both are in same package.
    in implementaion of B.java
    class B
                A obj = new A();
                 //to access A's methods
                 A.method();
                // to access A's variable
                //either
               A.variable= value.
               //or
               A.setvariable() or A.getvariable()

  • Accessing XML data from a different class

    Hi all,
    I have an xml class that loads xml data, I need to access the data from another class. I have imported the xml classinto the new class and created a new instance of it. However when I try to access the xml data it is coming back as null. I understand this is almost certainly because when it is called the xml data hasn't completed it's load. How can I get round this?
    xml class:
    package {
        import flash.xml.*;
        import flash.events.*;
        import flash.net.*
        import flash.display.*
        public class xml extends MovieClip
            public var xmlRequest:URLRequest;
            public var xmlLoader:URLLoader;
            public var xmlImages:XML;
            public function xml()
                xmlRequest = new URLRequest("images.xml");
                xmlLoader = new URLLoader(xmlRequest)
                xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
                xmlLoader.load(xmlRequest);
            private function xmlLoaded(event:Event):void
                trace(xmlLoader.data);
                xmlImages = new XML(xmlLoader.data);
    Thanks in advance

    One of the ways:
    package {
         import flash.xml.*;
        import flash.events.*;
        import flash.net.*
        import flash.display.*
        public class XMLLoader extends EventDispatcher
              public var xmlRequest:URLRequest;
              public var xmlLoader:URLLoader;
              public var xmlImages:XML;
              public function XMLLoader()
              public function loadXML(url:String):void {
                   xmlLoader = new URLLoader()
                   xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
                   xmlLoader.load(new URLRequest(url));
              private function xmlLoaded(event:Event):void
                   trace(xmlLoader.data);
                   xmlImages = new XML(xmlLoader.data);
                   dispatchEvent(event);
    Usage:
    var xmlLoader:XMLLoader = new XMLLoader();
    xmlLoader.addEventListener(Event.COMPLETE, onXMLLoad);
    xmlLoader.loadXML("images.xml"):
    function onXMLLoad(e:Event):void{
         trace(xmlLoader.xmlImages);

  • Access to MD03 from another transaction

    Hi Gurus,
    We did a trace to all the users, and one of them used the MD03 transaction. The point is that he has no authorization to this transaction, so probably he is accessing to it from another.
    Could you help me searching any transaction where the user could jump to MD03 from menu, buttons, double click,...?
    Thank you in advance.

    Hi,
    Click on Enviornment>>Navigation profile>>Assign. In the General settings tab page you can assign the navigation profile. Just check whether the navigation profile assigned to the user has the T-code MD03. Check the seetings and t-codes in OM0K - Define navigation profile.
    But as suggested by Mr.Brahmankar kindly check whether it's possible to access the transaction from MD04 if the user doesn't have the authorization of other transaction which he/she is accessing. In your case MD03. I'm not sure about that.
    Regards,
    Lodhi.S

  • How to access my mail from another computer. Both iPads

    HHow to access my mail from another computer. Both iPads. Both iCloud.

    add the email account to your email software like with any email service, or go to www.iCloud.com

  • How to access Enterprise manager from another computer

    Hi There,
    I have Oracle 10g installed on a PC. I can access EM from that PC.
    I would like to know how would I access EM Dbconsole from another computer under same LAN.
    Thanks
    Raf

    Opening the web browser, you can specify the hostname and the port configured to listen the incoming call.
    For example:
    https://hostname:port_number/em
    or
    https://ip_address:port_number/em
    you can get information about the information that you need from the "emctl"
    emctl status dbconsole
    Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
    https://hostname:1158/em/console/aboutApplication
    Oracle Enterprise Manager 11g is not running.
    Best regards !
    Shin-Iti.

  • What URL do I need to use to sign-in to my Firefox Sync acct to access my bookmarks from another device?

    What URL do I need to use to sign-in to my Firefox Sync acct to access my bookmarks from another device? I am not sure what URL to type in on the other device to access my Sync Acct. Do I type www.firefox.com/sync or www.firefox.com, or what? ....Thanks

    You need to enter the email address and password that is use to set up the Firefox account
    See also:
    *https://support.mozilla.org/kb/how-to-update-to-the-new-firefox-sync
    *https://wiki.mozilla.org/Identity/Firefox-Accounts

  • A warning popped up on my ipod touch saying someone else has accessed my account from another device

    Was I hacked? While playing my ipod touch app dragonvale a warning poppoed up that said someone else has accessed my account from another device? What do I do?

    Change your password.

  • Access Time Capsule from another location

    My Time Capsule works well in my WiFi at home with both automatic backup of my Macbook Pro and to save large files on.  What are the setting i need to add to be able to access the files from another WiFi system away from home?

    There is a lot of setup involved..
    The TC must be the main router of the network.. it cannot be bridged.
    The wifi network you are attached to remotely must give you a full public access IP address. Find the public IP of the TC and see if you can then access it.
    Do not ever expect this sort of thing to be completely straight forward.
    Read the many many posts about remote access. There are different methods if BTMM doesn't work.
    See AirPort
    Remote access article as a starting point.

  • How can I access my email from another computer. Both iPads.

    HHow to access my email from another computer. Both iPads.

    depend on the mail provider really this sub forum is about installing windows on mac computer though you may get more advice if you post your question in the ipad forum
    Using iPad

  • Accessing a servlet from another class

    Not to confuse anyone too much, but here's the scenario.
    I have a servlet that calles other Java classes which perform various functions. Now can I have one of these classes access the servlet directly, without setting up a socket based connection. What I mean is can I just simply call its methods and have access to the HttpServletResponse/HttpServletRequest objects?
    Usually the servlet gets accessed via an HTTP client where then servlet will call classes it needs to access, where here I have a class accessing the servlet directly.
    I do not have the capability of running servlets at the moment so I cannot just do a quick and dirty test to see how it would be done.
    Any input would be appreciated.

    If you have a servlet that contains methods that
    aren't related to the processing of a request (except
    for initialization) then those methods are in the
    wrong place. I don't know where they should be
    instead, that depends on your design. Perhaps you
    should post some details about what you are trying to
    do here.Currently I have not written code for what I am attempting.
    What I am attempting is quite an unorthodox approach of getting server information via a servlet. However unlike your standard servlet the servlet will be accessed via a java class, rather than being invoked from a URL.
    If I had to use psuedo-code I would put it like this:
    class A{
    public void accessHeaders(){
    // access servlet HttpRequest object.
    // use the object.
    // display header info...etc.
    // main prog.
    class Test {
    public static void main(String[] a){
    A a = new A();
    a.accessHeaders();
    The servlet will be a generic servlet which overrides a doGet().
    That's right an app accessing a servlet. I have done this but using the java.net package but I don't want to use that in this case. Can I implicitely call the servlet?
    Now the more I think about doing something like this the more I feel that it cannot be done this way.
    I am new to servlets so I don't know all the ways they can be used.

  • How to access Time Machine from Another Computer?

    My daughter's iBook went down and is in the shop for repair and we want to access her Time Machine back up from another computer. Does anyone know if there is any way to do that?

    Time Machine won't do it as far as I can tell.
    However, you can access the backups through Finder.
    Warning - you *do not* want to do anything but copy out files - no deletes, moves, renames, no nuttin... Doing so will screw up the backups for any future Time Machine use!
    If the backups are on an external disk, then just navigate to the folder Backups.backupdb/yourMachineName there you will find each backup by date/time with the contents of the system at that time.
    If the backups are to a Time Capsule you need to mount the backups - the sparsebundle file - first then examine the folder Backups.backupdb/yourMachineName.
    Time Machine does have a 'Browse Other Time Machine Disks' option, but as far a I can exercise it it only looks at other disks with backups for the same machine.
    Again _only copy_ out files. Normally one should only use Time Machine, but here you can't - so be cautious.

  • Access custom metadata from another plugin

    I was wondering if it would be possible to access the custom metadata from one plugin from another plugin.
    I know you use the _PLUGIN object when you read or write the metadata with a plugin.Is there any way to pass the varible to another plugin, maybe stored in a xml or text file in the modules folder? I also see where you can use the "unique identifying string" or plugin.id. Is this id differant for every installation of Lightroom?

    Allen, I'm pretty sure the answer is no - you can't access another plug-in's custom fields.
    I'm sure I have read this limitation somewhere - even if I can't now see it stated explicitly in the documentation. If anything, the docs imply getPropertyForPlugin can do so by specifying the LrToolkitIdentifier value (which you may be able to pass as a preference). So this doesn't work:
         getData = photo:getPropertyForPlugin("uk.co.beardsworth.missing", jbMissing )
    It is an important point though that one plug-in should be able to access another's custom fields. Obviously one can think of many ordinary circumstances where it would be handy, but I'm more worried about the longer term DAM viability of custom metadata. Let's say I decided to release a plug-in based around custom fields and users entered metadata which had some value to them - whether that's just input time or business data (eg client or agency account number). Now move on to LR3 and the plug-in no longer works - I've disappeared, driven mad by SDK changes, or you're unwilling to pay my extortionate plug-in upgrade fee.
    Now what happens to that valuable metadata? The data is still in the database but you can't read it because the original plug-in's unavailable, and Adobe's built-in "All" Plugin Metadata panel only shows data from enabled plug-ins. It's not in the XMP either. You're stuffed - unless you're resourceful enough to reverse engineer chunks of the plug-in. Assuming that I encrypted my plug-in's code, that means you're going to have to dig around the SQL to figure out my plug-in's ID and its field names. Only then can you create a plug-in to rescue your custom data. And you've got to hope to hell that my plug-in didn't encrypt or obscure the values you entered.
    For me what this shows is
    1) You're taking a big risk if you store valuable custom metadata - if you can't sort it out yourself, should you do it?
    2) You should ensure any plug-in with custom metadata stores its field definitions in unencrypted files
    3) The All Plug-in Metadata panel needs to show all plug-in metadata
    4) The SDK should allow you to get custom metadata from other plug-ins
    4) Custom fields should be mapped to XMP
    Short answer - No.
    John

  • Can multiple users access apps purchased from another Apple ID account?

    I have several iMacs under my control. I need to find a way to download iLife using one Apple ID, so I can have all users on each machine to also have access to the updated iLife suite.
    Is it possible for other users to access an app that was purchased from another Apple ID. If one purchases an app, does the machine allow access to all the users?
    (I know those two last sentences are redundant, but I want to make sure everyone understands problem).
    I've read countless articles on this, and can't seem to catch a break from the problem.

    If this is in a school of some type or a corporate learning center with multipple Mac computers you should contact Apple directly and ask them for help in getting a version that can be installed on multiple Mac with out have to down the updates to each computer individually.

  • How to access icloud account from another iphone

    My iphone fell in the water. I am on vacation and need to access info from my calendar. How can i do it from another iphone device?

    Just enter your account details under:
    Settings > Mail, Contacts, Calendar
    and add your account.
    Finished.

Maybe you are looking for