Joe Aston Posted February 4, 2009 Report Share Posted February 4, 2009 (edited) hi im starting a web design unit in my ict course at collage i was wanting to having an image on the home page but i the image to move around in the frame. However the image will be larger than the frame so the part of the image that you see moves around.What i am wanting to know is the best way to get this affect i was thinking most likely will be flash.Cheers for any help.Joe Edited February 4, 2009 by Joe Aston Quote Link to comment Share on other sites More sharing options...
aener Posted February 4, 2009 Report Share Posted February 4, 2009 Yes - I'd agree with that, unfortunately for you. Quote Link to comment Share on other sites More sharing options...
The Hitcher Posted February 4, 2009 Report Share Posted February 4, 2009 If I understand that properly then yes flash would do that. Wouldn't be that hard to do, depending on how much, or what, movement the 'thing' was doing. Quote Link to comment Share on other sites More sharing options...
Revolver Posted February 4, 2009 Report Share Posted February 4, 2009 If you mean having the image animate so it moves around by itself, that's piss easy, it's just a few tweens.If you mean, having the image move and to control the motion with the mouse position, that's a bit harder. I say a bit, I mean if you've never really used flash or even if you've just not gone into actionscript, avoid this. Quote Link to comment Share on other sites More sharing options...
BONGO Posted February 4, 2009 Report Share Posted February 4, 2009 He's the saviour of the universe! Quote Link to comment Share on other sites More sharing options...
Revolver Posted February 4, 2009 Report Share Posted February 4, 2009 He'll save every one of us!Wahh, wahh, wahh wahh WAH! Quote Link to comment Share on other sites More sharing options...
Joe Aston Posted February 5, 2009 Author Report Share Posted February 5, 2009 got it sorted now was relativly easy when i found some tutorials. Quote Link to comment Share on other sites More sharing options...
Revolver Posted February 5, 2009 Report Share Posted February 5, 2009 What solution did you use? I want to see what you did. Quote Link to comment Share on other sites More sharing options...
BONGO Posted February 5, 2009 Report Share Posted February 5, 2009 I think he used Saline solution Quote Link to comment Share on other sites More sharing options...
Jitters Posted February 5, 2009 Report Share Posted February 5, 2009 (edited) Glad you got it sorted. I'd like to see what you came up with too. You working with AS 2.0 or 3.0?I would imagine I would have used a mask layer to make a frame over your image/map and scripted an onCLICK or similar so you could move the map inside the mask with the mouse. Post the AS if you would. I am learning about all this stuff now too and I like to see how people attack problems differently.Cheers! Edited February 5, 2009 by Tappets Quote Link to comment Share on other sites More sharing options...
Joe Aston Posted February 5, 2009 Author Report Share Posted February 5, 2009 stop(); var across:Number =2; var down:Number = 2; image_mc.addEventListener(Event.ENTER_FRAME, onEachFrame); function onEachFrame(e:Event):void { //move the image e.target.x += across; e.target.y += down; //dont move picture beyond start/end point if(e.target.x > mask_mc.x){ e.target.x = mask_mc.x; across *= -1; }else if(e.target.x < mask_mc.x - (e.target.width - mask_mc.width)){ e.target.x = mask_mc.x - (e.target.width - mask_mc.width); across *= -1; } if(e.target.y > mask_mc.y){ e.target.y = mask_mc.y; down *= -1; }else if(e.target.y < mask_mc.y - (e.target.height - mask_mc.height)){ e.target.y = mask_mc.y - (e.target.height - mask_mc.height); down *= -1; } }I got some help off a web design forum i got given that code and i just need to get round to adapting it to what i need. Im using as3. Quote Link to comment Share on other sites More sharing options...
Jitters Posted February 5, 2009 Report Share Posted February 5, 2009 Thanks Joe,Little more complicated than I had gathered, but looks like it makes sense. AS3.0 is kickin my arse, but I'll get it figured out.Thanks for sharing.-Cheers! Quote Link to comment Share on other sites More sharing options...
Revolver Posted February 5, 2009 Report Share Posted February 5, 2009 stop(); var across:Number =2; var down:Number = 2; image_mc.addEventListener(Event.ENTER_FRAME, onEachFrame); function onEachFrame(e:Event):void { //move the image e.target.x += across; e.target.y += down; //dont move picture beyond start/end point if(e.target.x > mask_mc.x){ e.target.x = mask_mc.x; across *= -1; }else if(e.target.x < mask_mc.x - (e.target.width - mask_mc.width)){ e.target.x = mask_mc.x - (e.target.width - mask_mc.width); across *= -1; } if(e.target.y > mask_mc.y){ e.target.y = mask_mc.y; down *= -1; }else if(e.target.y < mask_mc.y - (e.target.height - mask_mc.height)){ e.target.y = mask_mc.y - (e.target.height - mask_mc.height); down *= -1; } }I got some help off a web design forum i got given that code and i just need to get round to adapting it to what i need. Im using as3.Looks about right, all except for, I don't know AS3, just some AS2.f**king 3, why is it so different from 2!? Quote Link to comment Share on other sites More sharing options...
Danny Posted February 7, 2009 Report Share Posted February 7, 2009 f**king 3, why is it so different from 2!?Because 2 sucked Quote Link to comment Share on other sites More sharing options...
Revolver Posted February 7, 2009 Report Share Posted February 7, 2009 Pffft, maybe so...I'll have to leanr some 3 at some point, it's just annoying that at a quick glance, it is completely, totally different. Quote Link to comment Share on other sites More sharing options...
GlynnP Posted February 7, 2009 Report Share Posted February 7, 2009 Its because actionscript is based on the ECMAScript which java script and jscript are also based on.So when the ECMAScript / standards were updated so was everything based on it. Quote Link to comment Share on other sites More sharing options...
Revolver Posted February 7, 2009 Report Share Posted February 7, 2009 I see.I remember one of my tutors saying that it looks a whole lot more like javascrpit now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.