These forums are provided for community interactions only. For official support please submit a support ticket.

You are not logged in.

#151 2006-12-29 05:22:34

scampbell
New Member
Registered: 2006-11-11
Posts: 9

Re: I could achieve Ken burns effect in SlideShowPro

Good work ahavriluk! Thanks for solving this one - one of the reasons I hadn't moved one of the parts of my site over to 1.4.2. Though I've heard others call the effect "cheesy", its grown on me so really didn't want to do without it. Thanks again!

Offline

 

#152 2006-12-30 18:44:06

daniel_poon
New Member
Registered: 2006-04-10
Posts: 4

Re: I could achieve Ken burns effect in SlideShowPro

I am having problem with implementing this effect. I checked everything (e.g. change the ssp instance name to my_ssp, have the tweening version 1.20 .as file in the same directory, installed the tweening extension using Flash Extension Manager, run using Flash 8 Professional, compile as Actionscript 2.0 Flash 8, as well as following all the links on how to do it), and still the flash movie does not do Ken Burns effect. It just shows the slideshow as normal. I validated the actionscript and it has no errors.

I'd appreciate if any of you experts can give me some pointers. Is there anything else I missed?

Offline

 

#153 2006-12-31 16:23:24

zdiver
Member
Registered: 2006-12-07
Posts: 47

Re: I could achieve Ken burns effect in SlideShowPro

daniel-

My biggest "gotcha" was realizing I was renaming the instance of my_ssp in the library, but not on the stage, resulting in it not being loaded correctly.  Once I did this, i was able to get stuff moving correctly.  Also, I had so many "trial" versions in my directory, I wiped them out and started fresh.  Let me know if you'd like a folder of my FLA to get you going.

Offline

 

#154 2006-12-31 17:38:29

daniel_poon
New Member
Registered: 2006-04-10
Posts: 4

Re: I could achieve Ken burns effect in SlideShowPro

Hi zdiver, I did name the instance on the stage as 'my_ssp'. I am using v1.4.2, no previous demo version. I also tried naming the library and frame name as 'my_ssp' to no avail. I'll email you my fla now. You can also send me one that works to trouble shoot.

Offline

 

#155 2006-12-31 19:27:14

svrichard
Veteran Member
From: Canada
Registered: 2006-05-03
Posts: 197
Website

Re: I could achieve Ken burns effect in SlideShowPro

Daniel,

Not sure if this will help but from what I can read on. it does not work any longer with the new v1.4.2.

ahavriluk did provide a workaround with his code, but some are experiencing misalignment of the images. (myself included)
never know it might work for you;

ahavriluk wrote:

This is  the updated code for KB effect for 1.4.2:

Code:

#include "lmc_tween.as"
import flash.display.BitmapData;
// taille de la photo d'origine
ORIGINSCALE = 100;
// redimensionnement maximum
DESTINATIONSCALE = 110;
// Durée totale du tweening
TWEENDURATION = my_ssp.transitionPause + my_ssp.transitionLength * 2;
// durée du fade
FADEDURATION = my_ssp.transitionPause * 1000;
//
myListener = new Object ();
myListener.imageData = _imageData;
my_ssp.addEventListener ("imageData", myListener);
//
function _imageData (eventObject)
{
if (my_ssp.displayMode == 'Auto')
{
kenBurnsEffect ();
}
}
//
function kenBurnsEffect ()
{
loader1 = _root.my_ssp.sspro_mc.imgs_mc.loader1_mc;
loader2 = _root.my_ssp.sspro_mc.imgs_mc.loader2_mc;
//
if (my_ssp.thisLoader == loader1)
{
bitmapize (loader1);
with (loader1)
{
_xscale = ORIGINSCALE;
_yscale = ORIGINSCALE;
tween (['_xscale', '_yscale'], [DESTINATIONSCALE, DESTINATIONSCALE], TWEENDURATION, 'linear');
}
}
else if (my_ssp.thisLoader == loader2)
{
bitmapize (loader2);
with (loader2)
{
_xscale = DESTINATIONSCALE;
_yscale = DESTINATIONSCALE;
tween (['_xscale', '_yscale'], [ORIGINSCALE, ORIGINSCALE], TWEENDURATION, 'linear');
}
}
}
//
//
function bitmapize (imgContainer)
{
 myBitmap.dispose ();
myBitmap = new BitmapData (imgContainer._width, imgContainer._height, true, 0x00FFFFFF);
myBitmap.draw (imgContainer);
imgContainer.attachBitmap (myBitmap, 1, "auto", true);
}

Last edited by svrichard (2006-12-31 19:29:12)

Offline

 

#156 2007-01-01 04:48:12

daniel_poon
New Member
Registered: 2006-04-10
Posts: 4

Re: I could achieve Ken burns effect in SlideShowPro

Hi svrichard, that's what went wrong. Thanks for all you help. The new code worked with 1.4.2 and it just drives me nuts not able to figure this out before. Now I know the code has changed. Thanks to all who helped. I really appreciate the people for sharing and lending a helping hand.

Offline

 

#157 2007-01-03 01:20:26

