VideoHive

To TL or not to TL

900 posts
  • Beta Tester
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • Netherlands
  • Referred between 50 and 99 users
  • Sold between 10 000 and 50 000 dollars
michelsteege says

Stage.align is for the whole file not for seperate movieclips, just remove them if you don’t use them :) i think only templates must be allowed to use it all other files that you load in one don’t need it.

In fact why should you use it? there is no need for :)

1389 posts
  • Beta Tester
  • Bought between 10 and 49 items
  • Exclusive Author
  • Grew a moustache for the Envato Movember competition
  • Has been a member for 4-5 years
  • Microlancer Beta Tester
  • Referred between 10 and 49 users
+3 more
Pdesignx says

i mostly use TL, especially in the files that needs movieclip aligning… it’s easy to handle
for example
with CC, you need this line of code to centerize;
assume that document size is 550*400

movieclip._x = (550 - movieclip._width) / 2;
which needs a value (550) that can be changed by the purchaser by changing document size but they can forget to change this 550 number in the code…

but if you use TL, you will need a line of code like that
movieclip._x = (Stage.width - movieclip._width) / 2;
which has all dynamic parameters and does not get effected by purchasers’ manipulation and will work in any condition…

that’s why i would prefer it… ;)

3869 posts Love & Light
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 6-7 years
  • Author had a File in an Envato Bundle
  • Most Wanted Bounty Winner
  • Interviewed on the Envato Notes blog
  • South Africa
+3 more
digitalscience says
Stage.align is for the whole file not for seperate movieclips, just remove them if you don’t use them :) i think only templates must be allowed to use it all other files that you load in one don’t need it. In fact why should you use it? there is no need for :)

so say you want to load in a swf e.g a news reader into a template, if you use, TL it’s going to jump to the top left so you’ll need a stageListener.onResize function which keeps the holder clip for the news swf in the middle of the template – is that what everyone is using to keep stuff in the centre?

900 posts
  • Beta Tester
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • Netherlands
  • Referred between 50 and 99 users
  • Sold between 10 000 and 50 000 dollars
michelsteege says

What i do is use a initWidth that is the width of the init stage size en calculate the new 0-0 points onResize then you don’t need Stage.align but in templates it can be verry handy if the template don’t need to be loaded into something :)

3869 posts Love & Light
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 6-7 years
  • Author had a File in an Envato Bundle
  • Most Wanted Bounty Winner
  • Interviewed on the Envato Notes blog
  • South Africa
+3 more
digitalscience says
What i do is use a initWidth that is the width of the init stage size en calculate the new 0-0 points onResize then you don’t need Stage.align but in templates it can be verry handy if the template don’t need to be loaded into something :)

I usually have stageW and stageH variables to start with if I’m not using “TL”, but usually there’s always issues when someone changes the document stage size without changing those initial variables – as Pdesignx said.

690 posts
  • Bought between 10 and 49 items
  • Canada
  • Exclusive Author
  • Has been a member for 6-7 years
  • Sold between 1 000 and 5 000 dollars
geoken says
so say you want to load in a swf e.g a news reader into a template, if you use, TL it’s going to jump to the top left so you’ll need a stageListener.onResize function which keeps the holder clip for the news swf in the middle of the template – is that what everyone is using to keep stuff in the centre?

Yeah.

When I make a file one of the first things I do is create a listener for the stage resize. This listener launches a function which in turn launches a second function which is responsible for the layout of my entire page.

The resize function contains a laundry list of movie clips along with their desired relative positioning (and sizing when necessary).

1092 posts
  • Bought between 10 and 49 items
  • Contributed a Blog Post
  • Elite Author
  • Exclusive Author
  • Has been a member for 6-7 years
  • Netherlands
  • Referred between 100 and 199 users
+2 more
jurgenv says

I’m using TL, especially when i’m using Fullscreen.

3869 posts Love & Light
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 6-7 years
  • Author had a File in an Envato Bundle
  • Most Wanted Bounty Winner
  • Interviewed on the Envato Notes blog
  • South Africa
+3 more
digitalscience says
so say you want to load in a swf e.g a news reader into a template, if you use, TL it’s going to jump to the top left so you’ll need a stageListener.onResize function which keeps the holder clip for the news swf in the middle of the template – is that what everyone is using to keep stuff in the centre?

Yeah.

When I make a file one of the first things I do is create a listener for the stage resize. This listener launches a function which in turn launches a second function which is responsible for the layout of my entire page.

The resize function contains a laundry list of movie clips along with their desired relative positioning (and sizing when necessary).

So with TL pretty much everything needs to be repositioned in a stageListener. Just seems like more work because without TL, if you leave stuff in the centre, it stays in the centre when you resize the swf. Although it’s alot more dynamic than having to defined you’re initial stage dimensions first. In 2 minds about it but gonna give it a try :P

438 posts
  • Attended a Community Meetup
  • Author had a Free File of the Month
  • Beta Tester
  • Bought between 50 and 99 items
  • Elite Author
  • Exclusive Author
  • Gold Mo Grower
  • Has been a member for 5-6 years
+4 more
dxc381 says

I almost always use tl but cc has its place.

690 posts
  • Bought between 10 and 49 items
  • Canada
  • Exclusive Author
  • Has been a member for 6-7 years
  • Sold between 1 000 and 5 000 dollars
geoken says
So with TL pretty much everything needs to be repositioned in a stageListener. Just seems like more work because without TL, if you leave stuff in the centre, it stays in the centre when you resize the swf. Although it’s alot more dynamic than having to defined you’re initial stage dimensions first. In 2 minds about it but gonna give it a try :P

For me it works because I rarely have things perfectly centered. They’re usually slightly offset to account for a header or a side navigation panel. I also usually size things based off the stage size (ie width of header, width/height of content page) so the listener would be there anyway.

by
by
by
by
by