Tracing a clips on the stage, based on XML

Hi all
I'm having a problem drawing a clip with AS2 on the stage based on XML. I think her looping thought the XML, but for some reason any its not draw all the clips on the timeline...

So what I'm trying to do, is to trace a clip online based on its < note_position > and < note_height >, which he does very well. But its not trace all nodes < note >... trace 2 clips of < comment > < line tNom = "Name 1" color = "0 x 336633" > then it trace clips < note > 1 < line tNom = "Name 2" color = "0 x 333366" > then he traces 2 clips of < comment > < line tNom = "Name 3" color = '0 x 663366' >

what he must do, is to trace all the clips of < comment > < line tNom = "Name 1" color = "0 x 336633" > then draw all the clips of < comment > < line tNom = "Name 2" color = "0 x 333366" > and last but not least draw all clips from < comment > < line tNom = "Name 3" color = '0 x 663366' >...

So all in all it does is plotted 5 < note > clips in total instead of the 10 < note > clips must be traced on the stage...

OK well I think I'm going to loos, my mind... Is more, I think that it is thought looping the XML that is the problem. I think that its so be it I enclose the clip of the plot or something I don't see thought the fog...

Any ideas? Ive been battaling this for two days and I am at a total loss... so any help would be greatly apprecated.

I thank in advance
Scott: eek:

OK, I got this work here is my fix...

function attachXMLNodes () {}
Attach the clip and insert my data
var newPlot = attachMovie ("plot", "plot" + h + "" + i, this.getNextHighestDepth ());
duplicateMovieClip ("plot", "plot" + i, depth);
Assign the values...
This ["conspiracy" + h + "" + i].entry_clip.entry_date = "" + entry_date + ""; "
Finally, set the position
This ['plot' + h + ' ' + i] ._y = 685;
This ['plot' + h + ' ' + i] ._x = number (entry_pos).

}

Tags: Adobe Animate