rjfisk
New Member
Registered: 2006-11-25
Posts: 3

Re: I could achieve Ken burns effect in SlideShowPro

I am at the same place Daniel was a couple of days ago. But, I'm not sure how/where to name the instance of SSP as I'm new to Flash & SSP. I think I have the right code but when I Debug - my object path does not include my_ssp & I have not figured out how to name it correctly.

Offline

 

#158 2007-01-03 02:00:31

svrichard
Veteran Member
From: Canada
Registered: 2006-05-03
Posts: 197
Website

Re: I could achieve Ken burns effect in SlideShowPro

rjfisk,

Here is an outside link superdataman made for us to see the steps and how to(s) ;  http://www.web-mgt.com/ssp_tips/KenBurn … owPro.html
but keep in mind the code for the new version SSP 1.4.2 is above; the one I re-copied from ahavriluk.

Hope this helps. smile

Offline

 

#159 2007-01-03 05:12:20

rjfisk
New Member
Registered: 2006-11-25
Posts: 3

Re: I could achieve Ken burns effect in SlideShowPro

Thank you svrichard,
But I checked that and realized that I didn't know exactly how to do this:

5. Set the Instance Name for your SlideShowPro component to "my_ssp".

How to do it - is my question.

Offline

 

#160 2007-01-03 05:53:25

svrichard
Veteran Member
From: Canada
Registered: 2006-05-03
Posts: 197
Website

Re: I could achieve Ken burns effect in SlideShowPro

http://www.baie-aldouane-bay.com/ssp/my_ssp.jpg

Last edited by svrichard (2007-01-03 05:54:06)

Offline

 

#161 2007-01-04 00:53:06

rjfisk
New Member
Registered: 2006-11-25
Posts: 3

Re: I could achieve Ken burns effect in SlideShowPro

I've got it figured out.
Somehow I had SSP on the stage but not as an instance.
I deleted it & created an instance - compiled & it works.
Thanks for the hint!

Offline

 

#162 2007-01-12 01:36:16

drunknbass
New Member
Registered: 2006-05-20
Posts: 17

Re: I could achieve Ken burns effect in SlideShowPro

for some reason mine isnt working either.. are there any settings you have to set in the slideshow component to make this work? i have image scaling off, but tried other things too. i have the instance name my_ssp and i know it works cause i have external buttons and they work to control my slideshow instance. but this just loads my pics normal. i even have the .as in the same folder, and even tried putting the code in the movie directly to see if made a diff..

here is my code.

slideshw is in layer 1

ext button as is in layer 2
and this is in the top layer 3

Code:

#include "lmc_tween.as"
import flash.display.BitmapData;
// taille de la photo d'origine
ORIGINSCALE = 100;
// redimensionnement maximum
DESTINATIONSCALE = 110;
// Durée totale du tweening
TWEENDURATION = my_ssp.transitionPause + my_ssp.transitionLength * 2;
// durée du fade
FADEDURATION = my_ssp.transitionPause * 1000;
//
myListener = new Object ();
myListener.imageData = _imageData;
my_ssp.addEventListener ("imageData", myListener);
//
function _imageData (eventObject)
{
if (my_ssp.displayMode == 'Auto')
{
kenBurnsEffect ();
}
}
//
function kenBurnsEffect ()
{
loader1 = _root.my_ssp.sspro_mc.imgs_mc.loader1_mc;
loader2 = _root.my_ssp.sspro_mc.imgs_mc.loader2_mc;
//
if (my_ssp.thisLoader == loader1)
{
bitmapize (loader1);
with (loader1)
{
_xscale = ORIGINSCALE;
_yscale = ORIGINSCALE;
tween (['_xscale', '_yscale'], [DESTINATIONSCALE, DESTINATIONSCALE], TWEENDURATION, 'linear');
}
}
else if (my_ssp.thisLoader == loader2)
{
bitmapize (loader2);
with (loader2)
{
_xscale = DESTINATIONSCALE;
_yscale = DESTINATIONSCALE;
tween (['_xscale', '_yscale'], [ORIGINSCALE, ORIGINSCALE], TWEENDURATION, 'linear');
}
}
}
//
//
function bitmapize (imgContainer)
{
 myBitmap.dispose ();
myBitmap = new BitmapData (imgContainer._width, imgContainer._height, true, 0x00FFFFFF);
myBitmap.draw (imgContainer);
imgContainer.attachBitmap (myBitmap, 1, "auto", true);
}

that code was cut and pasted directly from the latest updated code on here.

Offline

 

#163 2007-01-12 02:47:25

drunknbass
New Member
Registered: 2006-05-20
Posts: 17

Re: I could achieve Ken burns effect in SlideShowPro

ok i got it to work by changing me ssp version.. now i have a problem... it works on my pc but when itsonline it doesnt work unless i remove this line

myBitmap = new BitmapData (imgContainer._width, imgContainer._height, true, 0x00FFFFFF);

and i did import the class on the first line or so. and it works on my computer why not online? do i have to upload the class?

and if i take that line out the picture is really pixelated.

also i have external prev and next buttons. and when i click them the effect stops and the image just sits there and the slideshow isnt going anymore.

Offline

 

#164 2007-02-02 12:51:09

Gogoud
New Member
Registered: 2006-03-15
Posts: 6

Re: I could achieve Ken burns effect in SlideShowPro

I'm having a problem with scaling when using the Ken Burns effect. The image scaling 'crop to fit' and 'scale' options don't seem to work correctly, at any rate with source images that are not the correct aspect ratio. They work fine without the Ken Burns effect, of course.

I think the kenBurnsEffect code is working with the width and height of the source bitmap image rather than the cropped or scaled sizes and so the cropping/scaling gets lost.

I'm using ahavriluk's amended code in this thread and SSP 1.4.2

Thanks for any help!

Offline

 

#165 2007-02-15 13:33:44

Stufreeze
New Member
From: Hertfordshire
Registered: 2006-03-15
Posts: 2
Website

Re: I could achieve Ken burns effect in SlideShowPro

Has anyone got this working with 1.4.4, I've tried the code and can't seem to get the effect to work? sad

Offline

 

#166 2007-02-15 21:42:10

rbreakall
Member
From: USA
Registered: 2006-07-18
Posts: 44
Website

Re: I could achieve Ken burns effect in SlideShowPro

I have the same problem with 1.44.  I haven't looked at the new 1.44 code but it could be something simple.  If someone figures it out before me, please post it.


Photography site with SSP

--It's not who you are inside but what you do that defines you...

Offline

 

#167 2007-02-18 08:38:16

Gogoud
New Member
Registered: 2006-03-15
Posts: 6

Re: I could achieve Ken burns effect in SlideShowPro

Todd has changed the name of the displayMode property, it now has an underscore in front of it. To get KBE working with SSP 1.4.4, alter the line:

Code:

if ((my_ssp.displayMode == 'Auto')

to read:

Code:

if ((my_ssp._displayMode == 'Auto')

I actually use:

Code:

if ((my_ssp._displayMode == 'Auto') && (eventObject.data.src.substr(-4,4) != '.swf'))

as you don't want to try KBE effect on slides that are actually flash movies

Incidentally, it seems to me that with KBE you can use GIF files as source and it works fine. GIF files don't work otherwise with SSP. Maybe this is because kingofpunk's clever KBE code bitmapizes the GIF.

Offline

 

#168 2007-02-21 16:30:57

rbreakall
Member
From: USA
Registered: 2006-07-18
Posts: 44
Website

Re: I could achieve Ken burns effect in SlideShowPro

I made this change and it still doesn't work for me.  Is there somewhere else you have to change it?


Photography site with SSP

--It's not who you are inside but what you do that defines you...

Offline

 

#169 2007-02-27 19:57:41

asarian
Senior Member
Registered: 2007-02-08
Posts: 92

Re: I could achieve Ken burns effect in SlideShowPro

rbreakall wrote:

I made this change and it still doesn't work for me.  Is there somewhere else you have to change it?

Nice effect. :) Cool site.

How did you add the music at the start, though? I'd like to implement that, too.

- Mark

Offline

 

#170 2007-02-27 20:57:27

digilee
Veteran Member
Registered: 2006-06-24
Posts: 1669

Re: I could achieve Ken burns effect in SlideShowPro

Correct me if I am wrong but isn't the music embedded into the fla itself, outside of ssp?

Offline

 

#171 2007-03-01 05:09:25

superdataman
New Member
From: Dillsburg, Pennsylvania, USA
Registered: 2006-10-04
Posts: 15
Website

Re: I could achieve Ken burns effect in SlideShowPro

I was able to get the Ken Burns effect to work using SSP 1.4.4 and the following code:

#include "lmc_tween.as"
import flash.display.BitmapData;
// taille de la photo d'origine
ORIGINSCALE = 100;
// redimensionnement maximum
DESTINATIONSCALE = 110;
// Durée totale du tweening
TWEENDURATION = my_ssp.transitionPause + my_ssp.transitionLength * 2;
// durée du fade
FADEDURATION = my_ssp.transitionPause * 1000;
//
myListener = new Object ();
myListener.imageData = _imageData;
my_ssp.addEventListener ("imageData", myListener);
//
function _imageData (eventObject)
{
if (my_ssp.displayMode == 'Auto')
{
kenBurnsEffect ();
}
}
//
function kenBurnsEffect ()
{
loader1 = _root.my_ssp.sspro_mc.imgs_mc.loader1_mc;
loader2 = _root.my_ssp.sspro_mc.imgs_mc.loader2_mc;
//
if (my_ssp.thisLoader == loader1)
{
bitmapize (loader1);
with (loader1)
{
_xscale = ORIGINSCALE;
_yscale = ORIGINSCALE;
tween (['_xscale', '_yscale'], [DESTINATIONSCALE, DESTINATIONSCALE], TWEENDURATION, 'linear');
}
}
else if (my_ssp.thisLoader == loader2)
{
bitmapize (loader2);
with (loader2)
{
_xscale = DESTINATIONSCALE;
_yscale = DESTINATIONSCALE;
tween (['_xscale', '_yscale'], [ORIGINSCALE, ORIGINSCALE], TWEENDURATION, 'linear');
}
}
}
//
//
function bitmapize (imgContainer)
{
myBitmap.dispose ();
myBitmap = new BitmapData (imgContainer._width, imgContainer._height, true, 0x00FFFFFF);
myBitmap.draw (imgContainer);
imgContainer.attachBitmap (myBitmap, 1, "auto", true);
}


I have updated my tutorial on how to implement the Ken Burns effect at:
http://www.web-mgt.com/ssp_tips/KenBurn … owPro.html

Last edited by superdataman (2007-03-01 06:07:30)

Offline

 

#172 2007-03-09 18:20:00

rbreakall
Member
From: USA
Registered: 2006-07-18
Posts: 44
Website

Re: I could achieve Ken burns effect in SlideShowPro

asarian wrote:

rbreakall wrote:

I made this change and it still doesn't work for me.  Is there somewhere else you have to change it?

Nice effect. smile Cool site.

How did you add the music at the start, though? I'd like to implement that, too.

- Mark

Mark,

I have 3 songs and 3 buttons (1, 2, 3).  I load the first song and set the volume level.  I then have a sound button that acts as a toggle button.  I pick which song I want to play when it loads and then I assign songs to each of the 3 buttons.  This is totally independent of slideshow pro.  I have a layer in flash called "audio" and these actions are in the first frame and there are fill in frames to cover the entire movie.  Below it eh code.

Code:

var mySound:Sound = new Sound();
mySound.loadSound("song1.mp3", true);
mySound.setVolume(100);
mySound.onSoundComplete = function() {
mySound.start();
}

vol_btn.onRelease = function(){
   var global_sound:Sound = new Sound();
   var volumelvl:Number = global_sound.getVolume();
   if (volumelvl != 0) {
      global_sound.setVolume(70);
   } else {
  global_sound.setVolume(0);
   }
}

song1_btn.onRelease = function(){
mySound.loadSound("song1.mp3", true);
mySound.setVolume(100);
mySound.onSoundComplete = function() {
mySound.start();
    }
}
song2_btn.onRelease = function(){
mySound.loadSound("song2.mp3", true);
mySound.setVolume(70);
mySound.onSoundComplete = function() {
mySound.start();
    }
}
song3_btn.onRelease = function(){
mySound.loadSound("song3.mp3", true);
mySound.setVolume(80);
mySound.onSoundComplete = function() {
mySound.start();
    }
}

Photography site with SSP

--It's not who you are inside but what you do that defines you...

Offline

 

#173 2007-03-09 18:31:40

rbreakall
Member
From: USA
Registered: 2006-07-18
Posts: 44
Website

Re: I could achieve Ken burns effect in SlideShowPro

superdataman wrote:

I was able to get the Ken Burns effect to work using SSP 1.4.4 and the following code:

#include "lmc_tween.as"
import flash.display.BitmapData;
// taille de la photo d'origine
ORIGINSCALE = 100;
// redimensionnement maximum
DESTINATIONSCALE = 110;
// Durée totale du tweening
TWEENDURATION = my_ssp.transitionPause + my_ssp.transitionLength * 2;
// durée du fade
FADEDURATION = my_ssp.transitionPause * 1000;
//
myListener = new Object ();
myListener.imageData = _imageData;
my_ssp.addEventListener ("imageData", myListener);
//
function _imageData (eventObject)
{
if (my_ssp.displayMode == 'Auto')
{
kenBurnsEffect ();
}
}
//
function kenBurnsEffect ()
{
loader1 = _root.my_ssp.sspro_mc.imgs_mc.loader1_mc;
loader2 = _root.my_ssp.sspro_mc.imgs_mc.loader2_mc;
//
if (my_ssp.thisLoader == loader1)
{
bitmapize (loader1);
with (loader1)
{
_xscale = ORIGINSCALE;
_yscale = ORIGINSCALE;
tween (['_xscale', '_yscale'], [DESTINATIONSCALE, DESTINATIONSCALE], TWEENDURATION, 'linear');
}
}
else if (my_ssp.thisLoader == loader2)
{
bitmapize (loader2);
with (loader2)
{
_xscale = DESTINATIONSCALE;
_yscale = DESTINATIONSCALE;
tween (['_xscale', '_yscale'], [ORIGINSCALE, ORIGINSCALE], TWEENDURATION, 'linear');
}
}
}
//
//
function bitmapize (imgContainer)
{
myBitmap.dispose ();
myBitmap = new BitmapData (imgContainer._width, imgContainer._height, true, 0x00FFFFFF);
myBitmap.draw (imgContainer);
imgContainer.attachBitmap (myBitmap, 1, "auto", true);
}


I have updated my tutorial on how to implement the Ken Burns effect at:
http://www.web-mgt.com/ssp_tips/KenBurn … owPro.html

Could you highlight the difference between this code and the "old" code?  I made the simple change they mentioned and it didn't work at all.  I guess I could just copy your code though and try it.  I will do that, but it would be good to know the difference, if you can point that out without me taking time to analyze it.  :-)

Thanks


Photography site with SSP

--It's not who you are inside but what you do that defines you...

Offline

 

#174 2007-03-09 20:19:46

superdataman
New Member
From: Dillsburg, Pennsylvania, USA
Registered: 2006-10-04
Posts: 15
Website

Re: I could achieve Ken burns effect in SlideShowPro

>>> Could you highlight the difference between this code and the "old" code?

Here are the lines that changed between the two scripts:

Previous Version: TWEENDURATION = my_ssp.imagePause + my_ssp.imageFade * 2;
New Version: TWEENDURATION = my_ssp.transitionPause + my_ssp.transitionLength * 2;

Previous Version: FADEDURATION = my_ssp.imagePause * 1000;
New Version: FADEDURATION = my_ssp.transitionPause * 1000;

Previous Version: loader1 = _root.my_ssp.sspro_mc.cont_mc.loader1_mc;
New Version: loader1 = _root.my_ssp.sspro_mc.imgs_mc.loader1_mc;

Previous Version: loader2 = _root.my_ssp.sspro_mc.cont_mc.loader2_mc;
New Version: loader2 = _root.my_ssp.sspro_mc.imgs_mc.loader2_mc;

Previous Version:
function bitmapize (imgContainer)
{
    myBitmap = new BitmapData (imgContainer._width, imgContainer._height, true, 0x00FFFFFF);
    myBitmap.draw (imgContainer);
    imgContainer.attachBitmap (myBitmap, 1, "auto", true);
}

New Version:
function bitmapize (imgContainer)
{
   myBitmap.dispose ();
   myBitmap = new BitmapData (imgContainer._width, imgContainer._height, true, 0x00FFFFFF);
   myBitmap.draw (imgContainer);
   imgContainer.attachBitmap (myBitmap, 1, "auto", true);
}

Offline

 

#175 2007-03-10 12:12:54

svrichard
Veteran Member
From: Canada
Registered: 2006-05-03
Posts: 197
Website

Re: I could achieve Ken burns effect in SlideShowPro

Thank for the update 'super~man',

Any chance you could point the 'how to' keep the effect .... centered ... in my SSP ?  Everything goes top and left when slide show  KB fx is on.

Thanks!

Offline

 

#176 2007-03-10 16:47:04

superdataman
New Member
From: Dillsburg, Pennsylvania, USA
Registered: 2006-10-04
Posts: 15
Website

Re: I could achieve Ken burns effect in SlideShowPro

>>> Any chance you could point the 'how to' keep the effect .... centered ... in my SSP ?

Do you have an example of what you don't like that I can see?

If I am interpreting your symptoms properly (would this be considered tele-medicine?), I noticed this also when my Flash document was larger than the photos. I wanted to display horizontal and vertical photos, so I made my Flash document square to be able to display either type of photo without cropping it. When I applied the Ken Burns Effect, the right & bottom edge of each photo sort of slides down-and-to-the-right or up-and-to-the-left. I don't prefer it.

On another slide show, I decided to only display vertical photos and made the Flash document the same size as my photos. When I applied the Ken Burns Effect, the photos zoomed in or out without the edges sliding because the photo gets cropped when it grows larger than the Flash document.

Here's an example of the Ken Burns Effect applied to a slide show that contains horizontal and vertical photos: http://www.fineartphotoinc.com/slidesho … tmas2.html

Here's an example of the Ken Burns Effect applied to a slide show that displays one type of photo (vertical photos in this case): http://www.fineartphotoinc.com/

If I've interpreted your question incorrectly please let me know. Thanks!

Offline

 

#177 2007-03-10 16:55:13

svrichard
Veteran Member
From: Canada
Registered: 2006-05-03
Posts: 197
Website

Re: I could achieve Ken burns effect in SlideShowPro

Right on! you've got it!  unfortunately I can't show you an example Because I'm having trouble setting SSP-Director but then again there is no need to show you since  you did clarify the way to go about it. Thanks Again !'

Regards,

Offline

 

#178 2007-03-11 14:29:31

asarian
Senior Member
Registered: 2007-02-08
Posts: 92

Re: I could achieve Ken burns effect in SlideShowPro

rbreakall wrote:

asarian wrote:

rbreakall wrote:

I made this change and it still doesn't work for me.  Is there somewhere else you have to change it?

Nice effect. :) Cool site.

How did you add the music at the start, though? I'd like to implement that, too.

- Mark

Mark,

I have 3 songs and 3 buttons (1, 2, 3).  I load the first song and set the volume level.  I then have a sound button that acts as a toggle button.  I pick which song I want to play when it loads and then I assign songs to each of the 3 buttons.  This is totally independent of slideshow pro.  I have a layer in flash called "audio" and these actions are in the first frame and there are fill in frames to cover the entire movie.  Below it eh code.

Code:

var mySound:Sound = new Sound();
mySound.loadSound("song1.mp3", true);
mySound.setVolume(100);
mySound.onSoundComplete = function() {
mySound.start();
}

vol_btn.onRelease = function(){
   var global_sound:Sound = new Sound();
   var volumelvl:Number = global_sound.getVolume();
   if (volumelvl != 0) {
      global_sound.setVolume(70);
   } else {
  global_sound.setVolume(0);
   }
}

song1_btn.onRelease = function(){
mySound.loadSound("song1.mp3", true);
mySound.setVolume(100);
mySound.onSoundComplete = function() {
mySound.start();
    }
}
song2_btn.onRelease = function(){
mySound.loadSound("song2.mp3", true);
mySound.setVolume(70);
mySound.onSoundComplete = function() {
mySound.start();
    }
}
song3_btn.onRelease = function(){
mySound.loadSound("song3.mp3", true);
mySound.setVolume(80);
mySound.onSoundComplete = function() {
mySound.start();
    }
}

