Hiding/Showing buttons?

  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Joined: Jun 15, 2003
  • Posts: 4583
  • Loc: Maryland
  • Status: Offline

Post July 9th, 2003, 12:08 pm

Ok I am sure I'll be able to use it somehow, if anything it will help me out with how to move my plates around.

I'll just post any questions I have here then, I can understand where your coming from :)

I am going to give it a clean start now and see if I can control everything through actionscript, instead of tweens.
Pixel Acres V2
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post July 9th, 2003, 12:08 pm

  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Joined: Jun 26, 2003
  • Posts: 1402
  • Loc: Philadelphia, PA
  • Status: Offline

Post July 9th, 2003, 12:28 pm

Well I hope my stuff helps you out :D

I was planning on doing navigations like that for a while (seen them around, thought they were cool), but never had motivation. So thank you for giving me the motivation to get my arse in gear and make them 8)
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Joined: Jun 15, 2003
  • Posts: 4583
  • Loc: Maryland
  • Status: Offline

Post July 9th, 2003, 12:36 pm

Heheheh glad I could be of service in some way :-D

I think I wil lrevert to you mc fading clips because I really dont need to buttons as long as I can still click on the mc and make it move or what not :) Thanks for all the scripts, but expect some function creation problems, never was to good at functions :roll:
Pixel Acres V2
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Joined: Jun 26, 2003
  • Posts: 1402
  • Loc: Philadelphia, PA
  • Status: Offline

Post July 9th, 2003, 12:40 pm

b_heyer wrote:
but expect some function creation problems, never was to good at functions :roll:


I hear ya, functions were never easy for me to get my head around. When learning Javascript I got used to basic functions, but then I got into AS and I started getting into different uses of functions, and then the object oriented prototype functions, and in the beginning it was too much for me to handle, but I started slowing down and taking things in piece by piece and researching what each command did until I eventually understood each part individually. Once you understand the individual parts it gets easier to piece it together and understand how it works as a whole. After that you are home free (usually).

Now I do everything with functions, they are so useful for reusable coding :D
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Joined: Jun 15, 2003
  • Posts: 4583
  • Loc: Maryland
  • Status: Offline

Post July 9th, 2003, 2:20 pm

Well, I got it to work...no I didn't but it kind of works. It move the panel, the right direction, but to far and without any animation, I am sure one glance at this and you will have my answer...I hope :-D

Code: [ Select ]
function moveX (ammount)
{
    if (ammount > 0) {
        var isPos = 1;
    } else {
        var isPos = 0;
    }
    absAmmount = Math.abs(ammount);
    var counter = 0;
    var maxX = 470;
        var minX = -470;
    panels.onEnterFrame = function() {
        if (_parent.isPos == 1) {
                if (_parent.counter < _parent.maxX) {
                    this._x += 47;
                    _parent.counter += 47;
                } else {
                    this._x = -585;
                    _parent.counter = 0;
                }
        } else {
            if (_parent.counter > _parent.minX) {
                    this._x -= 47;
                    _parent.counter -= 47;
                } else {
                    this._x = -585;
                    _parent.counter = 0;
                }        }
}
}

but.onRelease = function() {
    moveX(1);
}
  1. function moveX (ammount)
  2. {
  3.     if (ammount > 0) {
  4.         var isPos = 1;
  5.     } else {
  6.         var isPos = 0;
  7.     }
  8.     absAmmount = Math.abs(ammount);
  9.     var counter = 0;
  10.     var maxX = 470;
  11.         var minX = -470;
  12.     panels.onEnterFrame = function() {
  13.         if (_parent.isPos == 1) {
  14.                 if (_parent.counter < _parent.maxX) {
  15.                     this._x += 47;
  16.                     _parent.counter += 47;
  17.                 } else {
  18.                     this._x = -585;
  19.                     _parent.counter = 0;
  20.                 }
  21.         } else {
  22.             if (_parent.counter > _parent.minX) {
  23.                     this._x -= 47;
  24.                     _parent.counter -= 47;
  25.                 } else {
  26.                     this._x = -585;
  27.                     _parent.counter = 0;
  28.                 }        }
  29. }
  30. }
  31. but.onRelease = function() {
  32.     moveX(1);
  33. }
Pixel Acres V2
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Joined: Jun 15, 2003
  • Posts: 4583
  • Loc: Maryland
  • Status: Offline

Post July 9th, 2003, 2:32 pm

No I was wrong, it just happened to move it the direction I wanted it to move...

By the way what I was hoping to have happen with this function is:
Click a button, which initiates the function. The movement glides the panel over once, then resets it to the middle (everything is identicle so it should not be too visible) then it continues for "ammount" number of times.
Pixel Acres V2
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Joined: Jun 26, 2003
  • Posts: 1402
  • Loc: Philadelphia, PA
  • Status: Offline

Post July 15th, 2003, 9:22 am

Hey, sorry for disappearing, I haven't been around much for the past few days.

I am confused though, did you solve your problem?
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Joined: Jun 15, 2003
  • Posts: 4583
  • Loc: Maryland
  • Status: Offline

Post July 15th, 2003, 7:02 pm

the problem has been curbed for a while thanks to color scheme inspiration from Geekette, I decided that a much simplar but more content rich page was better.
Pixel Acres V2

Post Information

  • Total Posts in this topic: 23 posts
  • Users browsing this forum: No registered users and 49 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.