Manipulate movieclip from custom class

Hello.
I have a movieclip (instance name preload), inside of it, I have another movieclip (bar) ... what i'm trying to do is a preloader for external files... i have a custom class and i what to manipulate my movieclip preload from it... you know verify the progress of the load:
Inside my class a have this function
public function loadProgress(e:ProgressEvent):void {
            percent=e.bytesLoaded/e.bytesTotal*100;
            rutaDos.preload.bar.scaleX=percent;
rutaDos is a reference to the stage... it works, I'm sure of it... the problem is:rutaDos.preload.bar.scaleX; I upload the files but it doesn't verify the progress of the load.
thanks for the help

the complete class is:
package com.ludwing{
    import flash.net.*;
    import flash.events.*;
    import flash.display.*;
    import fl.transitions.*;
    import fl.transitions.easing.*;
    import flash.display.Stage;
    import gs.TweenMax;
    import gs.easing.*;
    import gs.events.*;
    public class Transiciones extends MovieClip {
        public var url:URLRequest;
        public var loader:URLLoader;
        public var rutaDos:MovieClip;
        public var imgLoader:Loader;
        public var movie:MovieClip;
        public var container:Sprite;
        public var bg:Boolean;
        public var porcentaje:Number;
        public function Transiciones(mRuta:MovieClip, miRuta:String,isBG:Boolean,contain:MovieClip) {
            rutaDos=mRuta;
            bg=isBG;
            movie=contain;
            container=new Sprite();
            url=new URLRequest(miRuta);
            imgLoader=new Loader();
            imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaderComplete);
            imgLoader.load(url);
        public function onLoaderComplete(e:Event) {
            imgLoader=new Loader();
            imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imgComplete);
            imgLoader.contentLoaderInfo.addEventListener(Event.INIT, imgInit);
            imgLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
            imgLoader.load(url);
        public function loadProgress(e:ProgressEvent):void {
            porcentaje=e.bytesLoaded/e.bytesTotal*100;
            rutaDos.preload.bar.rotation=90;
        public function imgInit(e:Event) {
            movie.alpha=0;
            rutaDos.preload.alpha=1;
        public function imgComplete(event:Event) {
            rutaDos.preload.alpha=0;
            movie.addChild(imgLoader);
            var myTween:TweenMax = TweenMax.to(movie, 1, {alpha:1, ease:Circ.easeOut});
            myTween.addEventListener(Event.COMPLETE, onTransitionFinish);
        public function onTransitionFinish(e:Event):void {
            //MovieClip(root).gotoAndPlay(2);
            //rutaDos.ext.gotoAndStop(2)
            /*var my_parent:MovieClip=parent.parent as MovieClip;
            my_parent.nextSection=2;
            my_parent.gotoAndStop(my_parent.nextSection);*/
            //rutaDos.stage.addEventListener(Event.RESIZE, resizeHandler);
            if (bg==true) {
                rutaDos.gotoAndStop(14);
I try to use an empty movieclip to load a external swf (instance name: ext) this way:
var transicion:Transiciones=new Transiciones(this, "welcome.swf",true,ext);
The external swf loads correctly, but when it is loading (i mean de progress load), the preload doesn't work....

Similar Messages

  • SetRGB from custom class

    I have a custom class that adds clips from the library to
    another clip on the stage. The clips i am adding have a text field
    and a bullet point inside and given the tempory name 'item'. After
    the class adds a clip I can position the bullet point using
    item.bullet._x and _y but when I try to use the following script i
    get no result at all:
    var newCol:Color = new Color(item.bullet);
    newCol.setRGB(0xff0000);
    If i swap item.bullet for a clip on the root level it works
    but not for the bullet.
    The movieclips i am adding are registered as instances of
    another custom class. Could this have something to do with it?
    Any thoughts welcome as the deadline is looming
    Cheers

    a movieclip.
    I can access its positional and scaling properties but nots
    the setRGB method

  • Modification Log from Customer Class

    Hey guys.
    Its possible to get a data modification log, or something like this, from the Customer Class data?
    We use customer classification, with some customized fields, that store data in AUSP, but we can't found out if there is a modification log for those fields.
    Thank you.

    Hi,
    Use function module CHANGEDOCUMENT_READ to get the change log information.  For customer master email id changes
    Pass
    OBJECTCLASS = 'ADRESSE',
    OBJECT ID = CONCATENATE 'BP  ' <address number of customer from KNA1> "KNA1-ADRNR.
    To the function module  CHANGEDOCUMENT_READ.
    Regards
    Vinod

  • Loading a movieClip from a class

    Hello all,
    I'm attempting to write an AS 2.0 class using Flash through
    which I can load and control multiple movie clips in the library
    and from external files. I've attempted multiple different ways,
    don't quite seem to be able to get the images to show up on the
    screen. After some time searching, I've been unable to find a good
    example online. Please excuse my inexperience with AS classes.
    I'd like to write a class that extends MovieClip and is used
    to control multiple 'sub' movieClips, all from methods inside the
    instantiated class.
    From .fla file, I call instantiate my class as follows:
    var theScene:sphere3D = new sphere3D();
    In the constructor of my class file, I'm attempting to attach
    or load a movie. I simply want to get it to show up on the screen,
    when I test the .fla movie. I've tried using attachMovie and
    loadMovie with not luck.
    dynamic class sphere3D extends MovieClip {
    function sphere3D() {
    this.attachMovie("shadow","shadow",1); // shadow being a
    movie clip in the .fla library with linkage
    shadow._x = 100;
    shadow._y = 100;
    this.createEmptyMovieClip ("shadow2", 100);
    shadow2._x = 100;
    shadow2._y = 100;
    shadow2.loadMovie("images/cube.png");
    What am I doing wrong? Suggestions for stuff to test would be
    welcome.
    Thank you,
    dana.

    Ah, thank you, that make sense now. The solution you
    suggested worked great.
    I did also find two other solutions, for anyone else who
    might read this. One is to essentially create an empty movieclip on
    your timeline. From the linkage window for the empty movieclip, I
    made sure I set the Class field to the name of the class I'd
    written, something I didn't do previously. This attaches all the
    class actionscript to the empty movieclip, and even automatically
    runs the constructor when the empty movieclip is placed on the
    timeline. It also automatically provides a 'reference' to the main
    timeline when I refer to this.attachMovie() from inside the class.
    So it worked, but isn't as elegant as doing everything from the
    actionscript (unless you are building a component).
    The last reference I came across is the
    Object.registerClass() method used to attach as class to an object,
    similar to using the Linkage method above. But I haven't
    successfully tried it yet.
    Thanks again for the help kglad,
    dana.
    Dana Sheikholeslami
    Art Institute of California

  • Movieclip to Custom class object?

    Hi
    I created one "MyObject" class which is extended from Movieclip. In my flash stage, i have one movieclip and the name is "myObj". I dont use linkage. How can i convert movieclip to MyObject instance.
    i tried the below one, i got error
    var  str = MyObject(mc).name;
    The error is
    TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::MovieClip@2b6baf99 to MyObject.
    at Obj_fla::MainTimeline/frame1()
    Is it possible to convert?
    Thanks
    Regards
    Balasubramaniyan.S

    You cannot create two classes with the same name as you cannot have two symbol with the same linkage class. With that said, you can create a single class for several symbols and make this class the base class for these symbols (again, with different linkage class names). This is exactly like a statement:
    public class MyClass extends MyAnotherClass
    public class MyClass2 extends MyAnotherClass, etc.
    And, yes, you instantiate these symbols with their linkage class names.
    Is it what you asked?

  • How do I reference a MovieClip from a class

    Hi. Trying to learn AS3 and having a hard time ; (
    I'm working on a game. I have a Ship class that uses addChild
    to add a linked Bullet MovieClip to the stage. The Bullet MC is
    linked to the class below. I've got it working so it moves up the
    screen, but now I need to build a hitTest, however I cant get
    access to a movie clip I've placed on the stage, "enemyDisplay_mc".
    How do I reference this MC? In AS2 I would just do a _root.
    Thanks!
    package {
    import flash.display.*;
    import flash.events.Event;
    public class Weapons extends MovieClip {
    private var _thisWeaponMC:MovieClip;
    private var _enemyHit:DisplayObject;
    private var _speed:Number;
    public function Weapons () {
    this.addEventListener (Event.ADDED,Initialize);
    private function Initialize (event:Event):void {
    //trace ("Weapons");
    _thisWeaponMC =
    MovieClip(this.parent.getChildByName(this.name));
    trace ("_thisWeaponMC: " + _thisWeaponMC);
    _thisParent = event.currentTarget.parent;
    trace ("_thisParent: " + _thisParent);
    _enemyHit = this.parent.getChildByName("enemyDisplay_mc");
    trace ("_enemyHit: " + _enemyHit);
    _speed=20;
    this.addEventListener (Event.ENTER_FRAME,moveShip);
    private function moveShip (event:Event):void {
    this.y-= _speed;
    }

    This code is called from my Ship class.
    The Ship class is the Base class of the ship movie clip.
    VulcanShot is the linkage class name of the bullet movie,
    it's base class is Weapons.
    Thanks!

  • Calling a method from custom Class in WD Application

    Hi,
    I wrote a piece of code in method SEARCH for my WD Application.
    Instead of diectly callling the method I would like to create a class and then call the method.
    How do we proceed?
    Do we use SE24 first or can we start creating class from WD application itself?
    Rgds
    vara

    Hi Vara,
    Either way it is possible if you are creating from web dynpro then you can create  assistance class from component properties there you can write one method and to access that method always you have an instance wd_assist.
    From se24 create a class and declare a method. if you declare level of method is instance then you have to create object first in application and then access your method using created instance.

  • Status updates from custom class and WordAutomation Services TimeJor in irregular intervals

    Hello Devs,
    following problem: I have a custom application page opened as modal dialog, on which I have a progress bar. The progress bar shows the status of two processes: 
    1. On button click about 500-600 list elements are being copied from one list to another. I am monitoring the progress and every two seconds I update (with ajax requests) a progress bar control on the page.
    2. After all elements (these are docx files in a document library) were copied I trigger the Word Automation Services timer job to convert these Word files in PDF files. I am also monitoring the timer job progress and update the control on the page.
    All this works great in my development environment. In the test environment I have two front-end servers and the progress is not being updated regularly. I have also custom logs and see that half of the logs are on the one front-end and half on the
    other. The progress bar updates in big time intervals (or sometimes not) dependant on which server the code runs currently...
    Is there a way to always get the actual status of these two processes, no matter which server serves the requests at the moment?
    Any help will be appreciated.
    Thanks,
    Vasil

    Hi Rahul,
    this is how I query the timer job status:
    private static ConversionJobStatus GetJobStatusObject(Guid jobId)
    ConversionJobStatus jobStatus = null;
    try
    jobStatus = new ConversionJobStatus("Word Automation Services", jobId, null);
    catch (Exception ex)
    Logger.Error("Error getting the ConversionJobStatus object.", ex);
    return jobStatus;
    And then I call jobStatus.Refresh() to get the new values.
    What could be possibly wrong on the way I get the job status object?
    Thanks,
    Vasil

  • Accessing custom classes from JSP

    Hi Guys,
    I am having some problems accessing my custom classes from my JSP.
    1) I've created a very simple class, SimpleCountingBean that just has accessors for an int. The class is in the package "SimpleCountingBean". I compiled this class locally on my laptop and uploaded the *.class file to my ISP.
    2) I've checked my classpath and yes, the file "SimpleCountingBean/SimpleCountingBean.class" is located off of one of the directories listed in the classpath.
    3) When I attempt to use this class in my JSP, via the following import statement:
    import "SimpleCountingBean.*"
    I get the following compile error
    java.lang.NoClassDefFoundError: SimpleCountingBean/SimpleCountingBean
    I'm pretty sure that my classpath is properly setup because when I purposely garble the import statement, I get the "package not found" compile error.
    Do I need to upload some other files in addition to the class file? Any suggestions would of course be appreciated.
    Sonny.

    Trying to get some clearer view.. so don't mind..
    So you uploaded all your .jsp files into your account which is:
    home/sonny
    and it compiles and work. But custom classes doesn't seems to be working, where did you place your classes?
    From my knowledge of tomcat, classes are normally placed in, in this case:
    home/sonny/web-inf/classes
    Maybe it differs from windows enviroment to *nix enviroment.. well, I'm just saying out so if its not the case.. don't mind me.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Creating custom classes from a more complex DTD

    Are there any examples of creating more complex custom document types? The sample in the dev. guide and the xml syntax are a good start but not enough.
    If anyone has an example from their own work, I'd appreciate it. You can send them to [email protected]
    Thanks!

    I'm having trouble gaining access to the content of those objects within a multilevel tree structure once the XML file has been loaded into the database. Those attributes off root via an editing tool or jsp/bean are rendered; however, the branched object structures are not. Instead the following is in its place: <MYClASSOBJECT2 RefType="ID">7265<!--ClassObject: MYClASSOBJECT2--><!--Name:Null--></MYClASSOBJECT2>
    Here is some background. All custom classes have been successfully loaded into iFS, including the branching objects, which have been entered as extensions of Document as well as the associated ClassDomain entries. I've read Mark's PencilObject entry of June 23, but I continue to get undesired results. Currently, I am using SimpleXMLRender and am inclined to believe that I will need to customize the renderer for it to recognize the deep structures within my XML. Can you shed any light on my situation? In a nutshell, how do I gain access to the content within my multilevel XML?

  • Access movieclip from class

    Hi,
    I would like to tell a movieclip on the stage to be visible from a class.  Is that possible?

    if that class has a reference to a displayobject, yes.

  • Controlling MovieClip properties from a Class that it's linked to

    Hi all,
    I have a Moveclip with a Dynamic text field instance name of
    "optionName". The movie clip is linked to my custom Class "Toggle".
    Is there a way for me to access "optionName" from my class?
    Basically I am getting this error:
    Thanks.

    Thanks, much appreciated.

  • Nulling a movieclip made from a class - does it make it trashable?

    Hi
    I instantiate a class that makes some movieclips within it, and from the class that instatiated it, I add some event listeners to the moveiclips...
    (simplified)
    var myClip:MCClass = new MCClass();
    myClip.mc1.addEventListener(MouseEvent.CLICK, doSomething);
    If at some stage I state myClip = null, does that make the event listeners eligible to be garbage collected, or do I need to removeEventListener them prior to myClip = null?
    Cheers!

    You have to both remove MyClip from the stage and also make it null to make the object that has the functions that are being used as event listeners available for garbage collection.
    For example:
    public class Obj1 {
         protected var _obj2:Obj2;
         public function get obj2():Obj2 {
              return _obj2;
         public function set obj2(value:Obj2):void {
              if (value != _obj2) {
                   //should do this so the event listeners don't fire after obj2 nulled in larger context
                   if (_obj2) {
                        _obj2.child.removeEventListener('someEvent', listener);
                   _obj2 = value;
                   if (_obj2) {
                        _obj2.child.addEventListener('someEvent', listener);
         protected function listener(e:Event):void {
              //do something
    public class MainClass {    
         protected var _obj1:Obj1;
         protected var _obj2:Obj2;
         protected function init():void {    
              _obj2 = new Obj2();
              addChild(_obj2);
              _obj1 = new Obj1();
              _obj1.obj2 = _obj2;
         protected function tearDown():void {
              removeChild(_obj2);
              _obj2 = null;
              //if you don't null _obj1.obj2, the listener will keep firing until it is garbage collected
              //but obj1 will eventually get garbage collected
              _obj1=null;

  • MovieClip not adding from my class

    If I have the following on the timeline in my FLV, it works and attaches my movie from the library to the stage. If I do the same from my class, it does not. What could be the issue?
    var myMC:ToolTipMc = new ToolTipMc();
    addChild(myMC);
    Thanks a lot for any help!

    Brian914,
    You have added the ToolTipMc to the display list of you class but is your class added to the display list of the Stage or Document root. Check and see if your class is a display object like MovieClip and that it is added to the stage. bellow is an example.
    package {
         import flash.display.*;
         public class MyToolTip extends MovieClip{
              public function MyToolTip():void{
                   //code for your tool tip
    package {
         import flash.display.*;
         import MyToolTip;
         public class MyToolTipHolder extends MovieClip{
              public var tTip:MyToolTip;
              public function MyToolTipHolder():void{
                tTip = new MyToolTip();
                   addChild(tTip);
    Now if you are trying to put the tooltip on the screen you wil need to first add the MyToolTipHolder to the displaylist then it will add MyToolTip to its display list and it will show up. If you want to add the ToolTipHolder to any other display Object like flv, then add the myFLV.addChild(toolTipHolder);
    Hope This Helps
    Edithson Abelard
    Passion 47

  • Capture Customer Class in time of BP creation from Screen

    Hi All,
    I am facing a problem that I need to capture  Customer Class , Sales Area Template and ID type in time of BP creation in DCHCK event. I have to check if user is putting these value correctly or not. If user entered wrong value then I have to through error message and not to save to BP.
    Foe example I am using 'BUP_BUPA_BUT000_GET' to get all other data along with BP type and so on.
    Plesae help regarding this if any one is aware of it.
    Thanks & Regards
    Ajoy

    Hi,
    asaha... I want to know how it would be done ?
    by ABAP customization or in the CRM IMG itself ?
    can you brief about it ..
    Thanks
    " RA "

Maybe you are looking for

  • Problems creating an spatial index with srid=4326

    Hi! I would like to know if somebody can help me with the following problem: We are using the 10.2.0.1 version and we need that our SRID value is 4326. We do not have problems with 8307 or another value. However, when we tried to use srid = 4326, app

  • How to 'clean' the hard drive before selling

    I just bought a MBP and plan to sell my black MacBook. Is there any way I can be sure all my personal info and settings are set as default. I will transfer my files to the new computer, but what about the settings like network passwords, internet fil

  • Ask for helps and comments for a practicing ADF sample: Entering bank transaction records

    Dear experts: I'm redeveloping a practicing ADF sample application based on an exist application system of  my company. Here is the goal for this redeveloping: What degree of productivity can adf achieve compare to eclipse? And hereby is a small exam

  • Hourglass thumbnails in media grid

    I upgraded from pse 9 to 12.  In my media grid the thumbnails are rendered as Hourglass.  Is ther a setting or upgrade that can resolve this display issue?  I do not have this issue in pse 9

  • Finder Warning When Booting

    I get the following message after restart or power on: "The last time you opened Finder, it unexpectedly quit while reopening windows. Do you want to try to reopen its windows again?" I have never seen this dialogue box in Mavericks.  I am running a