Using levels in AS3

Hey, I'm trying to do a very simple thing in AS3 and it's not working
I have 2 movieclips, A and B. A have some animation and B have a single frame with a code. I want to use this code to play the animation in movieclip A.
When using AS2, i just write in the first frame of B, _root.A,play() or _level0.A.play()
What should I do in AS3 to achieve this. I attached the file, can anyone do the code for me and I can understand it by myself. Thanks

In this case do you really need to cast root as a MovieClip? I'm sure you would if you tried this: MovieClip(root).play(); But in this case you are trying to access the play method of A not root.
The reason for the casting thing (which I regard as a ghastly and completely bollocksed-up) is that in may cases parent or root could reference any number of items that are all decendants of DisplayObject so the property returns the item as a DisplayObject, which doesn't have the timeline control methods of the MovieClip class. DisplayObject is the ancestor from which all the things we can see spring.
As a design decision it might have been worse that parent or root returned a Sprite some times other times a Stage others a MovieClip and so on. Not saying that there isn't a better solution, but this is the solution we have...

Similar Messages

  • Learning to use Levels

    I shoot a lot of underwater video and often the raw footage looks "murky" and has a greenish tinge that is corrected via Auto Levels.  Is there some easy way to use the Levels effect, rather than auto levels so that you can easily match what Auto Levels is doing with the Levels effect?  I've tried and it's really not that simple for me.  I think I would have to correct the RGB channels first, just by sight on the tiny preview window in the Levels Setting.  Then go to the green channels and monkey around some more via trial and error until I get something that looks OK.
    can anyone give me some hints on how one would use levels to remove the cloudiness and green cast that many UW video clips have?  Auto levels often just does this with many clips, which is why I tend to use it a lot.
    P.S.
    Can someone from adobe make the AUTO correctors in the adjust section of video effects GPU accelerated!

    Here's a level's reference chart that should help you understand whats going on better. http://www.motionworks.com.au/2007/01/levels_guide/
    Look at your RGB Parade in a reference monitor and watch what happens when you adjust 'em. Also mainly just adjust the input. The Output can really mush things up if used wrong.
    Basically the adjustment on the left (when pulled right) pushes the picture into the shadows. Higher in the graph.
    The one on the far right (when pulled left) pushes the picture into the highlights. Lower on the graph.
    The middle, your gamma, shifts the middle or mids of the picture.
    Also notices it doesn't shift the colors is pushes them. Hope this 'll start you in the right direction. Once you learn it and can go beyond just AUTO coloring and make your video looks way better.

  • Generating Parent Number using Level and Display Number

    I am facing problem in generating parent number using level and dispaly number.
    Here is the table structure
    CREATE TABLE test(
    DISPLAY_NUMBER       NUMBER,
    LEVEL_NUM           NUMBER,
    COMPONENT   VARCHAR2(10))
    INSERT INTO test VALUES (1,1,'A');
    INSERT INTO test VALUES (2,2,'B');
    INSERT INTO test VALUES (3,3,'C');
    INSERT INTO test VALUES (4,4,'D');
    INSERT INTO test VALUES (5,3,'E');
    INSERT INTO test VALUES (6,3,'F');
    INSERT INTO test VALUES (7,2,'G');
    INSERT INTO test VALUES (8,3,'H');Here is the output table structure and required output data format
    CREATE TABLE test1(
    DISPLAY_NUMBER       NUMBER,
    LEVEL_NUM           NUMBER,
    COMPONENT   VARCHAR2(10),
    PARENT VARCHAR2(10))
    INSERT INTO test1 VALUES (1,1,'A',NULL);
    INSERT INTO test1 VALUES (2,2,'B','A');
    INSERT INTO test1 VALUES (3,3,'C','B');
    INSERT INTO test1 VALUES (4,4,'D','C');
    INSERT INTO test1 VALUES (5,3,'E','B');
    INSERT INTO test1 VALUES (6,3,'F','B');
    INSERT INTO test1 VALUES (7,2,'G','A');
    INSERT INTO test1 VALUES (8,3,'H','B');Oracle database version : Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    Thanks in advance.
    Regards,
    Laxman

    >
    I am facing problem in generating parent number using level and dispaly number.
    >
    Thanks for posting the table DDL and data. I called the tables testa and testb.
    insert into testb
    select a.*, (select component from testa b where b.level_num + 1
      = a.level_num and rownum = 1) parent
    from testa a
    select * from testb
    DISPLAY_NUMBER,LEVEL_NUM,COMPONENT,PARENT
    1,1,A,
    2,2,B,A
    3,3,C,B
    4,4,D,C
    5,3,E,B
    6,3,F,B
    7,2,G,A
    8,3,H,B

  • Using Levels in Aperture

    In photoshop you can use level adjustments to select a point in an image to be absolute black and another to be absolute white. Is this possible in Aperture?
    Thanks

    Actually in the Exposure adjustments there are
    droppers for black white and gray. Just use those
    droppers to set your blacks and whites
    Those do not set Black & White points in terms of levels - what they do is make whatever you click on neutral (grey) for either the lower third of the tonal range, or the upper third of the tonal range depending on which you use. The center one affects the whole tonal range. That's why they are labled "Tint".
    You can however also use those droppers to get the same lines in the histogram as I had described with the White Balance control to get information on where pixels sit in the tonal range for information on where to set Levels.
    At this juncture to improve clarity of discussion I think I should note that I have written an Adjustment Tool Guide that describes exactly how all the Aperture adjustment tools work and when they can be of use:
    http://insideaperture.com/Site/AdjustmentToolGuide.html

  • How to Load an external swf using loadmovie in AS3

    I need to create a button with script, on rollover load an external swf into movieclip in AS3.  This was able to create this in AS2, but I need to create this in AS3

    Thanks again Ned.
    Kenneth Russell
    graphic artist, Sr.
    Lockheed Martin - MS2
    2323 Eastern Blvd., Baltimore, MD 21220
    Phone 410.682.0554    Fax 410.682.0543
    From: Ned Murphy <[email protected]>
    Reply-To: [email protected]
    Date: Thu, 23 Jul 2009 19:08:25 -0600
    To: kenneth russell <[email protected]>
    Subject: How to Load an external swf using loadmovie in AS3
    In AS3 you use the Loader class to load external swf's and image files.  You
    should be able to find examples both in the Flash help files and these forums
    if you search.  If you aren't aware of how to code buttons in AS3, that can be
    found as well.  In AS3, just about any kind of interction involves the use of
    event listeners in combination event handler functions... in the case of a
    button rollover an example would be...
    btnName.addEventListener(MouseEvent.ROLL_OVER, overHandler);
    function overHandler(evt:MouseEvent):void {
         // your loading code or whatever
    >

  • Just updated from elements 11 to 13. When I try to use Levels in Elements 13. I click on the slider with my bamboo pen and nothing happens for a few seconds, sometimes not at all. This worked fine in Elements 11.

    Just updated from elements 11 to 13. When I try to use Levels in Elements 13. I click on the slider with my bamboo pen and nothing happens for a few seconds, sometimes not at all. This worked fine in Elements 11.

    Never mind my question on the photoshop elements 13 trying to install the camera raw update. It has been taken care of thank goodness!

  • Loading external swf in array using wildcard in as3?

    Hi
    I can use the following code to load in a specific swf:
    var clips:Array = ["001/001.swf"];
    but how do I tell Flash to load whatever file is in the 001 folder without stipulating a specific filename?
    Thanks
    Shaun

    Not possible in Flash Player. Though this is possible in AS3 the API is only supported for AIR runtime and not for FP.
    The alternate way is to achieve this using PHP script which you can use in combination with AS3.

  • Using Tween in AS3

    I have just completed migrating a lot of AS2 code to an AS3
    ActionScript Project, and have one issue left to solve. When I try
    to import anything in the mx.effects package, such as
    mx.effects.Tween, I get an error from Flex Builder "1172:
    Definition mx.effects:TweenEffect could not be found." I notice
    that if I type import mx. the dropdown that provides a list of
    values that can be selected, doesn't include effects. While
    searching the web I have seen examples that import ms.effects.* so
    can anybody tell me how I can get to use the Tween class?

    I also have had issues. What's the good word on best way to
    do transitions in AS3?
    Thanks.

  • HOW TO FILTER DIM VALUES USING LEVEL PARAMETER SCREEN BEFORE PRESENTATION

    hello,
    sorry but i did not understand your question - i don't know which objects is
    the "Descriptor". Let me try to update you with some facts and a better example
    of the situation - i will be also uploading some screen shots.
    from the jdeveloper help we found the topic "Specifying the action for a step
    object" which is very similar to what we want to perform. here follows the text
    and also some comments from us:
    Example: Using step actions Assume that a selection consists of the following
    two steps:
    Step A specifies the members: Boston, Chicago, and Denver
    (comment: in our problem, step A is a selection of customers performed using
    one of the 2 hierarchies of Customer dimension)
    Step B specifies the members: Boston and Austin
    (comment: in our problem, step B is another selection of customers performed
    using the other hierarchy of Customer dimension)
    Step B follows Step A.
    The following list shows how the results of this selection differ depending
    on the action that is
    specified for Step B:
    Step B action: SELECT -- Result: Boston and Austin (that is, only B is
    included)
    Step B action: ADD -- Result: Boston, Chicago, Denver, and Austin (that is,
    the union of A and B is included)
    Step B action: KEEP -- Result: Boston (that is, only members that are common
    to both A and B are kept; also referred to as the intersection of A and B)
    (comment: This is what we expect to have - the intersection of both customer
    dimension selections goes to the row edge of the presentation)
    Step B action: REMOVE -- Result: Chicago and Denver (that is, any members in
    B are removed from the current selection )
    how do i obtain this intersection ? is it possible to use this selection
    combining both hierarchies ?
    Please refer to the screen i will upload - it is the filter we need to apply.
    the customer dimension has 2 levels above the leaf records in one hierarchy,
    called "SETOR" and "ROTA" , and 3 levels in the other hierarchy, called
    "SEGMENTO" , "CANAL" and "SUBCANAL"
    thanks in advance

    Hi Prasad,
    I got your note, you should not use Session variable syntax to call presentation variable.
    you should use like @{AIC_PROJ_PLAT_SEQ_NO}
    One more thing: first test the variable AIC_PROJ_PLAT_SEQ_NO value then try to pass to SP.
    Hope this helps

  • How to use levels in RDF Data Model?

    I am working on RDF model, i am able to retrieve the queries base on subject or object....
    i want to retrieve the data based on level. i could not get the query for that.
    would you please advice me regarding solving this issue.
    Thanks in Advance
    Kamraj

    Thanks for your response.
    We are using Oracle Spatial RDF (Resource Description Framework).
    We are able to retrieve the query based on Subject, Predicate and Object.
    SELECT X,Y,Z
    FROM TABLE(SDO_RDF_MATCH(
    '(?X ?Y ?Z)',
    SDO_RDF_MODELS('TESTDATASET'),
    NULL,
    SDO_RDF_ALIASES(SDO_RDF_ALIAS('',':')),
    NULL))
    WHERE( Y=':INDIRECT'OR O R Y=':DIRECT')
    ORDER BY Y
    We want to retrieve the triple (Subject, Predicate and Object) up to some level.
    SELECT X,Y,Z
    FROM TABLE(SDO_RDF_MATCH(
    '(?X ?Y ?Z)',
    SDO_RDF_MODELS('TESTDATASET'),
    NULL,
    SDO_RDF_ALIASES(SDO_RDF_ALIAS('',':')),
    NULL))
    WHERE( Y=':INDIRECT'OR O R Y=':DIRECT')
    < level =5> -- want proper query to get the level
    ORDER BY Y
    Would you please help us to get the level based triples?.

  • Using swf and AS3 on supercomputer

    I (might) have an opportunity to run my ActionScript 3 project on a Cray supercomputer in couple of weeks.
    How can I be sure that I benefit of the multiple processors an big memory space?
    And I need to understand how will I benefit?
    Is window="gpu" embed tag all it takes, or should I use Alchemy and different ASC?
    That gpu -tag is said to give benefits only in some occasions, would this be the occasion?
    Maybe there is readymade versions of Flash-Player that will use multiprocessor?
    Filesize is below 100kt, but...
    My demo is huge fractal with graphics in several (hundreds) nodes, and it can be made even bigger...
    I will also use real time generated sounds in background.
    Mac mini is already having trouble with it, it would be interesting to see how supercomputer will manage.
    Any information?

    AS2 and AS3 swfs cannot exist in the same Flash Player
    virtual machine - each Flash Player instance (version 9 and
    greater) create different address spaces/virtual machines because
    the requirements of AS3 and AS2 are so different.

  • Using AlivePDF with AS3

    Hi, I'm somewhat new to AS3 and programming. I'm trying to use the AlivePDF library to export text from a text editor created in AS3 into a PDF. Can anyone link me to documentation or a tutorial that can help teach me how to integrate it into a normal AS3 file? I have no idea how to use the library and the only documentation I've seen for it is how to use it in Flex/Air, which is not what I'm looking for.
    Thanks!

    Last year, I did a project that used AlivePDF. I found that there wasn't as much tutorial content on the Web as I would have liked. For folks that are new(er) to AS3 - it is lacking enough in Flash  tutorials to make it "kinda out of reach" without struggling. Even for  myself, I wished there were more simple, but extensive, examples to cull  from.
    Like you, I kept getting search hits showing me a small handful of Flex apps that used it, but I was able to sift through a few things, including the website that provides the API for us. So this is most likely not going to get you what you want - it was a little bit of a slow start for me, and I just had to "grow" from the small examples I found on the main website, and look at the API documentation...and then put in the time to try my own simple tests.So, I can really only suggest that you start small, understand the basics of AlivePDF, and work from what you have success with.
    You've probably been here, but most of what I learned came from the various pages of th main AlivePDF website:
    http://alivepdf.bytearray.org/
    The link to the API documentation:
    http://alivepdf.bytearray.org/alivepdf-asdoc/
    there's a Google Wiki, with other API notes:
    http://code.google.com/p/alivepdf/wiki/APINotes

  • How to add fast forward - rewind functionality using flvplayback in as3

    hello,
    i am using flvplayback (dynamically add from as3), now to add fastforward - rewind functionality in it.
    Thanks,
    Vishal Parekh

    The docs say the inBufferSeek is intended for "Flash Media Server 3.5.3 and Flash Player 10.1" or higher and does not work in AIR3.0 for iOS. Do you meet those requirements? They call that protocol RTFMP.
    The doc also explains that when inBufferSeek=true, and you seek() or step(), an event is dispatched if it was successful. You should see if these events fire.
    From the docs:
    When inBufferSeek=true and a call to NetStream.seek() is successful, the NetStatusEvent info.description property contains the string "client-inBufferSeek".
    When a call to NetStream.step() is successful, the NetStatusEvent info.code property contains the string "NetStream.Step.Notify".
    If you don't see those events, you know you have an issue.

  • Can I make basic adjustments to RAW files in PS the same way I do with jpgs using levels+clone tool?

    I have basic knowledge of photoshop and normally just work with Jpegs. I need to edit some RAW files can I open them in Photoshop and work on them the same way as jpegs. I would only need to do some basic levels adjustments and use the clone tool. Is photoshop the best application to use for editing raw files?

    Starting with RAW affords you more toning flexibility with white-balance and white/black points, and more sharpening and noise-reduction flexibility, than starting with JPGs where the camera has taken care of such things and the adjustments are baked in and cannot be changed.
    The camera-raw plug-in for Photoshop is very good for working with individual raw files.  If you are switching your photography from JPG to RAW then Lightroom has the same adjustments as the PS CR plug-in but is more efficient when working with many files compared to Bridge and Photoshop.
    Personally, because I shoot only RAW photos, now, I switched from using PS/CR to LR quite a few years ago, and rarely go to PS anymore.  Since you are used to PS, your old habits will probably still be with you, so you may find yourself doing a minimal amount of editing in CR.
    Because you’re are dealing with RAW sensor data, you will want to pay attention to the WB and black/white points as well as sharpening and noise-reduction before opening the RAW files in PS for your normal PS adjustments.

  • Using LEVEL Pseudo column to format repeating frame

    I am trying to display a hierarchy in Reports. I use the 'Connect By' Clause in SQL and gather the hierarchical data, and want to display the results in a tree fashion. How can I do it?
    I only come up with one answer, to use the LEVEL PSEUDO-Column and indent the repeating frame based on the value for LEVEL. I want to know how I can set the X and Y co-ordinates of the repeating frame dynamically?
    Please help me with this if you have other ideas?
    Thanks.
    -Shan

    Unfortunately, you can't programmatically set the geometry (x,y, width, height) values of any objects in the reports output.
    The best you can do is have another object (or number of objects) that are turned on/off and then use collapsing anchors and format triggers to move the repeating frame to the left. If you only have one object, you can set it's horizontal expansion to variable and then fill it with a number of characters to get the desired "indent".

Maybe you are looking for