| Ultrashock Forums
• Re arrange duplicated movie clips |
|||
![]() |
||||
| Search this Thread | Thread Tools | Display Modes |
| 123> | Page 1 of 3 |
|
|
|||||||||||||||||||||||||
![]() |
Ultrashock Member Comments:
|
2005-09-29
#2 |
||
|
27 Creative Assets
|
2005-09-29
#3 |
||
|
my idea is like this. for example: i have 11 duplicated movieclips. if my Stage.width is 550 then the movieclips arrange like this ![]() if my Stage.width is 650 then the movieclips arrange like this ![]() it has to calculate the Stage.width and calculate how many clips can fit in it perfectly if they cant fit then it re arranges them. |
|
|
2005-09-29
#4 |
||
|
Here ye go ActionScript Code:
|
|
27 Creative Assets
|
2005-09-29
#5 |
||
|
thanks Codemonkey ill give it a try !
|
|
27 Creative Assets
|
2005-09-29
#6 |
||
|
it works great ! thanks man, one more thing, how can i make it to rearrange each time the Stage.width changes ?
|
|
|
2005-09-29
#7 |
||
|
I didn't know you could even do that, but here's the script anyway. ActionScript Code:
|
|
27 Creative Assets
|
2005-09-29
#8 |
||
|
you'r the man Codemonkey ! it works just had to add a this.onEnterFrame, thanks alot !
|
|
|
2005-09-29
#9 |
||
|
always a pleasure!
|
|
|
2005-09-30
#10 |
||
|
Thanks, monkey. Excellent. |
|
|
2005-09-30
#11 |
||
|
Nice code codemonkey, to improve performance instead of using an onEnterFrame you could add a listener to the Stage broadcaster and listen for the onResize event, as follows: ActionScript Code:
|
|
27 Creative Assets
|
2005-09-30
#12 |
||
|
InfinityI i tryed what you sayd and added the stage listener, but it seems like the for(); on the arrangeClips function is not being executed, because it doesnt trace, dont know whats the problem here is the code ActionScript Code:
|
|
|
2005-09-30
#13 |
||
|
hmm, it's working fine here?
|
|
27 Creative Assets
|
2005-09-30
#14 |
||
|
the clips arrange perfectly at first but they dont re-arrange when the stage resizes... dont know whats happening...
|
|
27 Creative Assets
|
2005-09-30
#15 |
||
|
i got it going, thanks again codemonkey
|
|
|
|
2006-04-17
#16 |
||
|
Originally posted by Codemonkey LOL! I didn't know you could even do that, but here's the script anyway. U2 are the coolest, CODE - thank you for your help on this and the backend stuff too! aaron |
|
|
|
2006-04-17
#17 |
||
|
how can make it change dynamiclly? when change the borswer size. the stage layout will change dynamiclly. i saw FWA web site have this feature. |
|
27 Creative Assets
|
2006-04-17
#18 |
||
|
look at the code CodeMonkey posted all you need to know its there
|
|
|
|
2006-04-17
#19 |
||
|
ActionScript Code:
All you need to do is create an object, and give it a function for the onResize event, so when the stage changes size, your function is called. Then you can access the new size with the Stage.width, and Stage.height properties. Also dont forget to set the scaleMode and stageAlign |
|
|
|
2006-04-17
#20 |
||
|
still not work for me.. i have manuelly refresh the page then the layouit will change |
|
|
2006-04-17
#21 |
||
|
I think you're missing something nelson. Put up some code and we'll take a look at it |
|
|
|
2006-04-17
#22 |
||
|
ActionScript Code:
anything wrong for my code testing when i change the borswer size. the stage layout never change unless i do the refresh manuelly. |
|
27 Creative Assets
|
2006-04-17
#23 |
||
|
you need to add this ActionScript Code:
|
|
|
|
2006-04-17
#24 |
||
|
i don't see the variable "movieclip", or "nr" being declared outside the arrangeClips function parameters?
|
|
27 Creative Assets
|
2006-04-17
#25 |
||
|
its declared when you create the grid ActionScript Code:
|
|
|
|
2006-04-17
#26 |
||
|
i'm added "arrangeClips(movieclip, nr)" on stage_lis.onResize but still the same. why ????????????????? |
|
|
|
2006-04-17
#27 |
||
|
they are instance variables local to the function correct? That means that they would not be accessible outside the function, unless they are set into vars that exist outside the function.. try this: ActionScript Code:
|
|
27 Creative Assets
|
2006-04-17
#28 |
||
|
if you created the clips like this ActionScript Code:
ActionScript Code:
|
|
|
|
2006-04-17
#29 |
||
|
finally...done !! thanks anik |
|
27 Creative Assets
|
2006-04-17
#30 |
||
|
glad you got it working !
|
|
|
2006-04-17
#31 |
||
I'm going to turn it into a neat class somewhere this week.
|
|
|
|
2006-04-17
#32 |
||
|
yeah! let me know if i can do anything to help, I would love to give it an official test run
|
|
27 Creative Assets
|
2006-04-18
#33 |
||
|
Originally posted by Codemonkey NICE !!
I'm going to turn it into a neat class somewhere this week.
|
|
|
2006-12-18
#34 |
||
|
got it working here. it's great. just wondering whether it can really work like theFWA, you know the gap between each thumb is adjustable according to the resized stage.width. And our gap between each thumb is set to a fixed number, is there a work around that? when the stage is resized, the gap between thumbs will also adjust themselves to make the thumbs on teh stage perfectly fit teh width of stage? hope I got myself clear. |
|
17 Creative Assets
|
2006-12-18
#35 |
||
|
This should do the trick. It will only work if you are using the entire stage for your thumbnails though: ActionScript Code:
I haven't looked at all of the code in this thread but I imagine that you can work that^ code into your own.
|
|
27 Creative Assets
|
2006-12-18
#36 |
||
|
Originally posted by Codemonkey we are still waiting I'm going to turn it into a neat class somewhere this week.
|
|
|
2006-12-19
#37 |
||
|
|
2006-12-19
#38 |
||
|
:)
that code is great!, once i needed something like that and i had to write it by myself, here is the code if you wanna take a look, is diferent from yours: ActionScript Code:
you can also download it here |
|
|
2006-12-20
#39 |
||
|
I was busy last week, just got back on this code today. Splat, I must let you down, 'cause I didn't manage to work your code out into my own. AS is indeed hard for my brain. ![]() What I want to archieve is this. The gap between thumbs are flexible as user resize the stage. And when the total extra gapx is greater than thumbs._width plus the minimal gapx (which I set to 15), we want add one column, otherwise if it's less than that we want to decrease one column. So as a result, when users drag to resize and stage you can see that the gap between thumbs are changing. And as they are increasing or decreasing to certain level we will add or remove one column from the stage. Hope I made myself clear. I came up with this code. Again, it's now working. Somebody help me have a look? ActionScript Code:
|
|
|
2006-12-25
#40 |
||
|
i know you guys are Christmasing
|
|
| 123> | Page 1 of 3 |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|


92 comments
| 4208 views


27



I'm going to turn it into a neat class somewhere this week.

Linear Mode
multiline Word Wrapping ?
But with movieclips ?