Copy link to clipboard
Copied
Hey,
I'm making a simple presentation, lets say with 2 slides.
In each slide, i've embeded a video from an external link, lets say video1 and video2.
In slide 1 i have :
video1.seek(0);
video1.play();
In slide 2 i have :
video2.seek(0);
video2.play();
I use the keyboard to go back and forth the slides.
My problem is when i go back and forth several times between two slides, the memory used keeps increasing.
Any solution ?
Thank you.
Copy link to clipboard
Copied
i've embeded a video from an external link
Is the video embedded or external? Can`t be both.
Anyway, it depends on what you use to show your videos:
if you have flvPlaybackComponent instead of having two players use only one and set the source-property via Actionscript
Copy link to clipboard
Copied
My bad, external.
I have a flvPlaybackComponent.
Copy link to clipboard
Copied
I'm making a simple presentation, lets say with 2 slides.
If by slides you mean "scenes", don`t use scenes, they are redundant/pointless in actioscript 3
Anything you can do with scenes, you can do with frames better.
In this case by using scenes you prevent yourself from being able to use one videoplayerinstance in your whole movie.
Copy link to clipboard
Copied
I think i'm using frames, i'm still a newbie with flash
How do i set the source-propoerty via ActionScript ?
Copy link to clipboard
Copied
show a screenshot of your stage with both "slides" visible (you can upload images with the camera button of this editor)
Copy link to clipboard
Copied
Here, my frames are black and the video is also black before it plays, so you wont see anything. Hope that helps.
Copy link to clipboard
Copied
if this picture shows what I suppose(12 instances of a flvplayback component) :
you dont need to use the same component multiple times to show multiple videos:
instead have one Layer where you put one FLVComponent that stretches over all 12 frames and set the sourceporperty of this component with actionscript.
so say your compoennt on stage is named "videoplayer".
in frame 1 yous have this:
videoplayer.source = "video1.flv"
videoplayer.seek(0);
videoplayer.play();
in frame 2 you write:
videoplayer.source = "video2.flv"
videoplayer.seek(0);
videoplayer.play();
etc.
Copy link to clipboard
Copied
I see. I'll try a couple of things.
Using your method when you change the source, it won't add ressources i suppose ? will it remove video1.flv ?
I have a lot to learn
Thank you for your help.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now