A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Some help with an MC.

  1. #1
    Junior Member
    Join Date
    Mar 2009
    Posts
    23

    Question Some help with an MC.

    Hi Everyone,
    I have a little cursor that's a torch and when you press down it makes flames. I made it so when the MC of "flame" hits the white dot in the MC "circle", "circle" should continue to the next frame. But, my problem is "circle" isn't continuing.


    **Could anyone help please? **


    Oh yes, heres a link to the FLA

    http://www.megaupload.com/?d=SYMWF817




    Last edited by maxhammad; 11-28-2009 at 02:54 PM.

  2. #2
    Cancerbero
    Join Date
    Jan 2003
    Location
    Mexico City.
    Posts
    26
    Hi.

    I saw your file and see you have to fix three or four things.

    1. You have to hide your mouse cursor. So, in the only frame of your main timeline, type:

    Code:
    Mouse.hide();
    2. Let your circle show the green line more time than 1 frame, because it's not enough time for users to watch it. What I did was to add sever frames to both layers in the circle mc and in the end of the timeline Y wrote:

    Code:
    gotoAndPlay(2);

    3. You have to set a command in your on(press) and on(release) mc code to make your "circle" mc to move to next frames from 1 frame. Before the line "gotoAndStop(2);" in the on(press) function, I added:

    Code:
       _root.circle.play();
    And at the end of the on(release) function:

    Code:
    _root.circle.gotoAndStop(1);
    4. Make your mc produce the circle to move only when it's exactly on the circle.

    Here is where I stopped. I tried next code, but it doesn't work:

    Code:
    on(press){
    	kirupaSound = new Sound(this);
       kirupaSound.attachSound("coolsound");
       kirupaSound.start(0, 1);
    	if (this._x == _root.circle._x && this._x == _root.circle._y){
       _root.circle.play();
    	}
       gotoAndStop(2);
    }
    on(release){
    	kirupaSound.stop(["coolsound"])
    	gotoAndPlay(1)
    	_root.circle.gotoAndStop(1);
    }
    I hope someone takes my place or I have more time latter.
    One idea. One emotion. One project.

  3. #3
    Junior Member
    Join Date
    Mar 2009
    Posts
    23
    Quote Originally Posted by cancerbero View Post
    Hi.

    I saw your file and see you have to fix three or four things.

    1. You have to hide your mouse cursor. So, in the only frame of your main timeline, type:

    Code:
    Mouse.hide();
    2. Let your circle show the green line more time than 1 frame, because it's not enough time for users to watch it. What I did was to add sever frames to both layers in the circle mc and in the end of the timeline Y wrote:

    Code:
    gotoAndPlay(2);

    3. You have to set a command in your on(press) and on(release) mc code to make your "circle" mc to move to next frames from 1 frame. Before the line "gotoAndStop(2);" in the on(press) function, I added:

    Code:
       _root.circle.play();
    And at the end of the on(release) function:

    Code:
    _root.circle.gotoAndStop(1);
    4. Make your mc produce the circle to move only when it's exactly on the circle.

    Here is where I stopped. I tried next code, but it doesn't work:

    Code:
    on(press){
    	kirupaSound = new Sound(this);
       kirupaSound.attachSound("coolsound");
       kirupaSound.start(0, 1);
    	if (this._x == _root.circle._x && this._x == _root.circle._y){
       _root.circle.play();
    	}
       gotoAndStop(2);
    }
    on(release){
    	kirupaSound.stop(["coolsound"])
    	gotoAndPlay(1)
    	_root.circle.gotoAndStop(1);
    }
    I hope someone takes my place or I have more time latter.

    thanks so much! but did you attach the file?

Tags for this Thread

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