Hi all
I have some text with a rollover event so an animation is played, but when it plays the film loop for the rollover is not in the same location as the original text, but the top left of it.
Any ideas?
Example:
The problem you're having is caused by your text and Film Loop having different regPoint. The regPoint of text is always point(0, 0), while regPoint of Film Loop is always dead centre of the Film Loop.
I am sorry (although it's not my fault!), but you cannot change the regPoint of either text or Film Loop. Film Loop needs to be updated seriously. It's so outdated. Incidentally I mentioned this recently in a forum where Macromedia person contributes - fingers crossed.
Meanwhile you can do this:
[tt]-- Behaviour script attached to a text Sprite
on mouseEnter me
sprite(me.spriteNum).member = member("Film Loop")
sprite(me.spriteNum).locH = sprite(me.spriteNum).locH + sprite(me.spriteNum).width/2
sprite(me.spriteNum).locV = sprite(me.spriteNum).locV + sprite(me.spriteNum).height/2
end mouseEnter
on mouseLeave me
sprite(me.spriteNum).member = member("text")
sprite(me.spriteNum).locH = sprite(me.spriteNum).locH - sprite(me.spriteNum).width/2
sprite(me.spriteNum).locV = sprite(me.spriteNum).locV - sprite(me.spriteNum).height/2
end mouseLeave
--[/tt]
Hope this works for you. (In practice it's better to store the offset values in properties.)
sorry for not replying sooner, but notifications where going to an email i havent been checking regularly sorry.
anyway i was using text, but then used the "Convert to bitmap" option, which is where the different regpoint you mention is.
For trial and error i deleted it all, then recreated the original text but as a bitmap using the inbuilt paint program (ctrl+5), and voila! it seems to have solved that problem.
If you don't mind i seem to have another problem.
I've got some text, and when you rollover with mouse it shows a film loop. The film loop was made using 3 sprites (layers in flash?). Im using the following code for rollover actions:
on mouseEnter
set the castnum of sprite 4 to 10
end
on mouseLeave
set the castnum of sprite 4 to 5
end
where sprite 4 is where the text is on the stage.
where cast num 10 is the film loop
where cast num 5 is the original text
basically the on MouseEnter works. but the mouseLeave doesnt, im assuming its because the filmloop was made using more than 1 sprite, but am unsure.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.