Fade images and OnClick

  • PHANTASM
  • Born
  • Born
  • PHANTASM
  • Posts: 3
  • Loc: BAWLMORE, MERLIN

Post 3+ Months Ago

Hello,

I am a newb when it comes to Flash (mea culpa :wink: ). I have recently been tasked to design a graphic 600x250. The graphic needs to tween alpha 0 - 100 across 110 frames (for each of 4 images total). Therefore the effect I am looking for is like MSN.COM, where the one image on the home page changes/'tweens every 15 seconds. Once the changes occurs a different url is referenced to a different web page depending on what the picture displays.

I know how to tween but I know just a little when it comes to OnClick and pushing the user to a new page on every image change. Should I be jumping from scene to scene or doing it on the same stage?

For our sake let us say that I have 4 images that point to page1.htm, page2.htm,page3.htm and page4.htm. Thanks for your help and your consideration.

RG

Any help would be greatly appreciated!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Tchuki
  • Mastermind
  • Mastermind
  • Tchuki
  • Posts: 1774
  • Loc: Edinburgh

Post 3+ Months Ago

Code: [ Select ]
onClipEvent(mouseDown) {
if(this.hitTest(_root.xmouse, _root.ymouse, true)) {
if(this._alpha == 0) {
getURL("http://www.yourDomain.com/page1.htm", "_blank");
} else {
this._alpha = -10;
}
}
}
  1. onClipEvent(mouseDown) {
  2. if(this.hitTest(_root.xmouse, _root.ymouse, true)) {
  3. if(this._alpha == 0) {
  4. getURL("http://www.yourDomain.com/page1.htm", "_blank");
  5. } else {
  6. this._alpha = -10;
  7. }
  8. }
  9. }


That doesnt require tweening, all don my AS.

Tweening uses ALOT more CPU time than AS, I would advise you to look into AS.

People have different opinions on scenes. Personally I avoid them like the plague, prefer to dynamicaly load in my movies.
  • PHANTASM
  • Born
  • Born
  • PHANTASM
  • Posts: 3
  • Loc: BAWLMORE, MERLIN

Post 3+ Months Ago

Ok....

So now, since I won't be using be using a tween between graphics, how would I do this staggering each change over to 15 seconds for four images? How does it know which graphic to use? I am not 100% sure about how you would setup the stage so that this could be accomplished? Sorry about the detail, I am in a crunch to get this done.

Thanks for your help,
RG
  • Tchuki
  • Mastermind
  • Mastermind
  • Tchuki
  • Posts: 1774
  • Loc: Edinburgh

Post 3+ Months Ago

The AS works on the idea that it is placed in the actions panel of a mc [ Movie Clip ].

The line:
Code: [ Select ]
if(this.hitTest(_root.xmouse, _root.ymouse, true)) {

Checks to see whethe the mouse is currently over the mc at all.

Code: [ Select ]
if(this._alpha == 0) {

Checks to see what the current alpha level is of the mc.

Code: [ Select ]
this._alpha = -10;

Change this line to affect the speed in which the mc fades.
  • PHANTASM
  • Born
  • Born
  • PHANTASM
  • Posts: 3
  • Loc: BAWLMORE, MERLIN

Post 3+ Months Ago

Enigmatic! Outstanding Job! Thanks for all your help! If everyone here is this helpful, this is probably the best resource on the web! Your help is greatly appreciated!

RG

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 13 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.