How to access or create a stage in a class file

Hello Flash Actionscript writers,
I have recently discovered that I cannot use the "stage" in a
class file. I had a regular fla file that had actionscript
in my "actions" layer. Of course, the fla has a stage object.
I decided it might be nice to use the actionscript
I wrote (copied, stole, etc) in as a class, so I could use it
in different places, etc. I am still a neophyte in this area.
My new class file consists of a button and a textfield. I
created small classes for each of these items as an exercise for
myself on creating a simple class, etc.
I also have a URLLoader, and use an xmllist to do a sort of
mini-slide show. The idea is to show a button and the textfield.
When the user clicks the button the slide show starts. I would like
to be able to center the images loaded on the stage, along with the
buttons, etc. Right now I am cheating - since I decided the stage
is 500 px wide, etc. I can use 500 - myButton.width, etc to center
items. The fla where the class is called has a stage that wide,
etc. The swf created from the class file WeeklySlideShow.swf is
created from a fla with the DocumentClass set to my class
WeeklySlideShow.as.
I then have yet another fla file, and load my
WeeklySlideShow.swf into that file, and play it, etc. But my
buttons and images are not centered. Or should I just put my
actionscript class back into the calling fla as an actions layer,
thus having a stage where I can center everything. I probably have
a flaw in the items in my class file and am really miss-using the
class concept, etc.
Any tips will help.
Thanks,
eholz1

