I read your other post and the best advice anyone can give you is - Hire a consultant to do the programming.
You state that you are a graphic designer. Fine. You are not a computer programmer, so hire one. I suggest the ""Jobs & Gigs" section here: http://www.directorforum.com/ There are plenty of experienced Lingo programmers looking for work.
As far as what you are doing wrong. Well, everything. There is nothing you have presented that is close to correct.
No one would write the following code for a Zoom effect on mouseEnter.
on mouseEnter me
You would either write some lingo to create the effect or use a FilmLoop. You don't "go" anywhere on mouseEnter.
Hire some help. You have no idea what you are doing.
1 person found this helpful
Everybody is a beginner when they first start writing code. When I look at my first attempts at programming, I am mortified by my naivety and inaptitude."Anyone who has never made a mistake has never tried anything new." - Albert EinsteinSo... your code is not compiling. What information does Director give you to help you understand the error? I'm guessing that you see something like this:============================================================Script error: variable used before assigning a valueif mouseenter sprite?(spritenum).member = member "8" then============================================================This tells you that Director doesn't understand why you put "sprite" after mouseEnter. If you look up mouseEnter in the Scripting dictionary, you will see that it is the name of an event that is sent to a behavior on a sprite. Director expects you to use it to create an "on mouseEnter()" handler.What you are trying to discover is this: what is the member of the sprite that is now under the mouse? Computers are stupid. You have to explain everything to them slowly.
-- Makes the playback head jump to a different frame when the
-- mouse rolls off this sprite... unless it rolls onto a
-- sprite which contains a member with a given name.
vExpectedMemberName = "8"
vTargetFrame = 12
-- Work out the name of the member in the sprite that is now
-- under the mouse
vSpriteChannelUnderMouse = _movie.rollover()
vSpriteUnderMouse = sprite(vSpriteChannelUnderMouse)
vMemberUnderMouse = vSpriteUnderMouse.member
vNameOfMemberUnderMouse = vMemberUnderMouse.name
-- Do the names match?
if vNameOfMemberUnderMouse <> vExpectedMemberName then
Does this approach make sense to you?
Hello again Openspark and Thanks btw for your time helping a rookie, it is greatly appreciated. Programming is my weakest point, and i have to raise my skill in it.
Your approach make a lot of sense, and i'm going to see what i can do with that.
Expect some news about this by tomorrow, and if it is working, at the very least i will come to tell you
Well Openspark. It is working perfectly. There is just one thing.
My sprite on which i use that sprite have a total of 7 sprite that are on top of him, 7 button to be exact, and the script is working perfect for 1 button ( the one that is "8" of course). So i went to add
x6 with the right sprite number. What is happening is that only the last one in the list is now working, all the other got the bug back...
I don't think that duplicating the full script 7 time is the solution, and it seem i can't just add that small part of code to add the other sprite.
Thanks for the help, while i'll wait for your answer, i'll keep looking to find the solution myself, as i always do
Try these two changes:
vExpectedMemberName = "8"... to:vListOfMemberNames = ["8", "9", "10"] -- I'm just guessing here. You should use the actual names of the members2) Change...if vNameOfMemberUnderMouse <> vExpectedMemberName then... to:
if not vListOfMemberNames.getPos(vNameOfMemberUnderMouse) then
What does this do? The first change allows you to create a list of names. The second change allows you to check - using the .getPos() method for lists - whether the name of the member in the sprite under the mouse is in that list.
Warning: getPos() will return FALSE (or 0) if there is a difference in case. Try this in the Message window:
Do you see how all the case of each letter has to match for .getPos() to be able to find the string in the list?
For more information on how to use lists, you could look >here<.
Working Perfectly ! thanks !