Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to free video memory ?

New Here ,
May 23, 2013 May 23, 2013

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.

TOPICS
ActionScript
817
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
May 23, 2013 May 23, 2013

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 23, 2013 May 23, 2013

My bad, external.

I have a flvPlaybackComponent.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
May 23, 2013 May 23, 2013

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 23, 2013 May 23, 2013

I think i'm using frames, i'm still a newbie with flash

How do i set the source-propoerty via ActionScript ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
May 23, 2013 May 23, 2013

show a screenshot of your stage with both "slides" visible (you can upload images with the camera button of this editor)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 23, 2013 May 23, 2013

screenshot.png

Here, my frames are black and the video is also black before it plays, so you wont see anything. Hope that helps.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
May 23, 2013 May 23, 2013

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 23, 2013 May 23, 2013
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines