Be a Supporter!

The weirdest AS problem

  • 262 Views
  • 7 Replies
New Topic Respond to this Topic
Ferris95
Ferris95
  • Member since: Jun. 14, 2006
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
The weirdest AS problem 2008-11-25 21:34:30 Reply

This is really strange and I've done my best to fix it but nothing seems to work.

Its hard to describe but I'll try anyway. All of codes work on the first frame of flash game, everything the hittests, the camera, the player. But on the next frame, the hittests don't work and the neither does the camera. Mind that I've the instances the same.
Heres the SWF

Ferris95
Ferris95
  • Member since: Jun. 14, 2006
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to The weirdest AS problem 2008-11-25 21:36:07 Reply

At 11/25/08 09:34 PM, Ferris95 wrote: my problem

Oh snap, I forgot. I haven't added the script to advance to the next frame, so just press foreward.

CrustySheet
CrustySheet
  • Member since: May. 3, 2006
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to The weirdest AS problem 2008-11-25 21:38:30 Reply

wierd

is there actionscript on the second frame?
or is it only on the first frame in your fla?

Ferris95
Ferris95
  • Member since: Jun. 14, 2006
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to The weirdest AS problem 2008-11-25 21:40:39 Reply

At 11/25/08 09:38 PM, CrustySheet wrote: wierd

is there actionscript on the second frame?
or is it only on the first frame in your fla?

no there's script on both frames, here is the script:

score=0
stop()
createEmptyMovieClip("boxCam", 1000);
with (boxCam) {
onLoad = function () {
cameraX = _x;
cameraY = _y;
};
onEnterFrame = function () {
_x = _root.player._x;
_y = _root.player._y;
cameraX = cameraX+(_x-cameraX)/1;
_root._x = Stage.width/2-cameraX;
cameraY = cameraY+(_y-cameraY)/1;
_root._y = Stage.height/2-cameraY;
};
}

uyersuyer
uyersuyer
  • Member since: May. 15, 2002
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
Response to The weirdest AS problem 2008-11-25 21:49:13 Reply

I had the same problem with True_Darkness' API camera. Probably better off making your own 'cos I sure as hell never figured it out.


"Whoever said 'winners never quit' obviously never considered addicts." - Hoeloe

BBS Signature
Ferris95
Ferris95
  • Member since: Jun. 14, 2006
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to The weirdest AS problem 2008-11-25 21:51:15 Reply

At 11/25/08 09:49 PM, uyersuyer wrote: I had the same problem with True_Darkness' API camera. Probably better off making your own 'cos I sure as hell never figured it out.

yeah I could use another method I suppose, v-cam or a scrolling script. But what about the hittests?

CrustySheet
CrustySheet
  • Member since: May. 3, 2006
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to The weirdest AS problem 2008-11-25 21:51:22 Reply

try removing the clip and recreating it again on the second frame

uyersuyer
uyersuyer
  • Member since: May. 15, 2002
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
Response to The weirdest AS problem 2008-11-25 22:01:40 Reply

Just talked to Dave (TD) on AIM. He says you have to put the camera on its own layer and just extend the frame through where you need the camera to be.


"Whoever said 'winners never quit' obviously never considered addicts." - Hoeloe

BBS Signature