OZONE Asylum
Forums
Multimedia/Animation
coding with MX
This page's ID:
11440
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
derketa; I've got a pretty hectic day today, so won't get much done on this issue, but let me ask a question and point out some potential problems with your approach. The question: will this need to work backwards too? Meaning if you click pointer 1, then 2, then 3 then 4 then 5 ... then 1 - does it need to reset 2,3,4 and 5? Or is it only to work in a linear way? What happens if you skip a pointer? (1, 2, 3, 7 ...) (BTW, you still haven't told us how the clips will be positioned on the stage. Will they be arranged in a line of some sort (like a menu), or distributed randomly?) On to some thoughts about coding as you have started it. First: I wouldn't add the pointer as a listener to the mouse object, because that won't target any particular clip. The onMouseDown event could happen anywhere on the stage if you subscribe the clips as listeners to the mouse object, which just broadcasts to any subscribers the fact that the event happened, not WHERE it happened. Better to write an onRelease method on the clip's timeline so that specific graphic is the target of the mouse event. (And I wouldn't use onMouseDown - the user has no opportunity to change their mind. onRelease is better in my opinion.) "tellTarget" is a Flash 4 remnant, though commonly seen in older tutorials that still flourish on the internet. Better syntax would be "this.gotoAndPlay(frameLabel);" Finally: "numbers=new Object();" is a perfectly acceptable way to begin a constructor method, but it won't result in anything visible on your stage. It constructs a new Object object, but it's not tied to a movie clip. There are examples of classes that handle, for example, scripted movement. They are invisible, helper classes not tied to a specific clip. If you want your pointer class to be intrinsic to something visible, it needs to be in the timeline of the library symbol, and the clip and the code need to be bound to each other using registerClass. Colin Moock's [url=http://moock.org/asdg/codedepot/]CodeDepot[/url] has some outstanding examples to study. Scroll down to "Chapter 14 (2nd Edition)" and download some of his examples, particularly "Ball, a MovieClip subclass" and "Ball subclass in a Library Symbol". Study the code and it should start to make sense if you have a OOP coding background. (Note that in the second demo I recommend, the pertinent code will be in the symbol's timeline, not the movie's main timeline.) [This message has been edited by Steve (edited 08-19-2003).]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »