What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Help with flash!


spidey06

Member
Messages
11
Likes
1
Hi everyone,

I am trying to make a flash website using the same functions as this one http://events.q-dance.com.au/2011-09_17-september_defqon1/ but I have no idea how to make it move from left to right. I know that I have to put the background image(convert to movieclip) as 1 layer and put labels on them but I am unsure about the action script/coding needed.

If someone can pleasee help me with the coding and telling me the best way to make my website function transition left and right using buttons then it'll be very much appreciated! Thank you!! :D
 
I am not good at flash, but I wouldn't recommend it as it is hard to maintain and update layout, also not good for SEO.
I recommend Joomla or Wordpress.
 
Yeah I have to do it on flash though :/ just need to know what code to use to make each page transition left to right when go forward a page or backwards.
But thanks for the reply!
 
you probably want something like this applied to your background

Code:
[LIST=1]
[*]// "rota" is your movieclip/sprite


[*] 

[*]var dx : Number;

[*]var dy : Number;

[*] 

[*]stage.addEventListener( Event.ENTER_FRAME, checkMouse );

[*] 

[*]function checkMouse( evt : Event ) : void

[*]{

[*]	dx = mouseX - rota.x;

[*]	dy = mouseY - rota.y;

[*]	rota.rotation = (Math.atan2(dy, dx) * 180 / Math.PI);

[*]}

[/LIST]

That will rotate the screen around your mouse being in a fixed position.
 
Thanks for the code! I would also like to know if this code could be applied to function with buttons and what I'll need to do and for it to work? Not sure if you get what I mean but I want it to be like the example website above how it has buttons for each stage on the website (red,blue, orange, green and etc). Sorry but I need to have it explained to me in depth cos I'm not very good with coding :/
 
You would be better off having it all as 1 image buttons included but then create invisible buttons in flash bit like hotspots in dreamweaver make sure they are buttons and not movieclips when you convet them to symbols that way you can still have your roll over effects down and hot effects and actions.
 
First of all you have a typo in your code void should be 1 word not split into 2

secondly I would have thought if you had animation you would want a go to frame and play code like this.

photos.btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_8);

function fl_ClickToGoToAndPlayFromFrame_17(event:MouseEvent):void
{
gotoAndPlay("photos");
}


So for example your photos section on the timeline will be from frame 50 - 70 using your 20 frames per section (which seems a bit low for animation it will make your animation jumpy and really fast even with tweening.)

You will have the above code on the actions layer where the button first becomes visible

If you just leave it like this when you test your movie you will find it will just loop all the way through so to stop this for each content page of your site you need to add a stop(); action

so looking at your timeline this needs to be added on frame 19, 39,59 etc so 1 frame before you would like your go to and play actions to start. But it looks like you have an action there so I will assume this is it.

But this code is only for a site navigation going from content to content that has animation in the example site you gave has looping movie clips and a background sound track.
 
Oh cool sorry it took me several attempts to post my response site issues so never saw your post before mine until it was to late.
 

Back
Top