A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: 2 quickies

  1. #1
    Junior Member
    Join Date
    Oct 2005
    Posts
    2

    2 quickies

    i am making a game and the inventory is annoying

    i have two things, (i dont know much about actionscript)

    1 how do i make it check what frame another mc is on
    i want the code to say (if slot1 is on keyframe 2 then play, otherwise do nothing.) i just dont know how to write it

    2 how to change the frame of another mc
    how would you code= slot2 go to frame 2 and stop

    im using mx pro
    thanks

  2. #2
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Code:
    if (_root.slot1._currentframe() == 2) {
    	_root.slot1.play();
    } else {
    	trace("do nothing");
    }
    _root.slot2.gotoAndStop(2);

  3. #3
    Junior Member
    Join Date
    Oct 2005
    Posts
    2

    error

    umm this came up
    **Error** Symbol=Symbol 27, layer=Layer 2, frame=2:Line 1: Statement must appear within on handler
    if (_root.slot1._currentframe() == 2) {

    and im having trouble using it with the rest of the code i want the button to,when pressed check if slot1 is frame 2 then either , if they have the item set the slot to frame 1 and goto frame 4 of the mc the button is in, or do nothing if it is on frame 1 or 3.

    ty
    Last edited by alexhallbom; 10-14-2005 at 01:11 PM. Reason: error

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