Be a Supporter!

move it along`

  • 442 Views
  • 6 Replies
New Topic Respond to this Topic
spex13
spex13
  • Member since: Feb. 23, 2007
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
move it along` 2007-03-24 16:02:05 Reply

on a button i have the action
on (release) {
interface1.x = 50.5;
}

interface1 is my mc instance and when the button clicked i want it moved over to the x of 50.5 but when clicked it dosent budge, little help

Denvish
Denvish
  • Member since: Apr. 25, 2003
  • Offline.
Forum Stats
Member
Level 46
Blank Slate
Response to move it along` 2007-03-24 16:03:04 Reply

At 3/24/07 04:02 PM, spex13 wrote: on a button i have the action
on (release) {
interface1.x = 50.5;
}

interface1 is my mc instance and when the button clicked i want it moved over to the x of 50.5 but when clicked it dosent budge, little help

_root.interface1._x = 50.5;


- - Flash - Music - Images - -

BBS Signature
ApatheticMark
ApatheticMark
  • Member since: Apr. 29, 2005
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
Response to move it along` 2007-03-24 16:04:08 Reply


on (release) {
interface1._x = 50;
}

It's _x, not x. It's also better to not move to fractions of pixels either.


woop.

BBS Signature
spex13
spex13
  • Member since: Feb. 23, 2007
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to move it along` 2007-03-24 16:08:50 Reply

At 3/24/07 04:04 PM, ApatheticMark wrote:
on (release) {
interface1._x = 50;
}


It's _x, not x. It's also better to not move to fractions of pixels either.

it moves but it dosent move to _x = 50, even when i make the number higher it only moves so far then stops

spex13
spex13
  • Member since: Feb. 23, 2007
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to move it along` 2007-03-25 06:28:17 Reply

please help it only moves a little bit not the whole way to 50

Blue-Devil23
Blue-Devil23
  • Member since: Sep. 4, 2005
  • Offline.
Forum Stats
Member
Level 13
Blank Slate
Response to move it along` 2007-03-25 07:18:57 Reply

on(release){
_root.interface1._x=50;
}

That should work. If that doesn't go far enough, try increasing the 50.
If you want it to move to 50 gradually put this:

onClipEvent(load){
speed=5;
}
on(release){
_root.interface1._x+=speed;
}
onClipEvent(enterFrame){
if(_root.interface._x == 50){
speed=0;
}
}

I hope that helps.

spex13
spex13
  • Member since: Feb. 23, 2007
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to move it along` 2007-03-25 08:23:58 Reply

right got it thanks