A little more text explaining where you get stuck might help (tell us which wires you can figure out, and which ones you can't).
Anyway, if you never want this VI to give you a dialog, simply wire a FALSE constant to 'Advisory dialog?'.
If you wire TRUE to it, or leave it unwired, LV will give you a dialog if you want to open a file (specified by 'file path') and it does NOT exist, or if you want to create/replace a file and it DOES exist.
The file you actually want to open/create/replace is specified by the 'file path' input. If this is empty, LV will also show a dialog.
I am not sure what happens if you leave the 'file path' empty, and wire FALSE to 'Advisory dialog?', but that's easy to test.
In your case, to avoid a dialog always, make sure the 'file path' is
never empty and the 'Advisory dialog?' is wired to a FALSE constant.

Similar Messages

  • How to access Templates created in PAGES iwork06?

    How to access Templates created in PAGES iwork 06?
    I also want to eliminate default template folders and recreate my own as in 06 version of PAGES.
    Templates file is located where in '08?
    Don't need all the pre-made templates!

    The pre-made templates are contained in the Pages application package. Any templates you create yourself are stored in HD > Users > [your account] > Library > Application Support > iWork > Pages > Templates > My Templates. There is no separation of user created templates by Pages version. Those I created with Pages 1 & 2 are in the same place where my Pages 3 templates are & are all available to me in Pages 3. The only problem with this would be if you decide to use a previous version of Pages, you won't be able to access templates created with a newer version.

  • How to access symbol from different stage

    Hi everyone,
    I'm really new at Edge, so I still have a lot to learn and I need your help with something..
    I want to know how to access a symbol from another stage, here's what I've and what I want to do..
    I've the main index page with symbol named "content", in content I load other composition (page). called "page2".
    all I want to do is when I click a symbol "XX" inside "page2". The "content" symbol loads other composition called "page3".
    I don't know how to access "Content" from "page2", so I could load "page3" ..  that's it
    I feel like it's simple, but I just couldn't know how to do it, I',m sorry for bothering you for such a question, but I've searched a lot and I got nothing.
    Thanks
    I thought I could use something like this
    var comp = Edge.getComposition("EDGE-638329");  
    var stage = comp.getStage(); 
    var symp= comp.stage.getSymbol("content");
    EC.loadComposition("assets/units/stage1/s1_3/s1_3.html",symp);
    but it's still not working, could someone please tell me what I'm doing wrong?

    I have multiple compositions, where I need to go from one to another.
    I use click scripts in an element to do this, using identical pages with different animations on each page.:
    Click script:
    AdobeEdge.goLoc(url); //url is the URL of an identical new html page with a different animation
    Then I have a custom .js page that I use that has the function:
    AdobeEdge.goLoc = function(url) {
    location=url;
    Peter Small

  • How to create and exe from a class file.

    I want to create an application and want to distribute it. I am using simplw awt gui interface. I have compiled the program and have got the required class file. If I want an executable how can I go for it.
    There are many files provided by java library which are exe but are created using java API eg. policytool.exe. Please Help.
    Ashwini Bagga,
    Jaipur(Rajasthan)
    INDIA.

    Java uses the JVM to parse the class files. It cannot be converted to a .exe file
    but if you want to distribute it, i suggest you use InstallAnywhere which makes it into an exe installer.
    In the end it still uses the virtual machine...
    If i am wrong anywhere pls correct me thanks...

  • HELP : How to access a datasource rowset in the AM class ?

    Hi,
    i have an AM "TestAM" which contains the viewobject "ViewTest".
    in the class "TestAMImpl.java" i added a method called "verify()".
    in my JSP i have initialised the AM and a datasource based on the VO "ViewTest" :
    <jbo:ApplicationModule id="am" configname="TestAM.TestAMLocal" releasemode="Stateful" />
    <jbo:DataSource id="ds" appid="am" viewobject="ViewTest" />
    <%
    TestAM am = (TestAM) am.useApplicationModule();
    String Message = am.verify();
    %>
    My question is how to access to the rowset of the datasource "ds" in the code of the method
    "verify()" ?
    public class TestAMImpl extends ApplicationModuleImpl implements TestAM {
    public String verify()
    How to access the rowset initialised in the JSP???????????
    Thanks for your help

    This is correct. Think of the AM as having a hashtable of instances of view objects that you can lookup by instance name.
    The <jbo:DataSource> tag lets you lookup an instance by name in the AM and get a reference to it to use in the JSP page. Within your AMImpl class, you can either:
    [list]
    [*]Call findViewObject("YourViewInstanceName"), or
    [*]Just call the generated getYourViewInstanceName() method which is ok to call inside the Impl class to get hold of the same VO.
    [list]

  • How to create a Jar with only class files?

    Dear all,
    I want to create a jar file with only classes.My class files and java files are in different folders under com .
    say
    com
    in com there are two folders
    folder 1 -- subfolder 1
    folder 2 -- subfolder 2
    like this.
    If i want to create a jar file from com directory how should i give the jar command.Again my jar should contain only .class files.
    Any help will be appreciated
    Thanks
    lekshmi

    It doesn't work.Says "No such class or directory"
    Any other way Or is it possible to do so?Read the link I posted and create the statement to make your structure. I was thinking you were inside the com directory but if you are above it you will need something like this instead:
    jar -cf test.jar com\*.class com\subfolder1\*.class com\subfoler2\*.class
    But either way don't just copy and past this. Think about what is does so that you can make it work for you.
    Also, you might want to look into using Ant if you are going to be building this a lot.

  • How to access the int variable in the inner class

    hi all,
    i can't access the int variable in the inner class. can any one help me
    int count = 0;
    MouseMoveListener mouseMove = new MouseMoveListener() {
         public void mouseMove(MouseEvent e) {
              count1++;
              System.out.println(count);
    };how to access count variable
    thanks

    for this how can i access the countIf the count variable is a local variable you can't access it from within the
    inner class. Make it a member variable of the outer class instead:public class Outer {
       private int count;
       MouseMoveListener mouseMove= new MouseMoveListener() {
          public void mouseMove(MouseEvent me) {
             count++;
             System.out.println(count);
    }Alternatively, if you don't need that count variable anywhere else, you
    could simply make it a member variable of the inner class itself:public class Outer {
       MouseMoveListener mouseMove= new MouseMoveListener() {
          private int count;
          public void mouseMove(MouseEvent me) {
             count++;
             System.out.println(count);
    }kind regards,
    Jos

  • How do I get the java code from a class file ?

    I want to know how to findout the java code from a .class file . Is there any utility or any way to get the java code from a .class file. If so , please let me know the step by step procedure .
    Thanks
    Shiva

    Check out Mocha (http://www.brouhaha.com/~eric/computers/mocha.html)
    It's free!

  • JS how to access objects created by plugins?

    say if a textframe was created by a third party InDesign plugin.
    How should one access and modify this "textframe" property using JS?
    Thanks in advance.

    You can only access a third-party plug-in's "text frame" if they programmed scripting support into the plugin. You would have to contact the third party to know whether they included scripting support in their plugin.

  • How to access tools create or edit express vis in LV8.20 ?

    Hi All,
                 I am a LabVIEW professional working in LabVIEW 8.20. I would like to know how Express vis are working and I am going thro' the Express vi developement manual. I don't find the item "create or edit  express vis" from the Tools. How can I access it?
    Any information to explain how express vi's are working also invited.
    Thanks,
    Pandiarajan R

    hi,
    it is called "Express VI development" and it is located on the toolkit CD we got with our developer suite, so maybe it is part of that?
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Access input textfield from stage to my AS3 file

    I have an input textfield on my stage.
    I have created a AS3 Document as the Main Class for my work.
    Now I need to access the user input in the textfield and work with it in my class.
    What's the quickest way ?

    When you do this:
    private var prefiksi:String = prefix.text;
    "prefix" is not yet accessible because your class is not yet added to the display list. Besides if it's an input text field no point in assigning to a var like that as the input field text will change as the user inputs his/her own text into it. You'd better assign it to a var when you need to process the input text.
    Kenneth Kawamoto
    http://www.materiaprima.co.uk/

  • How to access component's control property from main .mxml file

    I have a main .mxml while in which i imported custom
    "popUpWindow" component using "import component.popUpWindow"
    statement. In main .mxml file I display later on that component as
    popUp window using popUp manager class. Once component is
    displayed, how can i access using actionscript component's
    TextInput control (specifically its .text property) from my main
    .mxml file?
    thanks

    I posted this answer elsewhere, maybe it will help:
    First, save the new component wherever you keep your
    components, let's say you call it "MyPopWindow.mxml"
    Assign public variables for the string in both the main app
    and the popup.
    In your case, in the main app:
    Code:
    public var myText:String = "whatever the text field should
    say.";
    and then in the pop up mxml:
    Code:
    [Bindable]
    public var myText;
    Then, in the main mxml file:
    Code:
    // define the window type
    private var popWin:MyPopWindow;
    private function popMeUp(event:MouseEvent):void{
    popWin =MyPopWindow(PopUpManager.createPopUp(this,
    MyPopWindow, true));
    popWin.myText = myText;
    The important things here to notice is the name of the
    component (i.e. the file) is used. A variable is created for the
    window, and TYPED to your file name. Then you use the constructor
    you already had, but again use your type. The "true" is optional
    and gives you a modal popup window.
    Lastly, assign the variable in the window (I called mine
    popWin) to the variable in the main file you want to pass.

  • How can I access the oracle/sql server jdbc driver class files from my cust

    I have a war file in which I have custom DataSource i.e mypackage.Datasource class. Its basically the need of my application. In this class we connect to datasource and link some of our programming artifacts .
    I have deployed the oracle jdbc driver and deploy my application as ear with datasources.xml in the meta inf file. Inspite of that my code fails to load the jdbc driver classes.
    Here is the extract of the code :
            Class.forName("oracle.jdbc.OracleDriver").newInstance();
             String url = "jdbc:oracle:thin:@dataserver:1521:orcl";
            Connection conn = DriverManager.getConnection(url, "weblims3", "labware");
            if(conn != null){
              out.println("the connection to the database have been achieved");
            out.println("conn object achived= " + conn);
    Class.forname fails in this case. I can see the ojdbc5.jar the driver jar in usr\sap\CE1\J00\j2ee\cluster\bin\ext\ojdbc5  . I even put the ojdbc.jar in web-inf/lib and application lib but does not help at all. Hope I have explained my problem clearly.
    I deployed the jdbc driver in the name of ojdbc5 .
    I am stuck here. It will be great help if anyone can help me in this. Thanks in advance.

    Bent,
    You can access the database from your Java portlet, just like from any other Java/JSP environment. Yes, you can use JDBC, as well as BC4J.
    The Discussion Forum portlet was built using BC4J, take a look at it's source to see how it was done.
    Also, check out Re: BC4J Java portlet anyone?, it contains a lot of useful information too.
    Peter

  • How do I refer to the stage from a class?

    I have a class that places objects on stage with addChild(obj) it allowes me to position objects using pixels( say obj.x = 10; obj.y= 50; ) just fine but if
    I try this:  obj.x = stage.stageWidth / 2;  I get a message that I Cannot access a property or method of a null object reference

    The stage property is only available to objects that are currently on the display list. Your best bet is probably to pass a stage reference to the class when you instantiate it.

  • How to access servlet objects from OA page controller class

    Hi everybody!
    I need to put some value into servlet attribute in OA page controller class to read it from ordinary servlet later.
    How can i do it? Is it possible to get HttpServletRequest and HttpServletResponse objects from page controller?
    Thank you.

    I have a servlet which receives uploaded files with special attributes (something like tags for file) using POST request.
    This attributes created when user open page in standard OAF page via page controller.
    On client side I have an applet which uploads user selected file to my servlet and passes this file attributes.
    Now this attributes passes as plain text. I want to encrypt this attributes to hide attribute details from user. To do this I need to share some information between OAF page and my servlet.
    I know that OAF supports URL encryption, but to decrypt it I should use standard pageContext object.
    But in ordinary servlet I can't use it.

Maybe you are looking for

  • Sorting on specific  field using XSLT Mapping

    Hi All, I am trying to sort the records on specific field using XSLT mapping.But I'm unable get the proper output for the following code. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="http://xxxxxxxx"> <xsl:o

  • Starting random apps and screen flicker when scrolling

    My Touch 2G suddenly started to launch random apps without me touching the screen. Besides starting random apps the screen flickers when scrolling. Any body have experienced the same? It started about 1 month ago and I have always taken good care of

  • Looking for someone who can Deliver Oracle Application Express training...!

    Hi Good day! By the way, i am looking for someone who can deliver for Oracle Application Express Training. If you know someone you can refer to me, i would really appreciate. You can reach me through this email Address: [email protected] Mobile numbe

  • [HELP] Flash CS6 iPhone 5

    Hi, I am wondering how I can get the screen to fit an iPhone 5 screen because I have everything on it. The pixel are on 640 x 1136. When I open that app in my iPhone 5 it does't expand it to the top and very bottom, it just does it thicker. Someone s

  • Convert subordinate CA to Root CA

    Hi, may be a silly question, but the previous admin was fired and he leave me all problem, I'm working on fixing the problems, one of them is that he was lost the root CA (no backup - Windows 2003 standard) and i have only a subordinate CA (Windows 2