Adobe Dreamweaver Forums



Last 10 THreads :         Spry Accordion (Last Post : New2CSS - Replies : 2 - Views : 8 )           »          Downloading from Flash (Last Post : davey darch - Replies : 0 - Views : 1 )           »          Problem to link some See Also keyword topics (Last Post : GPWriter - Replies : 0 - Views : 1 )           »          How to change administrators (Last Post : ThinkInk - Replies : 1 - Views : 3 )           »          Garbage and Remoting (Last Post : banana.tropicale - Replies : 0 - Views : 1 )           »          Simple Web browser (Last Post : Milo[HUN] - Replies : 0 - Views : 1 )           »          Templates without Dreamweaver (Last Post : ThinkInk - Replies : 1 - Views : 3 )           »          How to use node's child text as the dataField inDataGrid (Last Post : Confucius- - Replies : 0 - Views : 1 )           »          Contribute start up time (Last Post : ThinkInk - Replies : 12 - Views : 13 )           »          Contribute CS4 Sloooooooooow (Last Post : Stewart Design - Replies : 7 - Views : 8 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Director > Lingo
 
Tags:



Reply
  #1 (permalink)  
Old 10-14-2008, 05:01 PM
Bob220867
 
Posts: n/a
Diggs:
Default Film loops and rotation

I have a character that is seen from the top and I can move and rotate it - as
long as it is a single image. However, I've put together a 4 frame film loop
and the film loop won't rotate. Is there any way to do that - rotate a film
loop? Can I get at the sprites in the film loop instead? I can use an animated
gif but the line quality is a bit rubbish. Would a small linked movie be
controllable? Any other suggestions?

Thanks



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-14-2008, 07:21 PM
Production Monkey
 
Posts: n/a
Diggs:
Default Re: Film loops and rotation

You can get access to any of the loop's sprites through the loop-sprite's movie
property. Assuming you used sprite channel 1 for your 4 frame loop, then the
following behavior will rotate those sprites inside the film loop.

property pMovieSprite

on beginSprite me
pMovieSprite = sprite(me.spriteNum).movie.sprite(1)
end


on enterframe me
pMovieSprite.rotation = pMovieSprite.rotation + 10
end
--------------------------------------------------

In the property inspector select the "Film Loop" tab for your film loop member
and select the "Crop" and "Center" radio buttons. This will enable you to
resize the film loop sprite to fix any cropping issues.

Note: This will also work for LDMs - Linked Director Movies, if you want to
use these "Loops" across multiple movies.

Reply With Quote
  #3 (permalink)  
Old 10-14-2008, 10:01 PM
Bob220867
 
Posts: n/a
Diggs:
Default Re: Film loops and rotation

Thanks for this. The film loop consists of 4 (4 frame stills) sprites in a row
to suggest a walk cycle. I had a go with it but the sprite insists on
'switching back' to its original rotation before being set to the current
desired rotation. Presumably as it meets each sprite it has to correct it. I
tried a couple of different event handlers (enter, exit, prepareframe) but
didn't seem to make any difference. I may just have to settle for the animated
gif.

Reply With Quote


  #4 (permalink)  
Old 10-14-2008, 11:11 PM
Production Monkey
 
Posts: n/a
Diggs:
Default Re: Film loops and rotation

Right. The beginsprite is resetting the value.

If you use a behavior to cycle through the walk cycle images it should work.
You will need to call exitFrame directly on the sprite inside the film loop to
make it work though.

I know that is a bit cryptic. I'll try to post some code tomorrow if you have
not figured it out by then.

Here's a link to more details on how to control a film loop.
http://director-online.com/forums/re...0148#msg-10148

Reply With Quote
  #5 (permalink)  
Old 10-15-2008, 06:13 PM
Production Monkey
 
Posts: n/a
Diggs:
Default Re: Film loops and rotation

I threw together a basic image cycling behavior. To use it, place your walk
cycle images in their own folder. Drag the first image to the stage and attach
the behavior. You should have the same effect as a film loop, except now you
can rotate the sprite because it is not a film loop.

Depending on your needs you may want to create each movement cycle as a
seperate Director movie and then bring them into your main movie as linked
Director movies with the "scripts enabled" button checked. This would make
things more modular. If you take this route then the Rotation script I provided
will work.

-- image cycler

property pMe
property pCastName
property pImageCount
property pCurImageNum


on beginsprite me
pMe = sprite(me.spriteNum)
pCastName = castLib(pMe.member.castLibNum).name
pImageCount = castLib(pCastName).member.count
pCurImageNum = 1
end


on enterframe me
pCurImageNum = pCurImageNum + 1
if pCurImageNum > pImageCount then pCurImageNum = 1
pMe.member = member(pCurImageNum, pCastName)
end

Reply With Quote
  #6 (permalink)  
Old 10-16-2008, 07:15 PM
Bob220867
 
Posts: n/a
Diggs:
Default Re: Film loops and rotation

Hey PM
Thanks for the time you put in on this. There's always a way round Director's seeming (or actual) shortcomings.


Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 09:05 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk