Timer, movieclip confusion in actionscript?

I have a movieclip containing a drop down menu and when I try to remove a glitch by disabling the movieclip while the animation is running I get this error.
ReferenceError: Error #1056: Cannot create property enabled on flash.utils.Timer.
at july09_fla::MainTimeline/enable()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
I think I am confusing my movieclip "buttons" with a timer in my code. I want the code to work for different movieclip buttons but I have only added one movieclip button in the code so far, procedures_mc. Here is my actionscript 3 also I am zipping the file and attaching it. Thank you for your help.
procedures_mc.buttonMode = true;
procedures_mc.addEventListener(MouseEvent.ROLL_OVER, cursorOver);
function cursorOver(e:MouseEvent):void
e.currentTarget.gotoAndPlay("over");
procedures_mc.addEventListener(MouseEvent.ROLL_OUT, cursorOut);
function cursorOut(e:MouseEvent):void
e.currentTarget.gotoAndPlay("out");
e.currentTarget.enabled = false;
e.currentTarget.removeEventListener(MouseEvent.ROLL_OVER, cursorOver);
e.currentTarget.removeEventListener(MouseEvent.ROLL_OUT, cursorOut);
var myTimer:Timer = new Timer(600,1);
myTimer.addEventListener(TimerEvent.TIMER, enable);
myTimer.start();
function enable(e:TimerEvent):void
e.currentTarget.enabled = true;
e.currentTarget.addEventListener(MouseEvent.ROLL_OVER, cursorOver);

if the forum again changes those variables to look different, just copy the first uint and paste it in the other spots:
var var1:uint;
procedures_mc.buttonMode = true;
procedures_mc.addEventListener(MouseEvent.ROLL_OVER, cursorOver);
function cursorOver(e:MouseEvent):void {
    e.currentTarget.gotoAndPlay("over");
    procedures_mc.addEventListener(MouseEvent.ROLL_OUT, cursorOut);
function cursorOut(e:MouseEvent):void {
    e.currentTarget.gotoAndPlay("out");
    e.currentTarget.enabled = false;
    e.currentTarget.removeEventListener(MouseEvent.ROLL_OVER, cursorOver);
    e.currentTarget.removeEventListener(MouseEvent.ROLL_OUT, cursorOut);
    if (var1!=0) {
        clearTimeout(var1);
    var1 = setTimeout(enable,500,e.currentTarget);
function enable(io:InteractiveObject):void {
    io.mouseEnabled = true;
    io.addEventListener(MouseEvent.ROLL_OVER, cursorOver);

Similar Messages

  • Found a typo on the song "Time and Confusion" by Anberlin

    I don't know if this is the right place to post this, but hopefully a moderator/admin will see it and report it to someone at Apple. Or, if someone could give me an email to contact someone at Apple about this, that would be helpful.
    I realize it's minor, but the song "Time and Confusion" by Anberlin, on their album Never Take A Friendship Personal, is spelled "Time and Confussion".
    If this could be remedied, that would be nice. Thank you!

    Fill out and submit this form.
    (33931)

  • Quick Time Player Confusion!

    I am confused.
    In SL, every time I right click a movie file, whatever the format, and select "open with" I get a drop down menu headed:
    Quick Time Player Launcher (default).
    What is this?
    Below this are listed the other players I have installed (VLC, DivX, RealPlayer, iTunes) INCLUDING Quick Time Player 10.
    Is Quick Time Player 10 different from Quick time Player Launcher? It has a different icon in the drop-down list, Quick Time Player 10 Launcher has the default icon. Quick Time Player 10 has an icon I chose for it to assist in my distinguishing between the two (or is it one?) application/s.
    In my applications folder there is Quick Time Player 10, but no Quick Time Player Launcher.
    And when I select Quick Time Player Launcher from said drop-down list..... Quick Time Player 10 launches!
    But, and here's the really confusing part, ALL the movie players I have installed are listed in that drop-down list EXCEPT Quick Time Player 7.
    Now, call me old-fashioned, but I prefer Quick Time Player 7.
    However, if I want to open a movie using Quick Time Player 7 I have to go to the bottom of the drop-down list, select Other, and navigate through my Applications to reach it.
    How do I add Quick Time Player 7 to my drop-down list?
    Better still, how do I make Quick Time Player 7 my default movie player?
    Cheers,
    Martin

    QT player launcher is an application helper sitting inside QT player 7 which launches QT player 10. you should not see it in the open with menu. it's a known bug that you do see it. but it should not affect the functionality. if it does then reset your launch services database. delete the file homedirectory/library/preferences/com.apple.launchservices.plist and run the following terminal command
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
    note that this will reset all default programs set to open various file types to the defaults so you might have to change some afterward.

  • Loading an external image (from file system) to fla library as MovieClip symbol using ActionScript.

    Hi everyone,
    I am new to actionscript and Flash.
    I have been working on code updation project wherein initially we had an image and text as movieclips in fla library. The image and the text are read by the actionscript program which then creates an animation.
    For Example:
    // Picture
    // _imageMC: Name of the Movie Clip in the libary which
    // contains the picture.
    var _imageMC:String = "polaroid";
    This is later on used by another actionscript class as follows to finally create the animation.
    var _mcPolaroid:MovieClip = this._mcBg.attachMovie(this._polaroid, "polaroid_mc", this._mcBg.getNextHighestDepth());
    Now the problem here is when one needs to update the image or text, one needs to go and open the fla file andmanually change the image attached to the movieClip (polaroid).
    I want to ease the updation process by giving the url of the image in an XML file. Read the image url from the xml and load this image in the library of the fla as movieclip. This, i think, will result in less code change and improve the updation of the final animation image.
    The problem i am facing is not been able to figure out how can i change the image (after fetching its URL) to a movieclip and then load it in the library?
    Thank you kindly in advance,
    Varun

    The following was my attempt: (i created a new MovieClip)
    this.createEmptyMovieClip("polaroidTest", this.getNextHighestDepth());
    loadMovie("imagefile.jpg", polaroidTest)
    var _imageMC:String = "polaroidTest";
    This mentioned variable _imageMC is read by a MovieClip class(self created as follows)
    /////////////////////////////// CODE STARTS //////////////////////////////////////
    class as.MovieClip.MovieClipPolaroid {
    private var _mcTarget:MovieClip;
    private var _polaroid:String;
    private var _mcBg:MovieClip;
    private var _rmcBg:MovieClip;
    private var _w:Number;
    private var _h:Number;
    private var _xPosition:Number;
    private var _yPosition:Number;
    private var _border:Number;
    * Constructor
        function MovieClipPolaroid(mcTarget:MovieClip, polaroid:String) {
    this._mcTarget = mcTarget;
    this._polaroid = polaroid;
    init();
    * initialise the polaroid movieclip and reflecting it
        private function init():Void {
    this._border = 10;
    this.initSize();
    this.setPosition(48,35);
    this.createBackground();
    var _mcPolaroid:MovieClip = this._mcBg.attachMovie(this._polaroid, "polaroid_mc", this._mcBg.getNextHighestDepth());
    _mcPolaroid._x = _border;
    _mcPolaroid._y = _border;
    var _rmcPolaroid:MovieClip=this._rmcBg.attachMovie(this._polaroid,"rpolaroid_mc", this._rmcBg.getNextHighestDepth());
    _rmcPolaroid._yscale *=-1;
    _rmcPolaroid._y = _rmcPolaroid._y + _h + _border ;
    _rmcPolaroid._x =_border;
    * create the background for the polaroid
    private function createBackground():Void {
    this._mcBg = _mcTarget.createEmptyMovieClip("target_mc",_mcTarget.getNextHighestDepth());
    this._rmcBg = _mcTarget.createEmptyMovieClip("rTarget_mc", _mcTarget.getNextHighestDepth());
    fill(_mcBg,_w+2*_border,_h+2*_border,100);
    fill(_rmcBg,_w+2*_border,_h+2*_border,10);
    placeBg(_mcBg,_w+2*_border,_yPosition);
    placeBg(_rmcBg,_w+2*_border,_h+2*_border+_yPosition);
    * position the background
    private function placeBg(mc:MovieClip,w:Number,h:Number) : Void {  
        mc._x = Stage.width - w - _xPosition;
    mc._y = h;
    * paint the backgound
    private function fill(mc:MovieClip,w:Number,h:Number, a:Number): Void {
    mc.beginFill(0xFFFFFF);
    mc.moveTo(0, 0);
    mc.lineTo(w, 0);
    mc.lineTo(w, h);
    mc.lineTo(0, h);
    mc.lineTo(0, 0);
    mc.endFill();
    mc._alpha=a;
    * init the size of the polaroid
    private function initSize():Void {
    var mc:MovieClip =_mcTarget.createEmptyMovieClip("mc",_mcTarget.getNextHighestDepth());
    mc.attachMovie(this._polaroid,"polaroid_mc", _mcTarget.getNextHighestDepth());
    this._h = mc._height;
    this._w = mc._width;
    removeMovieClip(mc);
    mc = null;
    * sets the position of the polaroid
    public function setPosition(xPos:Number,yPos:Number):Void {
    this._xPosition = xPos;
    this._yPosition = yPos;
    * moving in
    public function moveIn():Tween {
    var mc:MovieClip = this._mcTarget;
    mc._visible=true;
    var tween:Tween = new Tween(mc, "_x", Strong.easeOut, 0, 0, 1, true);
    var tween:Tween = new Tween(mc, "_y", Strong.easeOut, 200, 0, 1, true);
    var tween:Tween = new Tween(mc, "_xscale", Strong.easeOut, 30, 100, 1, true);
    var tween:Tween = new Tween(mc, "_yscale", Strong.easeOut, 30, 100, 1, true);
    var tween:Tween = new Tween(mc, "_alpha", Strong.easeOut, 0, 100, 1, true);
    return tween;
    * moving in
    public function moveOut():Tween {
    var mc:MovieClip = this._mcTarget;
    var tween:Tween = new Tween(mc, "_alpha", Strong.easeIn, 99, 0, 1, true);
    var tween:Tween = new Tween(mc, "_x", Strong.easeIn,0, 1000, 1, true);
    var tween:Tween = new Tween(mc, "_y", Strong.easeIn, 0, -50, 1, true);
    var tween:Tween = new Tween(mc, "_xscale", Strong.easeIn, 100, 50, 1, true);
    var tween:Tween = new Tween(mc, "_yscale", Strong.easeIn, 100, 50, 1, true);
    return tween;
    /////////////////////////////// CODE ENDS ///////////////////////////////////////
    As in the current case, the name of the movieclip which has the image (originally polaroid) is being read through the variable _imageMC which we hadd given the value "polaroidTest".
    The animation shows no image even when i have inserted the correct url (i m sure this step isn't wrong).
    Any clues?

  • Time Capsule - Confused Marketing ?

    A few months ago I purchased a TC, My intention was to use it to store files that could be accessed on my network and also use it with Time Machine.
    I later found out that TM will keep backing up till the drive is full. To be honest I didn't do my homework but then I don't feel that the marketing of TC made it very clear. But looking back it was sold a a backup device.
    But this has changed now , with the addition of Mobile Me access to drive it is now being marketed as a file storage solution. Again no mention that it is impossible/difficult to use it in this dual role.
    Is this confused marketing ?

    Thanks for the response but i think you missed my point.
    What I saying is that they in the marketing are saying that it will do X and Y when they should be saying X or Y
    Even in store they are giving misleading information, try it for your self, phone up Apple sales and say that you are interested in buying a TC to backup and storing files. see if they tell you its not possible or explain the limitations.

  • Draw inside movieclip/graphic with Actionscript

    Hi.
    How I can draw inside movieclip/graphic element with Actionscript?
    If i have example movieclip-element in my project and want to draw a single dot in its coordinate (10,10), how I can do that?
    ty m8s!

    The easiest way to draw inside a movieClip is the graphics class.
    You could do something like:
    this.graphics.lineStyle(1, 0x000000);
    this.graphics.moveTo(10, 10);
    this.graphics.lineTo(11, 11);
    This isn't perfect when drawing pixels, however - it only has methods for lines and shapes(circles, rectangles etc).
    If its important for you to draw a single pixel and accuracy is more important you may want to consider converting your Movieclip to a BitmapData class, which has methods for setting Pixels. Realistically though, if you didn't know about the graphics class, then that'll probably be what you're after.

  • Time Machine confused after iMac hard drive upgrade

    Here's the deal. I had my 24" iMac internal 250-gig hard drive upgraded to a 1-Terabyte drive. Tech guy cloned them with SuperDuper. New drive booted right up and works great. My question is regarding Time Machine, which I have set up to backup to an external drive. I assumed because old drive was cloned to new drive, Time Machine would think it was the same drive and just keep backing it up as it always has. But what happens is Time Machine just keep saying "processing" and nothing ever happens.
    Is there a way to tell TM to start backing up the new drive as it always did or do I need to delete my current (1 1/2 yr. old) TM files and let it start from scratch again? I really don't want to do that. Any ideas?

    As V.K. says, that procedure may or may not work.
    The reason for the long preparing stage is that TM, seeing a different drive, is examining every file and folder on your system, and may do a full backup of your entire system.
    Download the +Time Machine Buddy+ widget. It shows the messages from your logs for one TM backup run at a time, in a small window. You'll probably see a message about a UUID error referencing your internal drive --that means TM doesn't recognize it as the same one it last backed-up.
    Then you'll probably see one about a "deep traversal." That means TM is looking at every file and folder on your system to see what needs to be backed-up. This takes quite a while, of course, and you won't see anything being backed-up (xx MB of yy GB) until it's done.
    If TM does perform a full backup, it may have to delete a lot of your old backups to make room for the new one. If it can't delete enough, it will fail.

  • HELP! Displaying Text Randomly Every Time I Click using ActionScript 3.

    Hello! I'm doing a school project using Adobe Flash ActionScript 3. Here is an image of what I am working on:
    I have a text box layer on top of the talk bubble. At first it is blank, then I click on Hello Kitty and a random phrase pops up in the text box from the array I created. However, when I click her again she will not say another random phrase. I don't know what I'm doing wrong. Here is the code. Please, take a look at it and let me know what I can do to fix it! Thanks!
    var myPhrases:Array = new Array(); // HELLO KITTY PHRASES FOR TALK BUBBLE
    myPhrases[0]="My name is Hello Kitty!";
    myPhrases[1]="How are you today?";
    myPhrases[2]="Smile! It's a beautiful day!";
    myPhrases[3]="I want to be your friend!";
    myPhrases[4]="You have a great smile!";
    myPhrases[5]="I like flowers & rainbows.";
    myPhrases[6]="What is your name?";
    myPhrases[7]="Let's find Dora and go on an adventure!";
    myPhrases[8]="Mmmmeeeeoooowww!";
    var i:int=Math.floor(myPhrases.length*Math.random()); // RANDOM PHRASE
    var value=myPhrases[i];
    HKITTY_mc.addEventListener(MouseEvent.CLICK, onClick); // CHANGE PHRASE WHEN YOU CLICK ON HELLO KITTY (THIS IS NOT WORKING!!!!)
    function onClick(event:MouseEvent):void {
    stop();
    ILOVEMYTEXTBOX.text=value;

    If you just move those two lines of code into the function it will take care of things...
    function onClick(event:MouseEvent):void {
         var i:int=Math.floor(myPhrases.length*Math.random()); // RANDOM NUMBER
         var value=myPhrases[i];
         ILOVEMYTEXTBOX.text=value;
    which you could shorten to...
    function onClick(event:MouseEvent):void {
         ILOVEMYTEXTBOX.text=myPhrases[Math.floor(myPhrases.length*Math.random())];
    and you should be able to delete the duplicate post you have for this

  • Time Machine - confused!

    I've only recently started using Time Machine, but I don't think it's doing what it's supposed to do. I used it a few weeks ago to backup everything to an external Firewire drive and the initial backup seemed to go OK without any problems. Since then it appears to do regular backup and the Backup folder now has a number of new folders that are generated each time Time Machine backs up.The problem is that when I enter Time Machine, all of the windows except for the latest look the same as the original backup. Since the desktop folder is the one that changes most frequently (as I tend to dump files on the desktop before moving elsewhere) it's obvious that although the latest backup reflects what is on the desktop at present the desktop folder in all of the other windows (even the one that was backed up an hour ago) still looks the same as the desktop folder from the initial back up.. I have installed a Widget that tells me how many files have been transferred at each backup and this seems to suggest that things are being transferred, but I can't find them. Any idea what I'm doing wrong

    I had nothing on my desktop.
    I added an untitled folder.
    I initiated a Time Machine backup.
    Ater the backup finished I deleted the untitled folder.
    I entered Time Machine and checked the last backup.
    The untitled folder was not there.
    In summary: I don’t trust Time Machine as my only backup.
    Thanks ... Ken

  • Is it possible to batch duplicate a movieclip including its actionscript contents...?

    ... and change a small part of the action script in each one, for example have it change '1.jpg' into '2.jpg' and so on?
    Any help would be enormously appreciated!
    Oli.

    if you have a movieclip that has the following code on its timeline and that has linkage id = mcID:
    this.createEmptyMovieClip("targetMC",1);
    targetMC.loadMovie(imageURL);
    you could use:
    for(var i=1;i<33;i++){
    var mc:MovieClip = this.attachMovie("mcID","mc",this.getNextHighestDepth());
    mc.imageURL = i+".jpg";

  • Time Code Confusion

    I'm running into a timecode problem and not sure what's going on.
    Here's what's happening. I'm trying to capture the beginning of a tape. I have set my time code in and out points to 05:34:47:08 to 05:37:07:07. I'm using a DSR-11 deck which is set to display the timecode (of the tape) on my monitor. The Log and Capture window in FCP shows the same timecode that's coming from the deck. Both the monitor and log and capture will display the same time code for the out point. When I'm capturing the clip it's like FCP has a mind of it's own. It continues capturing well past the out point. When it does stop and I double click it into the viewer the output time code says 05:37:07:07, but the audio and video are different. Both the monitor and log and capture timecodes show 05:37:08:19 as the outpoint. I've captured other parts of the tape but now I'm not sure if the timecodes are correct because the "additional" footage overlapse footage that I've already captured which have different timecodes.
    How do I know which timecode is correct the one that's being displayed on the monitor and in log and capture or the timecode of the captured clip? Is it possible to have two different timecodes on the same tape? The tape stock is new.
    I hope this makes sense. Has anyone else had this problem?
    Thanks.

    My sequence setting is DV NTSC, 29.97 edit time base and a audio rate of 48kHz, 16 bit. The digitized clip has these setting. When I play the clip section from the DV Cam tape I get the audio as recorded at 48kHz.

  • Time-out confusion ...

    I've got a problem with my web server, a Xserve G5 with standard Mac OS X 10.4.11 except for a GD2 install and a PHP 4.4.7 upgrade in connection to that I have not modified the standard built-in web server. The GD2 install is the one published at osx.topicdesk.com ...
    Everything runs well, no problems with the GD2 but since I installed GD2 and upgraded PHP I have experienced random time-outs, long response-times and package loss.
    Can the PHP upgrade cause this ... if not any other ideas?
    Config:
    Xserve G5 with 10.4.11
    GD2, PHP 4.4.7 upgrade and Gzip enabled
    Joomla 1.0.13
    You can access the server at http://217.73.102.137 ... the traffic should be minimal since I'm the only ip at 10 Mbit connection and the site is under development and not "public" or accessed by any robots, spiders etc ...

    As I replied in your other thread:
    If you had permanent issues, it could (maybe, but unlikely) be attributed to your new PHP build. Random time-outs probably have other causes.
    Could be connectivity issues or even something completely unrelated to the web server. Check your logs for clues. Also, while you experience these time-outs, how are the other services on your server behaving.
    Alex

  • New to flash actionscript, making a game.

    Hi. My name's Rory.
    I am an artist.
    http://www.youtube.com/profile?user=PimpOfPixels
    http://roaring23.cgsociety.org/gallery/
    I am learning action script and Flash so that I can make
    games.
    I am not a complete novice in programming. I am proficient in
    Java and in MaxScript (3DSMAX embedded language).
    I have been making some progress in action script and I have
    a functional (although incomplete) game in the works. You can view
    it here:
    http://secure2.streamhoster.com/~rlu...orniverous.swf
    The idea is it's a color game
    red beats green, green beats, blue beats red. Think paper
    scissor rock.
    The idea is to change the entire circle into one color.
    The graphics are place holders BTW.
    I am using FlexBuilder 2.0 and Flash CS3, and I have come
    across a problem not covered in either of my books.
    I'd really appreciate any help that you guys can offer.
    I have gotten this far on my own.
    My #1 question (and I have many more) is:
    How do you through Flash specify animation segments for a
    MovieClip Symbol?
    Notice how the red creatures occasionally open their mouths.
    I want to have a walk, an attack, an absorb, and a bounce animation
    on the same timeline and trigger the appropriate one depending on
    which color the creature collides with. I do not know how to go
    about this problem. I’ve just been trying to get the walk
    animation to loop without playing the attack animation so far.
    I've tried frame-labeling in flash, with scripts on the key
    frames of a second layer that specify when to stop or repeat the
    animation... No dice.
    I have a symbol named RedShot in the library of a flash
    project named "graphics"
    In my timeline I have 2 animation segments, and I have a
    second layer denoting two corresponding frames named "walk" and
    "attack" from the properties menu.
    On the final frames of the animations I have scripts.
    Code:
    gotoAndPlay("walk");
    and
    Code:
    gotoAndPlay("attack");
    respectively.
    Im my library I have linkage options specified as such:
    Class:RedShot
    BaseClass:flash.display.MovieClip
    export of actionscript#CHECKED
    export on 1st frame#CHECKED
    on the main stage of my flash project I have actionscript for
    2 functions:
    Code:
    function walk(){
    red_shot.gotoAndPlay("walk");
    function attack(){
    red_shot.gotoAndPlay("attack");
    I export the project and the opened window has the "walk"
    animation looping properly.
    In my FlexBuilder project I embed the symbol
    Code:
    //Inside class global variables:
    [Embed(source="../graphics.swf", symbol="RedShot")]
    public var RedShot:Class;
    private var _shot:MovieClip;
    Code:
    //and in my buildShot function:
    _shot = new RedShot();
    addChild(_shot);
    When I build the project the characters appear, and they
    animate. The only trouble is that there are no breaks in the
    animation. The animation loops right through the frames where I
    have specified that the animation should "gotoAndPlay" from a
    different part.
    What's weirder is that I can call
    Code:
    "gotoAndPlay("attack");"
    without an error and it will go to and play from that point.
    The only trouble is that it will begin to loop the entire animation
    again without stopping at the gotoAndPlay events stored in the
    frames of the timeline.
    It seems like all embedded actions are ignored, add I can't
    think of another way to controll the animation.
    Any thoughts?

    After hours of searching the internet I finally got this
    blasted question figured out.
    How to you export a symbol from Flash for use in a Flex
    Builder project without destroying actionscript stored within the
    frames of the Symbol's timeline?
    That's a long winded way of saying: "In FlexBuilder, how do
    you control MovieClips from Flash". I'm trying to make games, and
    this was a particularly important question for me :).
    Here's how:
    1) You need a hotfix from Adobe.
    [HTML]http://kb.adobe.com/selfservice/viewContent.do?externalId=kb401493&sliceId=2[/HTML]
    This allows Flash CS3 to export a SWC file.
    2)You have to set the linkage properties for your various
    symbols in the flash library panel.
    a)right click on symbol in library panel
    b)choose "linkage"
    c)"Class:" = (pick a name)
    d)"Base class:" = flash.display.MovieClip;
    e)"Export for ActionScript" = CHECKED
    f)"Export in first frame"=CEHCKED
    3)If you want to have multiple segmented animations as I
    certainly did you'll want to create frames and actionscripts within
    the symbols timeline to define where these animations are.
    a) in the symbol's timeline make a second layer. We'll name
    that layer "labels" for the sake of not having this get too
    confusing.
    b) on that layer create a new frame for each of the animation
    segments that you'd like to define and stretch them to the length
    of the corresponding animations.(I'm assuming that you have a
    keyframe animation on the 1st layer... otherwise what's the point
    of all this :P?)
    c)in the properties panel name the frames in the "labels"
    layer accordingly ie. "walk" "run" shoot" etc.
    d)Define whether the various animations play once or loop by
    adding a script to the last frame of the animation. If you want the
    animation to loop add
    [CODE]gotoAndPlay("name-of-the-animation");[/CODE]
    if you want the animation to play once and stop add
    [CODE]stop();[/CODE]
    if you want the animation to play once and then return to a
    different animation add
    [CODE]gotoAndPlay("name-of-a-different-animation");[/CODE]
    4) now you can export the symbols to an SWC file. Note: you
    do not get this option unless you have installed the hotfix.
    [HTML]http://kb.adobe.com/selfservice/viewContent.do?externalId=kb401493&sliceId=2[/HTML] .
    a)rightclick on a symbol in the library panel
    b)choose "exportSWCfile..."
    c)export the file to a logical place such as the root of your
    FlexBuilder project.
    5) Now you have to tell flexbuilder about the new SWC file.
    Note: Once this file is added to the FlexBuilder library you can
    instantiate classes from it as though they were included using the
    "include" function.
    a)Right clicking on the root of the project in the Navigator
    view.
    b)going to properties.
    c)Going to library path. (2nd tab)
    d)and pressing the "Add SWC" button
    Now you're done and you can instantiate any of the symbols
    from your library while preserving any actions from your symbols
    timeline just as though you had imported it as a class from a
    typical library.
    Sweet huh?
    Thanks to the countless people and internet resources I found
    on the subject. Hopefully it will be easier for anyone who finds
    this post.
    Here's an adobe video which covers the basic process.
    https://admin.adobe.acrobat.com/_a300965365/p75214263/

  • Depth of movieclips gets screwed-up

    Ok I tried to resolve this before without any luck.
    Tim was a big help but I don't realy understand it yet.
    I have a flash movie, in that movie there are 15 instances
    ("drop1_mc" - "drop15_mc") of a movieclip all on the same level in
    the timeline.
    In frame 1 I give them a depth with getNextHighestDepth. I
    trace the depths and all works fine.
    In frame 2 I swap the stacking order with:
    drop15_mc.swapDepths(drop14_mc);
    drop14_mc.swapDepths(drop13_mc);
    drop13_mc.swapDepths(drop12_mc);
    drop2_mc.swapDepths(drop1_mc);
    Basicly putting the lowest movieclip on top.
    I trace the depths again and all works fine.
    At frame 30 I jump back to frame 2 (nothing happens
    inbetween).
    But now all depths have gone loco! What am I doing wrong??
    here is the code:
    FRAME 1:
    var k = 1;
    for (i=1; i<=15; i++) {
    this["drop"+i+"_mc"].gotoAndStop(12);
    drop1_mc.swapDepths(_root.getNextHighestDepth());
    drop2_mc.swapDepths(_root.getNextHighestDepth());
    drop3_mc.swapDepths(_root.getNextHighestDepth());
    drop4_mc.swapDepths(_root.getNextHighestDepth());
    drop5_mc.swapDepths(_root.getNextHighestDepth());
    drop6_mc.swapDepths(_root.getNextHighestDepth());
    drop7_mc.swapDepths(_root.getNextHighestDepth());
    drop8_mc.swapDepths(_root.getNextHighestDepth());
    drop9_mc.swapDepths(_root.getNextHighestDepth());
    drop10_mc.swapDepths(_root.getNextHighestDepth());
    drop11_mc.swapDepths(_root.getNextHighestDepth());
    drop12_mc.swapDepths(_root.getNextHighestDepth());
    drop13_mc.swapDepths(_root.getNextHighestDepth());
    drop14_mc.swapDepths(_root.getNextHighestDepth());
    drop15_mc.swapDepths(_root.getNextHighestDepth());
    for (i=1; i<=15; i++) {
    trace("New Depth: "+this["drop"+i+"_mc"].getDepth());
    FRAME 2:
    this["drop"+k+"_mc"]._visible = false;
    drop15_mc.swapDepths(drop14_mc);
    drop14_mc.swapDepths(drop13_mc);
    drop13_mc.swapDepths(drop12_mc);
    drop12_mc.swapDepths(drop11_mc);
    drop11_mc.swapDepths(drop10_mc);
    drop10_mc.swapDepths(drop9_mc);
    drop9_mc.swapDepths(drop8_mc);
    drop8_mc.swapDepths(drop7_mc);
    drop7_mc.swapDepths(drop6_mc);
    drop6_mc.swapDepths(drop5_mc);
    drop5_mc.swapDepths(drop4_mc);
    drop4_mc.swapDepths(drop3_mc);
    drop3_mc.swapDepths(drop2_mc);
    drop2_mc.swapDepths(drop1_mc);
    for (i=1; i<=15; i++) {
    trace("New Depth: "+this["drop"+i+"_mc"].getDepth());
    this["drop"+k+"_mc"].gotoAndStop (1);
    this["drop"+k+"_mc"]._visible = true;
    this["drop"+k+"_mc"].gotoAndPlay (1);
    FRAME 30:
    var k=k+1;
    if (k>15) {
    var k= 1;
    trace("Var K: "+k);
    gotoAndPlay(2);

    Glad you could move forward. Ok, next step with some extra
    info (please
    read all, the solution is at the bottom
    1) Flash uses depths -16383 to -1 for elements that you place
    on stage
    at author-time (in Flash).
    2) Flash uses depths 0 and above for elements that are placed
    dynamically (using attachMovie, duplicateMovieClip,
    createEmptyMovieClip)
    3) When the playhead plays, Flash uses the depths as
    identifier to know
    when to move, draw, and remove movieclips.
    Implications of the above:
    ==========================
    * in a standard situation, you have a movieclip at a
    author-time depth,
    you can move the movieclip's position around, and have your
    playhead
    move forward and backward. Flash will realize that the
    movieclip still
    occupies the original depth and will let it be.
    * however _IF_ you swap a movieclip from the author-time
    depths to the
    dynamic depths _AND_ if you play your timeline forward _AND_
    if you jump
    back to where Flash is supposed to draw the author-time
    movieclips, THEN
    the following will happen:
    - Flash will see that the depth at which the author-time
    movieclip
    must be is now empty and will assume it must place the
    movieclip again.
    - You will then have duplicate movieclips _with the same
    name_ on
    stage: one at a positive depth (the one you manipulated), and
    one at
    negative depth (the one Flash added again as per the
    author-time
    specification). Of course the result will be all screwed up.
    OK, this may sound a bit weird, here is a simple test case to
    illustrate
    this issue:
    1) create new flash movie
    2) in the library create a new movieclip with a simple shape
    maybe a
    circle or a rectangle
    3) place the movieclip on stage and name it "myMC";
    4) add some code to the timeline as follow:
    [frame 1]
    // nothing here
    [frame 2]
    // move the movieclip to a positive depth
    myMC.swapDepths(this.getNextHighestDepth());
    // shift it
    myMC._x += 10;
    myMC._y += 10;
    [frame3]
    stop();
    this.onMouseDown = function()
    // when you will click the mouse,
    // the duplicate will appear
    this.gotoAndPlay(1);
    Solutions to this problem:
    ==========================
    - do NOT change the depth of author-time movieclips, and
    especially, do
    not move them to positive depths (if your aplpication must be
    dynamic,
    use attachMovie to load the movieclips from the library
    directly to
    positive depths)
    - If you must move author-time movieclips to positive depths,
    do NOT
    jump backward in your timeline.
    hth,
    Tim.
    PS1: there are further implications to the 3 rules aboves but
    they are
    not affecting you right now so I wont elaborate on them to
    not confuse
    you
    PS2: when you face a problem, always try to build the
    simplest test case
    that shows the problem. That is the best way to find out
    whether the
    problem is due an error is in your code or to an unexpected
    behavior of
    the Flash player.
    Sarford wrote:
    > Ok I tried to resolve this before without any luck.
    > Tim was a big help but I don't realy understand it yet.
    >
    > I have a flash movie, in that movie there are 15
    instances ("drop1_mc" -
    > "drop15_mc") of a movieclip all on the same level in the
    timeline.
    > In frame 1 I give them a depth with getNextHighestDepth.
    I trace the depths
    > and all works fine.
    >
    > In frame 2 I swap the stacking order with:
    >
    > drop15_mc.swapDepths(drop14_mc);
    > drop14_mc.swapDepths(drop13_mc);
    > drop13_mc.swapDepths(drop12_mc);
    > .....
    > drop2_mc.swapDepths(drop1_mc);
    >
    > Basicly putting the lowest movieclip on top.
    > I trace the depths again and all works fine.
    >
    > At frame 30 I jump back to frame 2 (nothing happens
    inbetween).
    > But now all depths have gone loco! What am I doing
    wrong??
    >
    > here is the code:
    >
    > FRAME 1:
    > var k = 1;
    >
    > for (i=1; i<=15; i++) {
    > this.gotoAndStop(12);
    > }
    >
    > drop1_mc.swapDepths(_root.getNextHighestDepth());
    > drop2_mc.swapDepths(_root.getNextHighestDepth());
    > drop3_mc.swapDepths(_root.getNextHighestDepth());
    > drop4_mc.swapDepths(_root.getNextHighestDepth());
    > drop5_mc.swapDepths(_root.getNextHighestDepth());
    > drop6_mc.swapDepths(_root.getNextHighestDepth());
    > drop7_mc.swapDepths(_root.getNextHighestDepth());
    > drop8_mc.swapDepths(_root.getNextHighestDepth());
    > drop9_mc.swapDepths(_root.getNextHighestDepth());
    > drop10_mc.swapDepths(_root.getNextHighestDepth());
    > drop11_mc.swapDepths(_root.getNextHighestDepth());
    > drop12_mc.swapDepths(_root.getNextHighestDepth());
    > drop13_mc.swapDepths(_root.getNextHighestDepth());
    > drop14_mc.swapDepths(_root.getNextHighestDepth());
    > drop15_mc.swapDepths(_root.getNextHighestDepth());
    >
    > for (i=1; i<=15; i++) {
    > trace("New Depth: "+this.getDepth());
    > }
    >
    > FRAME 2:
    > this._visible = false;
    >
    > drop15_mc.swapDepths(drop14_mc);
    > drop14_mc.swapDepths(drop13_mc);
    > drop13_mc.swapDepths(drop12_mc);
    > drop12_mc.swapDepths(drop11_mc);
    > drop11_mc.swapDepths(drop10_mc);
    > drop10_mc.swapDepths(drop9_mc);
    > drop9_mc.swapDepths(drop8_mc);
    > drop8_mc.swapDepths(drop7_mc);
    > drop7_mc.swapDepths(drop6_mc);
    > drop6_mc.swapDepths(drop5_mc);
    > drop5_mc.swapDepths(drop4_mc);
    > drop4_mc.swapDepths(drop3_mc);
    > drop3_mc.swapDepths(drop2_mc);
    > drop2_mc.swapDepths(drop1_mc);
    >
    > for (i=1; i<=15; i++) {
    > trace("New Depth: "+this.getDepth());
    > }
    >
    > this.gotoAndStop (1);
    > this._visible = true;
    > this.gotoAndPlay (1);
    >
    > FRAME 30:
    > var k=k+1;
    > if (k>15) {
    > var k= 1;
    > }
    > trace("Var K: "+k);
    > gotoAndPlay(2);
    >

  • Count time in millisecond when datagrid load data

    Hello World,
    Im newbie in Flash and ActionScript things.
    I want to counting how long the dataGrid loads all the data.
    I've try his code :
    var date1:Date = new Date;
    xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
    xmlLoader.load(new URLRequest("http://localhost/final/Flash/DB-Single/get_db.php"));
    var date2:Date = new Date();
    trace( date2.valueOf() - date1.valueOf() );
    trace ( date2.getTime() - date1.getTime() );
    loadTimeTB.text = "Loaded : "+ (date2.valueOf() - date1.valueOf()) +" Milliseconds";
    but the result is 1 or 0 Milliseconds. i think its kinda wierd. because the dataGrid load takes longer than 1 Millisecond.
    anyone can help me? or give me any ideas?
    thanks before lads.
    -desMO-

    thanks for bringing up new things in actionscript.
    but im still confuse with actionscript syntax.
    here's my full syntax, i just compiled it, still with errors. can you help me which part that I mistaken?
    import fl.data.DataProvider;
    import fl.controls.ScrollPolicy;
    import fl.controls.DataGrid;
    var xmlLoader:URLLoader = new URLLoader();
    var xmlData:XML = new XML();
    var dp:DataProvider = new DataProvider();
    xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
    xmlLoader.load(new URLRequest("http://localhost/final/Flash/DB-Single/get_db.php"));
    var startTime:Number=getTimer();
    function LoadXML(e:Event):void
         xmlData = new XML(e.target.data);
         //trace(xmlData);
         var dp:DataProvider = new DataProvider(xmlData);
         myDataList.removeAllColumns();
         myDataList.removeAll();
         myDataList.dataProvider = dp;
         myDataList.horizontalScrollPolicy = ScrollPolicy.ON;
         loadTimeTB.text = "Loaded : "+ ( getTimer() - startTimer ) +" Milliseconds";
         loadTimeTB.autoSize = TextFieldAutoSize.LEFT;
    thanks for your time to responding me.
    best regards,
    -desMO-

Maybe you are looking for

  • Multiple times payment for one subscription

    Hi, i am holding one subscription and tried to get new subscription to same country and same subscription before the 1st subscription completed.when i tried to do payment through skrill  i got an error msg  "payment was unsucessful  please retry" so

  • Lost iPhoto application, now what?

    I was transferring photos to a new hard drive and also dragged the iPhoto icon from the dashboard into the hard drive. Now I cannot find it anywhere including on the hard drive which only seems to have jpeg photos. Do I have to re-stall the entire sy

  • Send from Finder with Thunderbird as default email

    Greetings, Finder will not open Thunderbird (default email client in System Preferences) to send documents.  Apple Mail crashes repeatedly, therefore, I resort to Thunderbird (works without crashing).  Please instruct me on how to set Thunderbird (al

  • Question on selling CS5

    I have a student edition of CS5. Would I get in any trouble if I sold it?

  • Logic Pro setup assistant?

    Hi, I'm a long time Pro Tools user, new to Logic. I'm following a tutorial DVD about Logic Pro and they start by showing a Setup Assistant. They talk about and show a Logic Setup Assistant, which is a separate program that can be launched from the Pr