Similar Questions

  • Add the symbol to the stage based on string of symbols

    Hello

    I am the string to add a symbol on the stage based on a string value in an existing symbol which is on the stage. I get no error when the game turns, but the symbol just reproduce on stage. I have no idea why

    This is the code:

    Variables used

    var score: int = 0

    var startX:int = stage.stageWidth = 920

    var startY: int = stage.stageWidth = 475

    Check to see if the "partition" amounts to 350 in ScoreBoardDisplay.txtScore.text

    If (ScoreBoardDisplay.txtScore.Text == String (350))

    {

    var HD1 = new HealthDrop();

    HD1.x = stage.stageWidth = startX

    HD1.y = stage.stageHeight = startY

    stage.addChild (HD1);

    HealthDrops.push (HD1)

    }

    Assuming you do not penetrate into this framework, when you check the score, but are always there, or at least hang out for a while, the problem is that the conditional code that you show only will run once, immediately entering into this framework.  He is not sitting it monitor any changes in the value of the text field.  You must specify the code to run.

    In this case what you could do is to place this code in a function that runs whenever the textfield value is changed.

    This code that you have to change the value of the TextField?

  • problem of interpolation with clip on the stage of the root

    The basic gist: I have a swf loaded into a movieclip on the stage. He plays well, I can refer to it without any problems. When I the holder clip on the stage of the root motion tween, however, it seems to unload the film loaded... I checked with a variable that I loaded in the film loaded; as soon as the thing is interpolated, this variable is zero. Don't want .swf to disappear.

    I can't find any unfortunate place with unloadMovie() action, there is nothing obvious that would be unloading the film... I am doing something stupid? I know something I should? I'm authoring in Flash 8, Flash 6 export, for the record.

    Thanks for any help.

    -Yes, he has the same instance at the end of the Tween (and all the other keyframes) name she has when charged.

    We mask applied to it also. Then, who turns out be the question I just thought of now. When I took that out it worked fine. It is a problem with the mask.

    Thanks for responding.

  • Play a clip on the stage

    I created a simple clip (48 images long). I want to play this movie on the stage. I created enough executives, but the movie does not play. I have not used real Flash for a long time, so probably miss me something simple. A movieclip can play within a single framework?

    If you select the control-> test movie in the main toolbar, it must run the file.

  • loading movie clip to the stage with AS3 button click

    I'm trying to figure out how to load a clip to the scene with a click of a button and have the movieclip close again with a close button. Does anyone have a step by step on how to do this or links to tutorials.

    Here is an example of what I'm trying to do.

    http://i30.photobucket.com/albums/c316/good_snow/FlashBoxSample_zps4e655414.jpg

    Looks like you are using a 'el' and a 'single '.  they are similar, but they are not the same.

    copy and paste from your code to your properties panel or vice versa to correct.

  • Display a series of images on the stage based on the value of a variable

    Hi all

    Here's another interesting problem! Well, I have an interactive retention test which is charge of an xml file based on the value of a variable scenario (for example, if script = Architecture, then load Q_set 1, if scenario = history then load something else). Now, I would like to extent this and display a series of images on my stage which will be valid only in the current scenario. Here is my code so far. I thought load a list of images on the beginning of the film (for example, Architecture_list, History_list) and then call them according to the value of the variable of scenario, but I would like to hear what you have to say. Any ideas?

    The answer is a series of managers: one called at the beginning of the movie to fill the lists of the appropriate folders (based on the value of the variable gimage) and the other called next and previous. Here they are in case yu need:

    ---------
    Global gFileList, gImagePath, gimages

    on buildList

    gFileList =]

    -defining the path to images:

    gImagePath = "@images /" & gimages & ' / ' "»

    Repeat with i = 1 to the maxinteger
    thisFile = getNthFileNameInFolder (gImagePath, i)
    If thisFile = EMPTY then exit
    If thisFile = the movie then the next repetition
    types of files = [".pct", ".jpg", ".bmp", ".gif"]
    howManyTypes = count (fileTypes)
    Repeat with thisType = 1 to howManyTypes
    extension = getAt (file types, if thisType)
    If thisFile contains extension then
    gFileList.append (thisFile)
    end if
    end repeat
    end repeat

    Member ("Display"). FileName = gImagePath & gFileList [1] - put the first image in the folder at the appropriate place

    Member ("Display"). Picture = .photo member ("display")

    buildList end

    --------------------
    Global gFileList, gFileIndex, gImagePath

    on nextFile

    gFileIndex = gFileIndex + 1

    If gFileIndex > count (gFileList) then

    whichFile = gFileList [1] - set the image = in the last loaded picture holder
    gFileIndex = 1 - the value of the index to the last trick question

    Member ("Display"). FileName = gImagePath & whichFile
    Member ("Display"). Picture = .photo member ("display")
    updateStage

    -go to the audio issues

    _movie. GB (31)

    on the other

    whichFile = gFileList.getAt (gFileIndex)

    Member ("Display"). FileName = gImagePath & whichFile

    Member ("Display"). Picture = .photo member ("display")

    updateStage
    end if

    end

    Global gFileList, gFileIndex, gImagePath
    -----------------------------------------------------------
    the backfile

    gFileIndex = gFileIndex - 1

    If gFileIndex = 1 then

    whichFile = gFileList [1]
    Member ("Display"). FileName = gImagePath & whichFile
    Member ("Display"). Picture = .photo member ("display")
    updateStage
    Sprite (17) TRUE = FALSE - disable the "back" button

    -gFileIndex = count (gFileList)
    end if

    If gFileIndex > 1 then

    whichFile = gFileList.getAt (gFileIndex)

    Member ("Display"). FileName = gImagePath & whichFile
    Member ("Display"). Picture = .photo member ("display")
    updateStage
    end if
    end

  • Place clips on the stage

    Hello
    I'm trying to place the movieclips of the librari onstage, but I only have one line.
    It's wat I want archieve. (for example M = a movieclip).
    M M M M M M
    M M M M M M
    M M M M M M
    M M M M M M

    If I also learn the FLF the result looks like this.

    M
    .. M
    ..... M
    ........ M
    ............. M


    now, it looks like this:

    M M M M M M

    This is the code I used:

    var tegelhouder:MovieClip = this.createEmptyMovieClip ("tegelhouder", this.getNextHighestDepth ());
    tegelhouder._x = - 70;
    tegelhouder._y = 0;


    for (i = 1; i < 9; i ++) {}
    tegelhouder.attachMovie ("tegelanim", "tegels" + I, i);
    tegelhouder ['tegels' + i] ._x = i * 70;
    }


    The first thing I'm trying to archive is to place the movieclips vertical as horizontal.

    Can someone help me with this?

    Kind regards

    Micheal

    It is very simple
    Everything you need in the lines one by one
    to do this
    for (var a: number = 1;)<=30; a++)="">
    attachMovie ("dd", "dd" + a, an);
    If you want the 5 clips on so
    trace (a %5);
    If (a == 1) {}
    to place one at a time
    _root ["dd" + a] ._x = 100;
    _root ["dd" + a] ._y = 100;
    } else {}
    If (a % 5 == 1) {}
    _root ["dd" + a] ._y = _root ["dd" +(a-1)] ._y + _root ["dd" +(a-1)] ._height + 2;
    _root ["dd" + a] ._x = 100;
    } else {}
    _root ["dd" + a] ._y = _root ["dd" +(a-1)] ._y;
    _root ["dd" + a] ._x = _root ["dd" +(a-1)] ._x + _root ["dd" +(a-1)] ._width + 2;
    }
    }
    }

    I hope you enjoy

  • Button video Clip to the stage setting

    I need help. I'm doing my menu as a clip separated for simplicity and fewer keyframes. I can't understand, however, how do I get my menu buttons to go to the image tag in scene 1. If I could get some advice on how to solve this problem, I would be very happy.

    I found my answer. Thank you for helping. For those who want also solved the problem

    _root.gotoAndStop ("FrameLabel")

  • How to remove a clip of the scene through an event to send?

    I have a video clip that is added to the scene. There is a Close button on this clip from movie I'd like to close and remove the clip from the stage. But the close button does not work when clicked, nothing happens.


    Here is the flow with the code:

    Add the clip to the scene

    var myPlayCredits:mc_playCredits = new mc_playCredits();

    stage.addEventListener (MouseEvent.MOUSE_DOWN, goButtons);

    function goButtons(event:MouseEvent):void

    {

    If (event.target is Credits_bnt)

    {

    SoundMixer.stopAll ();

    addChild (myPlayCredits);

    myPlayCredits.x = 511;

    myPlayCredits.y = 386;

    }

    This is the code on the button inside the clip that calls the sending

    import flash.events.Event;

    Stop();

    closeCredit.addEventListener (MouseEvent.MOUSE_DOWN, closeCreditPopupScreen);

    function closeCreditPopupScreen (event: MouseEvent): void

    {

    dispatchEvent (new Event ("RemoveMCcredit"));

    }

    Delete (is supposed to remove) the MovieClip from the stage when the user clicks the close button in the MovieClip.

    stage.addEventListener ("RemoveMCcredit", RemoveCreditClip);

    function RemoveCreditClip(e:Event):void

    {

    removeChild (myPlayCredits);

    }

    Anyone have any ideas?

    Why don't you simply assign the event listener for the closeCredit button after you instantiate myPlayCredits and have just the event listener to call the RemoveCreditClip function directly...

    var myPlayCredits:mc_playCredits = new mc_playCredits();

    myPlayCredits.loseCredit.addEventListener (MouseEvent.CLICK, RemoveCreditClip); \

    If you want to use the shipping event approach, try to assign the listener to the mc myPlayCredits, not the scene. (Or set of argument spread of the true event if you assign it to the scene)

  • How to "call" a movieclip on the stage of in a movieclip?

    Hey,.

    I have therefore 2 video clips on the stage, and I have to call the 2nd movieclip of in that 1.

    Ive tried to use;

    "stage.popUp_mc.gotoAndStop (1);

    "root.popUp_mc.gotoAndStop (1);

    and it keeps bringing the errors

    Thanks :)

    Ollie.

    If you are using AS3 and the two movieclips live time on the root timeline, so you can try...

    MovieClip (root).popUp_mc.gotoAndStop (1);

    You could possibly use.

    MovieClip (parent).popUp_mc.gotoAndStop (1);

    A correct way more OO to do this would be to have an event listener in the main storyline that is assigned to the movieclip and listening to an event that distributes the movieclip.  The event in the main storyline listener would call a function in the main timeline that targets the second movieclip.

  • bringing a video clip at the top of the order of the layers on mouse.

    I have 3 video clips on the stage in separate keyframes: mag1, mag2 & mag3

    trying to bring each mc on mouse up.

    mag1.addEventListener (MouseEvent.MOUSE_OVER, up, false, 0, true);

    function up(evt:MouseEvent):void
    {
    setChildIndex (MovieClip (evt.target), numChildren-1)
    }

    GETTING THIS ERROR.

    ArgumentError: Error #2025: the supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/setChildIndex()
    at skate_fla::MainTimeline/up()

    Thanks in advance for the help!

    It is possible, you should use "evt.currentTarget' instead of"evt.target"I think that if you use instead of MOUSE_OVER ROLL_OVER it wouldn't matter that you used.

    In addition, you can simply use addChild() to bring an object to the top...

    function up(evt:MouseEvent):void
    {
    addChild (MovieClip (evt.currentTarget));
    }

  • Since the update of my pc based system with 10 windows and install the last Prime Minister CC when I drag a clip on the timeline audio does not come with it. I can hear audio playback in the preview window of small file so the audio is there, but it's not

    Since the update of my pc based system with 10 windows and install the last Prime Minister CC when I drag a clip on the timeline audio does not come with it. I can hear audio playback in the preview window of small file so the audio is there, but it does not appear or play on the timeline. I can drag an audio file of Ms on the timeline, but I need audio from my original file to synchronize my audio file recorded independently - used to be no problem... any ideas what I can not edit now?

    Hi Neil,

    Drag / drop may not work if you don't have any enabl; e source patch or did not target the track for the same thing.

    https://helpx.Adobe.com/Premiere-Pro/using/source-patching-track-targetting.html

    Vinay

  • How do all the buttons on the stage unclickable, while keeping a certain clip visible?

    Hello

    I have a button on the stage that opens a pop-up window (video clip is popup + several other buttons). The clip and buttons on that deal with the scene.

    The problem is that the buttons that are on the stage and behind the clip, remain clickable (you can click in the clip of film!). How can I disable this?

    Basically, I need to do that you can not click in the clip.

    Thanks in advance!

    PS I use CS5 and AS2.

    One way would be to make the clickable movieclip.  This would block other objects behind it...

    mc.onRelease = function() {}

    mc.useHandCursor = false; to hide the hand cursor

    Another way would be to disable the buttons while the movieclip is present...

    BTN. Enabled = false;

    Another way would be to generate the conditional code to the button by clicking code does not work if the movieclip is visible.

    btn.onRelease = function() {}

    {if (!) MC._visible)}

    good to do things

    }

    }

  • trying to create a clip that bounces off all four sides of the stage

    using the syntax below I have created a video called "BALL" bouncing to the left 'x' and moves to the right of the scene 'x.520' and bounces in the beginning 'x '.

    HOW CAN I CREATE A CLIP THAT BOUNCES OF THE FOUR SIDES OF THE STAGE AND STOPS ON THE BOUNCE FOURTH?

    var ballTween:Tween = new Tween (ball, "x", Bounce.easeInOut, ball.x, 520, 5, true);

    ballTween.addEventListener (TweenEvent.MOTION_FINISH, tweenFinishedF);

    function tweenFinishedF(e:TweenEvent):void {}

    new Tween(ball,"x",Bounce.easeOut,ball.x,0,5,true);

    }

    Thank you very much!!!

  • How can I view a clip from the library onto the stage in AS3?

    Hello

    I have a clip in my library and I want to display on the stage using AS3.

    what I define as a variable? Do I need to use this code: addchild (movieclip);

    can I use the 'x' and 'y' to position?

    What the code would look like?

    Ben.

    Steps to follow:

    1. Click Moviclip library and click on: link...
    2. Check the box export for ActionScript.
    3. Assign to the class "mov_clip".
    var movie:mov_clip = new mov_clip;movie.x = 50;movie.y = 50;addChild:(movie);
    

Maybe you are looking for