Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: flash 5 scale question
From: Mike S
Date: Fri, 4 Aug 2000 02:57:51 +0100

At 10:53 AM 8/3/2000 -0700, you wrote:
>>> can you set it where the area scales but the elements do not (similar
to the
>>> way frames can resize in html)?
>>
>> .... but you can create this behavior progromatically with scripting.
>
>Can you point me to a tutorial. This is my biggest fault with Flash - in
>fact the only reason I would use html (except that it's easily updateable).

Unfortunately I can't point you at any tutorials yet, however, it should be
possible in Flash 4 to still perform the illusion your looking for. The
action script
is pretty strait forward, if a bit messy. You'll need to perform some
simple rectangle mathdetermine the positions.

To create the illusion that a movie clip contains many little objects that
"flow" within in it you need to create an artifical layout system wherein
when ever the "parent" movie clip changes size/shape it recalculates the
positions of all it's "children" based on the new size/shape. Note that the
"children" are not actually inside the parent clip, this would cause
scaling whenever the parent resized. The children float above their parent.

For example: To create the behavior of a child tracking to the right hand
side (<foo align=right></foo>) of a parent clip just set the xpos to equal
the parents right edge minus the childs width.

If your trying to adjust positions and behaviors based on the size of the
flash plugin in the browser (a little harder...) then you have to use
javascript to report the plugin size as it changes. I've put a little
example of this up on my website. The example is at
http://www.onceuponatime.org/flash/Scaler.html and the source is at
http://www.onceuponatime.org/flash/Scaler.zip

Notice how the red ball stays the same, but the rest of the clip scales
when the browser window is resized. I'll leave positioning up to you ;)
Note that this may not work in Netscape....

--mikes

------------------
Michael S.
Sr. Software Engineer
Excite@Home

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Full flasher archive now available online at:
http://www.chinwag.com/flasher/archive.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: flash 5 scale question, Michael Dunn

Replies
  Re: FLASH: flash 5 scale question, Mike S
  Re: FLASH: flash 5 scale question, Michael Dunn

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]