Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Confused With OOP



I´m making my first steps with OOP so I´m still in the darkness.

I placed a MC instance called "clip" at coordinates 0,0.

then I wrote this code


ActionScript Code:
function Square(x, y) {    this._x = x;    this._y = y;}clip = new Square(200, 200);trace(clip._x);trace(clip._y);Square.prototype.moveTheClip = move;function move() {    this._x += 20;}button.onPress = function() {    clip.moveTheClip();};


Nothing is working here (especially my brain, I know).
Although the trace command returns 200,200 the clip is still in 0,0 and moveTheClip just moves nothing...



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 01-26-2004, 11:22 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

    Copyright © 2005-08 www.BigResource.com, All rights reserved