Thank you very much for the code. I'm still kinda new with flash, so I really appreciate the example.

- Mark

Offline

 

#179 2007-03-13 20:43:41

rbreakall
Member
From: USA
Registered: 2006-07-18
Posts: 44
Website

Re: I could achieve Ken burns effect in SlideShowPro

superdataman wrote:

>>> Could you highlight the difference between this code and the "old" code?

Here are the lines that changed between the two scripts:

Previous Version: TWEENDURATION = my_ssp.imagePause + my_ssp.imageFade * 2;
New Version: TWEENDURATION = my_ssp.transitionPause + my_ssp.transitionLength * 2;

Previous Version: FADEDURATION = my_ssp.imagePause * 1000;
New Version: FADEDURATION = my_ssp.transitionPause * 1000;

Previous Version: loader1 = _root.my_ssp.sspro_mc.cont_mc.loader1_mc;
New Version: loader1 = _root.my_ssp.sspro_mc.imgs_mc.loader1_mc;

Previous Version: loader2 = _root.my_ssp.sspro_mc.cont_mc.loader2_mc;
New Version: loader2 = _root.my_ssp.sspro_mc.imgs_mc.loader2_mc;

Previous Version:
function bitmapize (imgContainer)
{
    myBitmap = new BitmapData (imgContainer._width, imgContainer._height, true, 0x00FFFFFF);
    myBitmap.draw (imgContainer);
    imgContainer.attachBitmap (myBitmap, 1, "auto", true);
}

New Version:
function bitmapize (imgContainer)
{
   myBitmap.dispose ();
   myBitmap = new BitmapData (imgContainer._width, imgContainer._height, true, 0x00FFFFFF);
   myBitmap.draw (imgContainer);
   imgContainer.attachBitmap (myBitmap, 1, "auto", true);
}

Thanks!  I'll have to put this in motion soon.


Photography site with SSP

--It's not who you are inside but what you do that defines you...

Offline

 

#180 2007-03-13 20:46:45

rbreakall
Member
From: USA
Registered: 2006-07-18
Posts: 44
Website

Re: I could achieve Ken burns effect in SlideShowPro

asarian wrote:

rbreakall wrote:

asarian wrote:


Nice effect. smile Cool site.

How did you add the music at the start, though? I'd like to implement that, too.

- Mark

Mark,

I have 3 songs and 3 buttons (1, 2, 3).  I load the first song and set the volume level.  I then have a sound button that acts as a toggle button.  I pick which song I want to play when it loads and then I assign songs to each of the 3 buttons.  This is totally independent of slideshow pro.  I have a layer in flash called "audio" and these actions are in the first frame and there are fill in frames to cover the entire movie.  Below it eh code.

Code:

var mySound:Sound = new Sound();
mySound.loadSound("song1.mp3", true);
mySound.setVolume(100);
mySound.onSoundComplete = function() {
mySound.start();
}

vol_btn.onRelease = function(){
   var global_sound:Sound = new Sound();
   var volumelvl:Number = global_sound.getVolume();
   if (volumelvl != 0) {
      global_sound.setVolume(70);
   } else {
  global_sound.setVolume(0);
   }
}

song1_btn.onRelease = function(){
mySound.loadSound("song1.mp3", true);
mySound.setVolume(100);
mySound.onSoundComplete = function() {
mySound.start();
    }
}
song2_btn.onRelease = function(){
mySound.loadSound("song2.mp3", true);
mySound.setVolume(70);
mySound.onSoundComplete = function() {
mySound.start();
    }
}
song3_btn.onRelease = function(){
mySound.loadSound("song3.mp3", true);
mySound.setVolume(80);
mySound.onSoundComplete = function() {
mySound.start();
    }
}

Thank you very much for the code. I'm still kinda new with flash, so I really appreciate the example.

- Mark

No problem, I am glad to help others as I know how I struggled when I first started.  If I were you, I would search out the flash tutorials online, they helped me out a lot.  I've used www.kirupa.com, actionscripts.org, learnflash.com and flashkit.com  Try those out.

I hope that helps,

Ray


Photography site with SSP

--It's not who you are inside but what you do that defines you...

Offline

 

#181 2007-03-14 13:05:00

cairoweb
New Member
Registered: 2007-01-24
Posts: 10

