PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
onRollOver - duplicate thumb, xml [AS2]
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: onRollOver - duplicate thumb, xml [AS2]

Hybrid View

  1. #1
    Member
    Join Date
    Jul 2007
    Posts
    91

    onRollOver - duplicate thumb, xml [AS2]

    Hi,

    i try use duplicateMovieClip on my thumb image loaded from xml:

    Actionscript Code:
    ...
    obj.onLoadComplete = function(trg:MovieClip)
    {
        counter++;
        if (counter<listOfImage.length)
        {
            MCL.loadClip(listOfImage[counter], listOfTargets[counter]);
        }
        else
        {
            preloader._visible = false;
        }
        showImage(trg);
       
        trg.num = counter;
       
        trg.onRollOver = function()
        {
            tc = this.duplicateMovieClip ("trg_clone"+this.num, this.num); // test
            tc._xscale = 200; // test
        }
        ;
        trg.onRollOut = function()
        {
            //
        }
        ;
        trg.onRelease = function()
        {
            //
        }
        ;
    }
    ;
    ...

    On normal objects/buttons duplicateMovieClip works fine, but in xml - not. What am I doing wrong?

    - download sample -

  2. #2
    :
    Join Date
    Dec 2002
    Posts
    3,518
    From the online flash help files...
    Creates an instance of the specified movie clip while the SWF file is playing. Duplicated movie clips always start playing at Frame 1, no matter what frame the original movie clip is on when the duplicateMovieClip() method is called. Variables in the parent movie clip are not copied into the duplicate movie clip. Movie clips that are created with the duplicateMovieClip() method are not duplicated if you call the duplicateMovieClip() method on their parent. If the parent movie clip is deleted, the duplicate movie clip is also deleted. If you used MovieClip.loadMovie() or the MovieClipLoader class to load a movie clip, the contents of the SWF file are not duplicated. This means that you cannot save bandwidth by loading a JPEG, GIF, PNG, or SWF file and then duplicating the movie clip.

  3. #3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center