Flash: Need Help Writing An 'If' Statment

This is a discussion on "Flash: Need Help Writing An 'If' Statment" within the Flash & Multimedia Forum section. This forum, and the thread "Flash: Need Help Writing An 'If' Statment are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 30th, 2007, 17:55
Up'n'Coming Member
Join Date: Jun 2006
Location: Northern Ireland, United Kingdom
Age: 22
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Antwan
Exclamation Flash: Need Help Writing An 'If' Statment

Hi guys,

I'm making a little flash movie for a website of mine, The box is going to be a sort of 'What i'm listening to lately' box with album covers in it, and as you scroll closer to an album cover, it will enlarge slightly and play a sample piece of audio.

I've uploaded the .fla file i've made to test the theory out for you to look at. Everything works correctly but theres one thing i'd like to change. I'd want that box to stop enlarging at 120%, currently as you roll closer to the centre of the clips, it goes up to 200%. I'd rather it stopped when the proximity got below 20, at 120% if you know what I mean. I'm having a mental block as to how i'd rewrite the if statement on the actions layer.

If you need any of the code explained i'd be happy too. Thanks in advance for any and all help!

Anthony
Attached Files
File Type: fla my_proximity.fla (4.57 MB, 12 views)
Reply With Quote

  #2 (permalink)  
Old Oct 1st, 2007, 00:02
alexgeek's Avatar
Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,769
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: Flash: Need Help Writing An 'If' Statment

how about,
onLoad, putting the size in a variable.
then finding 120% of it and putting that in a variable.
Then checking the size when the enlarging code happens.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #3 (permalink)  
Old Oct 1st, 2007, 16:42
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sgaspar11
Re: Flash: Need Help Writing An 'If' Statment

Code: Select all
  if (prox > 20) clip._xscale = 120;
  if (prox > 20) clip._yscale = 120;
Put this within your proximity function and see if it works. It'll just set limited on your movement of the movieclips, you can change the values as needed to goof around with it.

Cheers,

Scott
Last Blog Entry: Yay!? (Oct 8th, 2007)
Reply With Quote
  #4 (permalink)  
Old Oct 1st, 2007, 18:53
Up'n'Coming Member
Join Date: Jun 2006
Location: Northern Ireland, United Kingdom
Age: 22
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Antwan
Re: Flash: Need Help Writing An 'If' Statment

Thanks everyone for replying so far

Quote:
Originally Posted by Sgaspar11 View Post
Code: Select all
  if (prox > 20) clip._xscale = 120;
  if (prox > 20) clip._yscale = 120;
Put this within your proximity function and see if it works. It'll just set limited on your movement of the movieclips, you can change the values as needed to goof around with it.

Cheers,

Scott
That is sort of right, there are a few problems though, the clip has no enlarging action, it just immediately jumps to 120, where as the previous one enlarged as you got closer, also, if you jump BELOW 20, the size becomes huge again
Reply With Quote
  #5 (permalink)  
Old Oct 1st, 2007, 21:21
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sgaspar11
Re: Flash: Need Help Writing An 'If' Statment

Hmm ok, this will take some thinking - let me ask you this question, to maybe get your juices going.

Wth the if statements above, what could you replace the clip._xscale = 120; and clip._yscale = 120; with and instead make ot "ease" to that amount? maybe another math function?

I'll keep goofing around with it, always takes me a while to pick up someone else's code and get flying.

Cheers,

Scott
Last Blog Entry: Yay!? (Oct 8th, 2007)
Reply With Quote
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Blocks of writing Evilaussie Web Page Design 5 Jul 21st, 2007 13:50
Copy writing nate2099 Starting Out 7 Jun 19th, 2007 22:13
unset SESSION in an IF statment Andy K PHP Forum 7 Apr 27th, 2007 19:02
Writing an XML playlist?? DoghouseTV Other Programming Languages 0 Aug 14th, 2006 01:15
Help with select statment rocket468 Classic ASP 4 Dec 8th, 2005 15:55


All times are GMT. The time now is 14:57.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43