Re: I could achieve Ken burns effect in SlideShowPro

I've removed the line "myBitmap.dispose()" because it breaks the FADE transition


Any idea about how to center scale and zoomPane to (x,y) this effect?

Offline

 

#182 2007-03-19 14:23:24

zdiver
Member
Registered: 2006-12-07
Posts: 47

Re: I could achieve Ken burns effect in SlideShowPro

Anyone figure this out for 1.4.5?
I love the new versions, they just always break this.

Offline

 

#183 2007-04-10 16:18:25

zdiver
Member
Registered: 2006-12-07
Posts: 47

Re: I could achieve Ken burns effect in SlideShowPro

Would love to see this with the wet look flash file posted but can't for the life of me figure out what gets loaded when.
Anyone have luck with this & wet look, and willing to share your AS?

Last edited by zdiver (2007-04-10 18:21:37)

Offline

 

#184 2007-04-10 16:27:47

svrichard
Veteran Member
From: Canada
Registered: 2006-05-03
Posts: 197
Website

Re: I could achieve Ken burns effect in SlideShowPro

cairoweb wrote:

Any idea about how to center scale and zoomPane to (x,y) this effect?

From what I understand and been told, to achieve and create all images to be centered is to add a proportional backgrounds to your images, (vertical ones mostly).

PS; proportional backgrounds=to the relative size of your SSP component etc.

Offline

 

#185 2007-10-20 15:04:31

aleonzzz
New Member
Registered: 2007-06-22
Posts: 1

Re: I could achieve Ken burns effect in SlideShowPro

HI - I have followed this thread and found that as I have my stage set to dynamically resize my ssp and I use fullscreen mode that there was a problem with all the code here. Ken burns effect worked but the proportional resizing had stopped working.

So after several hours tweaking the way I got ken burns working with dynamically resizing and smooth scaling of my jpgs with image centering was using the following code. Hope it helps someone!

//loads of stuff for the ken burns effect
import flash.geom.Matrix;//needed for dynamic scaling and jpg smoothing
import flash.display.BitmapData;

// Original Scale
ORIGINSCALE = 100;
// ReScale Maximum
DESTINATIONSCALE = 110;


//Total Duration For Tweening
TWEENDURATION = ssp.transitionPause + ssp.transitionLength * 4;
// Fade Duration
FADEDURATION = ssp.transitionPause  * 1000;
//SSP movie size we use this later to center images properly
sspratio = 549/362.6;//the original dimensions of my ssp photo area
toh = Math.floor(Stage.height);//assumes you are using ssp to full screen - you could use ssp height instead
var ssp_width:Number = Math.floor(toh*sspratio);//you need to recalculate this onresize of the stage
//once KBE is used on images their scale is larger so I use KBE2 for the rest of the images
second_time;



myListener = new Object ();
myListener.imageData = _imageData;
ssp.addEventListener ("imageData", myListener);

function _imageData (eventObject){
    //moved assign loaders to here so can use everywhere
    loader1 = _root.ssp.sspro_mc.imgs_mc.loader1_mc;
    loader2 = _root.ssp.sspro_mc.imgs_mc.loader2_mc;
    toh = Math.floor(Stage.height) - _global.offset;//feel free to change this number 40 gives space of a thumb navi
   
    if (_root.ssp.thisLoader ==loader1) {
        rat = loader1._width/loader1._height;
        _global.newscale = ((toh)/loader1._height);

    } else {
        rat = loader2._width/loader2._height;
        _global.newscale = ((toh)/loader2._height);
    }
    _global.newheight = toh;
    _global.newwidth = toh * rat;
   
    Math.floor(tohssp*picratiossp)
    if (ssp._displayMode == 'Auto'){
    //once KBE is used on images their scale is large so I used a different function for the rest of the images
        if (second_time==1) {
            kenBurnsEffect2 ();
        } else {
            kenBurnsEffect1 ();
        }
    } else {
        // this clears the KBE info when dispalyMode is set to manual, resizes images to 100%
        bitmapize (loader1);
        bitmapize (loader2);
        new mx.transitions.Tween(loader1, "_xscale", mx.transitions.easing.Regular.easeOut, 100, 100, 0, true);
        new mx.transitions.Tween(loader1, "_yscale", mx.transitions.easing.Regular.easeOut, 100, 100, 0, true);
        new mx.transitions.Tween(loader2, "_xscale", mx.transitions.easing.Regular.easeOut, 100, 100, 0, true);
        new mx.transitions.Tween(loader2, "_yscale", mx.transitions.easing.Regular.easeOut, 100, 100, 0, true);
        new_x = (ssp_width-loader1._width)/2;
        new mx.transitions.Tween(loader1, "_x", mx.transitions.easing.Regular.easeOut, new_x, new_x, 0, true);
        new_x = (ssp_width-loader2._width)/2;
        new mx.transitions.Tween(loader2, "_x", mx.transitions.easing.Regular.easeOut, new_x, new_x, 0, true);
    }
}

function kenBurnsEffect1 (){
    if (ssp.thisLoader == loader1){
        bitmapize (loader1);
        new mx.transitions.Tween(loader1, "_xscale", mx.transitions.easing.Regular.easeOut, ORIGINSCALE, DESTINATIONSCALE, TWEENDURATION, true);
        new mx.transitions.Tween(loader1, "_yscale", mx.transitions.easing.Regular.easeOut, ORIGINSCALE, DESTINATIONSCALE, TWEENDURATION, true);

        // this compares image size to ssp_width to set x position for proper centering of horizontal images
        //var new_x = (ssp_width-(loader1._width*_global.newscale))/2;
        var new_x = (ssp_width-(loader1._width))/2;
       
        if (new_x < 0) { //so images don't end up to left of edge
            var new_x = 0;
        }
       
        // uses transition to move image to new x position
        new mx.transitions.Tween(loader1, "_x", mx.transitions.easing.Regular.easeOut, new_x, new_x, 0, true);

       
    }
    else if (ssp.thisLoader == loader2){
        bitmapize (loader2);
        new mx.transitions.Tween(loader2, "_xscale", mx.transitions.easing.Regular.easeOut, DESTINATIONSCALE, ORIGINSCALE, TWEENDURATION, true);
        new mx.transitions.Tween(loader2, "_yscale", mx.transitions.easing.Regular.easeOut, DESTINATIONSCALE, ORIGINSCALE, TWEENDURATION, true);
       
        // this compares image size to ssp_width to set x position for proper centering of horizontal images
        //var new_x = (ssp_width-(loader2._width*_global.newscale))/2;
        var new_x = (ssp_width-(loader2._width))/2;
        if (new_x < 0) {
            var new_x = 0;
        }
     
        // this compares image size to ssp_width to set x position for proper centering of horizontal images
        new mx.transitions.Tween(loader2, "_x", mx.transitions.easing.Regular.easeOut, new_x, new_x, 0, true);
        second_time=1; //so we use KenBurnsEffect2 with the rest of the images
    }
   
}

function kenBurnsEffect2 (){
    // this is same as previous KBE func just defines new_x before bitmapizing
    if (ssp.thisLoader == loader1){
        var new_x = (ssp_width-(loader1._width*_global.newscale))/2;   
        if (new_x < 0) {
            var new_x = 0;
        }
       
        bitmapize (loader1);
        new mx.transitions.Tween(loader1, "_xscale", mx.transitions.easing.Regular.easeOut, ORIGINSCALE, DESTINATIONSCALE, TWEENDURATION, true);
        new mx.transitions.Tween(loader1, "_yscale", mx.transitions.easing.Regular.easeOut, ORIGINSCALE, DESTINATIONSCALE, TWEENDURATION, true);
        new mx.transitions.Tween(loader1, "_x", mx.transitions.easing.Regular.easeOut, new_x, new_x, 0, true);
   
       
    }
    else if (ssp.thisLoader == loader2){
        var new_x = (ssp_width-(loader2._width*_global.newscale))/2;
        if (new_x < 0) {
            var new_x = 0;
        }
       
        bitmapize (loader2);
        new mx.transitions.Tween(loader2, "_xscale", mx.transitions.easing.Regular.easeOut, DESTINATIONSCALE, ORIGINSCALE, TWEENDURATION, true);
        new mx.transitions.Tween(loader2, "_yscale", mx.transitions.easing.Regular.easeOut, DESTINATIONSCALE, ORIGINSCALE, TWEENDURATION, true);
        new mx.transitions.Tween(loader2, "_x", mx.transitions.easing.Regular.easeOut, new_x, new_x, 0, true);
    }
}

function bitmapize (imgContainer){


    //create a transformation matrix that will scale the bitmap
    scaleMatrix = new Matrix();
    scaleMatrix.scale(_global.newscale,_global.newscale);
   
    myBitmap = new BitmapData (imgContainer._width, imgContainer._height, true, 0x00FFFFFF);
    //create 2nd bitmap to correct new scaled size
    myBitmapfinal = new BitmapData (_global.newwidth, _global.newheight, true, 0x00FFFFFF);
    myBitmap.draw (imgContainer);
    //draw final bitmap from first larger one and use scale matrix to smooth
    myBitmapfinal.draw (myBitmap,scaleMatrix,undefined,undefined,undefined,true);
    imgContainer.attachBitmap (myBitmapfinal, 1, "auto", true);
   
   
   
}

Last edited by aleonzzz (2007-10-20 21:40:26)

Offline

 

#186 2009-01-18 20:10:30

sydlow
Member
Registered: 2008-03-30
Posts: 50

Re: I could achieve Ken burns effect in SlideShowPro

Hi aleonzzz - I'm trying to get Ken Burns and a dynamically resized stage working too.
I've tried to add your code but it's not doing anything.

Have you got a web site you've got this working on? I'd love to see it working.

Syd

Offline

 

#187 2009-01-30 05:40:57

wiliani
Member
Registered: 2006-06-06
Posts: 32

Re: I could achieve Ken burns effect in SlideShowPro

KBE and scaling what is the deal?
How could we make KBE and scale up work with "full screen"  view?

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson