Copy link to clipboard
Copied
Hello,
i am trying to flip an object horizontally. I tried the 'themaan.mc scaleX = -1' but it does not seem to work. How can I flip an object horizontally and successfully?
Best,
Cagri Kasap
Copy link to clipboard
Copied
If what you show is what you wrote, that might be part of the problem.
themaan.mc scaleX = -1;
Without knowing how the object you intend should actually be targeted, here is more what it should look like...
themann.mc.scaleX = -1;
Copy link to clipboard
Copied
Hello,
no, no, the spelling is not the problem.
it should be: theman.mc.scaleX = -1;
but this is the one that does not work for me. I do not understand!
Copy link to clipboard
Copied
What is "mc"?
PS - spelling does appear to be a problem, for both of us. I misspelled it in the correction line. But you have yet to spell it the same. The point I was trying to make is that you missed having a period before the scaleX property.
Copy link to clipboard
Copied
movie clip (people usually use it on order to denote the 'instance name'). that is not important, flippinf horizontally is...
Copy link to clipboard
Copied
Knowing what mc is is very important. Are you trying to be difficult or are you just having a problem communicating? It is obviously a movieclip, but what is it relative to theman object?
Copy link to clipboard
Copied
It does not have any relativity.
the originial code is this:
theman.scaleX = -1.
I have put the mc in order to denote that it was the instance name of a movie clip. That is the general language used in these forums.
Now do you have anything to suggest?
Best,
Cagri Kasap
Copy link to clipboard
Copied
It is entirely relative. Simply adding "mc" to denote something has no basis in AS3. If that is your understanding of AS3 and the language used in these forums, your understanding is wrong. If there is not an object named "mc" inside an object named "theman", then your use of "mc" is wrong.
If the intention is to flip theman, then the original line of code you just showed is correct. If it does not work then you have not properly assigned the instance name "theman".
At this stage you probably need to indicate what error messages you are getting. If there is no object named "mc" you had to be getting an error, and since you haven't mentioned getting any, you probably need to.
Copy link to clipboard
Copied
hello
Copy link to clipboard
Copied
Please forget about the mc code. It even does not exist in the original
code. I do not understand why you got so entangled by it.
the code that I write is this: theman.scaleX = -1;
but when I hit the button that should do the horizontal flip, 'theman'
object disappears. It does not give any errors in the Output panel. Only
that the object disappears... And I even do not understand the reason why...
Please help if you can...
Copy link to clipboard
Copied
>>but when I hit the button that should do the horizontal flip, 'theman' object disappears.
Check the registration point of the clip. Sounds like it's working perfectly fine, but as you probably have the reg point out in nowhere land somewhere, when it flips it goes off screen and 'disappears'.
Copy link to clipboard
Copied
Hello,
Thank you for your suggestions but how can I change the registration point
at all? I think you could assign the registration point only when at the
very beginning of creating the symbol. If you want to change it later on,
you cannot change the registration point.
Am I not right?
Best,
Cagri Kasap
Copy link to clipboard
Copied
Hello,
Actually I do not think that the real problem is really that of the
registration point. I made the scale of the theman.object very small and
placed it at the very center of the screen. If it was moving off of the
screen when I was pressing the rotate.button, I am quiet sure that I would
be able to see it when it is reduced to such a small scale.
But I do not think that such is the case. When I press the rotate.button,
the theman.object disappears because the code is not working. theman.object
disappears in order to indicate that there is a problem. That is where the
problem is. I do not understand why the problem is like that either.
I would appreciate if somebody can help me.
Thank you for your time.
Best,
Cagri Kasap
Copy link to clipboard
Copied
I have been trying to get past the code aspect but your ignoring it altogether is of no help when you cannot explain it properly. The code you have shown, though varying constantly each time you show it, is correctly written except for the first time.
So if it is not the code then it is how you have implemented the objects. If you are not getting errors then that indicates something else other than how you name the object is the problem.
You just added new information saying the object disappears. My guess would be that Dave is correct. You have the object arranged within the symbol such that its origin is way off to the side somewhere so that when it flips, it flips out of view.