bimmerpost/
BMW M2 and 2-Series Coupe
BMW Garage BMW Meets Register Search Today's Posts Mark Forums Read
home
BIMMERPOST Universal Forums Off-Topic Discussions Board

Post Reply
 
Thread Tools Search this Thread
      08-18-2007, 02:30 PM   #1
Mark
Administrator
Mark's Avatar
7043
Rep
4,203
Posts

Drives: 1M
Join Date: Mar 2005
Location: USA

iTrader: (1)

Garage List
Any Adobe Flash experts on board?

I'm building a new homepage and some of it will use adobe flash, i'm learning this stuff from scratch and i'm running into some problems, any experts here that can help out? These are pretty basic questions.

I'll start of with this.

I have created 4 objects that are on the screen, when the mouse moves over one of the objects, i want the other 3 to move to the left of the screen. I've actually created a movie clip that does this movement. How do I tell the system to play the moveclip if the mouse is placed over object #1? Is there a better way to make the 3 other objects move over without using movieclips?

Thanks!
__________________
Appreciate 0
      08-18-2007, 02:50 PM   #2
DasBlitz
Major
DasBlitz's Avatar
United_States
65
Rep
1,141
Posts

Drives: bmw 328i 07
Join Date: Jan 2007
Location: new england

iTrader: (1)

Garage List
2007 328i  [0.00]
I might be able to help you out. I have to go to work but I will PM or post here when I can. I know some flash and plus I have friends who are gods at it.
__________________
Appreciate 0
      08-18-2007, 05:24 PM   #3
vivekk
THE Viv
vivekk's Avatar
England
189
Rep
4,743
Posts

Drives: 330i SE
Join Date: May 2005
Location: the North, UK

iTrader: (0)

Garage List
Quote:
Originally Posted by MarkE90M3 View Post
I'm building a new homepage and some of it will use adobe flash, i'm learning this stuff from scratch and i'm running into some problems, any experts here that can help out? These are pretty basic questions.

I'll start of with this.

I have created 4 objects that are on the screen, when the mouse moves over one of the objects, i want the other 3 to move to the left of the screen. I've actually created a movie clip that does this movement. How do I tell the system to play the moveclip if the mouse is placed over object #1? Is there a better way to make the 3 other objects move over without using movieclips?

Thanks!
Hi Mark.

I sometimes use Flash MX 2004, so I'll try to help.

Using movieclips would be the 'easiest' way to control the motion!

There can be a lot of sub-level work involved, but it works.

You can create an object, turn it into a movieclip & then re-use it in other moviclips, thereby 'layering' clips within others.

You need to use the behaviours panel to control the way user interaction affects any particular movie clip.

Create your movie clip as normal & use a 'stop();' in the first frame's action panel.
Then, create whatever you want to happen in that movieclip, in the subsequent frames.
Use the normal 'gotoAndPlay' action to control repetitive clip movement etc.

So, you should have a movieclip which has stopped on its first frame, with subsequent action on the following frames.

Stick the movieclip on the screen & then use the behaviours panel to control the interaction.

In the properties panel, call that 'instance' of the movieclip 'clip1'.

You need to setup an 'on roll over' & an 'on roll out' behaviour for the clip.

In Flash MX 2004, I click on the movieclip I want to affect, hit the '+' in the behaviour panel, -> Movieclip -> Goto & play at frame or label -> choose 'clip1' & choose 'relative' & frame '2'.
The behaviour should appear in the behaviour panel for that movieclip.
You can change the event to 'on release','on roll out','on roll over' etc

After you've done it, you should see something like this in the actions panel for the movieclip:

Quote:
on (rollOver) {

//Movieclip GotoAndPlay Behavior
this.gotoAndPlay("2");
//End Behavior

}
on (rollOut) {

//Movieclip GotoAndPlay Behavior
this.gotoAndPlay("1");
//End Behavior

}
So, when you roll the mouse over this 'clip1', that movieclip will go to its own frame 2 & continue playing until it reaches a stop();
When you roll your mouse off this 'clip1', that movieclip will go to its frame 1 & should stop there, if you've placed a stop(); in the actions panel for frame 2 of THAT particular movieclip.

If your behaviour for one particular movieclip needs to control a different movieclip, not 'within' the original movieclip, but on the 'root' level, say 'clip2' then you would replace the 'this' in the above example with '_root.clip2' eg _root.clip2.gotoAndPlay("2");

Here's what the actionscript might look like for 'clip1', if it was going to control the y-positions of 'clip2' & 'clip3':
Quote:
on (rollOver) {

//Movieclip GotoAndPlay Behavior
_root.clip2._y = 100; _root.clip3._y = 100;
this.gotoAndPlay("2");
//End Behavior

}
on (rollOut) {

//Movieclip GotoAndPlay Behavior
_root.clip2._y = 200; _root.clip3._y = 200;
this.gotoAndPlay("1");
//End Behavior

}
To make things easier, you can 'name' individual frames in the properties panel & use that name in the behaviours eg call frame 1 'start' & then replace ' this.gotoAndPlay("1");' with ' this.gotoAndPlay("start");'

If you edit any behaviour's actionscript manually, then it no longer appears in the behaviour panel, for the movieclip it's associated with.

You can set up the behaviour of each individual moviclip similarly to the above, changing the names of the other clips affected, positions etc

You can control a number of different ways in which movieclips work, using the behaviours panel.

I've knocked up a very quick example for you here.
Download the FLA file here.

PM me if you need any more help Mark.


All the best.

Viv
__________________
[TiAg ▪ Dakota Black ▪ Active steering ▪ Sports suspension ▪ 162s ▪ Sports seats ▪ Al trim ▪ Bi-Xenons ▪ F&R PDC NavPro ▪ Voice control ▪ Bluetooth ▪ 6CD Logic7]



Last edited by vivekk; 08-18-2007 at 06:50 PM..
Appreciate 0
Post Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



All times are GMT -5. The time now is 09:57 AM.




g87
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
1Addicts.com, BIMMERPOST.com, E90Post.com, F30Post.com, M3Post.com, ZPost.com, 5Post.com, 6Post.com, 7Post.com, XBimmers.com logo and trademark are properties of BIMMERPOST