Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 11-10-2009, 11:00 PM   #1
bflumign
Registered User
 
Join Date: Nov 2009
Posts: 6
Default Problems with MovieClip Buttons

So I am totally inexperienced at this. Through some tutorials I thought I had this figured out--but alas here I sit pulling my hair out and cursing. My 2 year old learned a new word today.

Basically what I am trying to do is create 3 groups of movieclip/buttons that load different options onto an image. I don't know if there is a more simple way of doing this or a plain just better way. But the thing doesn't work the way it stands--that's all I know.

Any help would be awesome!

Thanks!
Attached Files
File Type: zip dd4.zip (119.7 KB, 83 views)
bflumign is offline   Reply With Quote
Old 11-11-2009, 02:34 PM   #2
bflumign
Registered User
 
Join Date: Nov 2009
Posts: 6
Default

Does anyone have any ideas or a tutorial that I can reference?

Thanks in advance.
bflumign is offline   Reply With Quote
Old 11-11-2009, 03:57 PM   #3
Shaedo
Registered User
 
Join Date: Mar 2009
Posts: 17
Default

Ok we'll go through this bit by bit:

you will be getting some of these:
Code:
1151: A conflict exists with definition clipArray in namespace internal.

Warning: 3596: Duplicate variable definition.
This is because you are using the same variable name more than once (and trying to assign values to them) in the same scope. so a scope would be in the same class, function or as in your case timeline.

so if you do this
ActionScript Code:
var asdf:Number = 1; var asdf:Number = 2;//error
flash chucks an error because it wants you to use different vars eg
ActionScript Code:
var asdf:Number = 1; var asdf2:Number = 2;// ok! :)

because of the way you have written your code (more on that) its more difficult to identify these conflicts because they are on different levels. So the short term solution is to go through and give them all different names eg
find all your
ActionScript Code:
var clipArray:Array
change to
ActionScript Code:
var clipArray1:Array var clipArray2:Array //etc

you will also be getting these errors
Code:
1021: Duplicate function definition.
which is basically the same only for functions:
go and find EVERY function and give it a unique name.

At the level of complexity you are trying to achieve you need to move off coding on the timeline. Some people may disagree with this statement; They are wrong. You need to start making classes even if you are just creating a document class for this project. If you do this then the errors that you currently have will never occur. There are many other benefits as well.

Depending on your time and how capable you want to become in coding flash I would recommend starting this project using classes (.as files) now.

It would also appear that you may have attempted to build your project in one massive move (I could be wrong, if so then my apologies ignore the rest) when it is a much safer move to build it in small managable steps. So get the first button working, then the first group of buttons working and then start adding more groups. IF you have done this then it would be helpful to please post you most recent Working project.


Luck,

S
Shaedo is offline   Reply With Quote
Old 11-11-2009, 08:20 PM   #4
bflumign
Registered User
 
Join Date: Nov 2009
Posts: 6
Default

Thank you so much for your reply!

I built the attached fla first and then made the one that I attached initially. But being new at this didn't understand what all of the new errors meant--what you replied with makes complete sense.

I think you are right about using classes.

But I have no idea how to write my own. Could you point me in the right direction or send me to a tutorial that can walk me through it?
Attached Files
File Type: zip dd3.zip (130.6 KB, 79 views)
bflumign is offline   Reply With Quote
Old 11-12-2009, 03:52 AM   #5
Shaedo
Registered User
 
Join Date: Mar 2009
Posts: 17
Default

This is a good tutorial and it explains things well I think.
http://www.flashandmath.com/bridge/intro/index.html

to me it looks like you are trying to do this:
(in plain English)
Have a single picture with 3 properties that you can change; the Border (edging), the fill (PUL?) and the Pattern.
you want to display all possible combinations of these by clicking buttons that change one aspect at a time.

I might suggest that you look at using a mask for the pattern
http://help.adobe.com/en_US/AS3LCR/F...ject.html#mask
this way you will be able to add new patterns with out having to cut them to the desired shape (but this might be another thing to learn and thus more trouble than it's worth for you right now)

I might suggest you look at using colourTransform
http://help.adobe.com/en_US/AS3LCR/F...olorTransform()
(but this might be another thing to learn and thus more trouble than it's worth for you right now)

Luck,
S
for the border and fill
Shaedo is offline   Reply With Quote
Old 11-12-2009, 01:49 PM   #6
bflumign
Registered User
 
Join Date: Nov 2009
Posts: 6
Default

Thanks again! You rock!
bflumign is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:49 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.