Sierena

Warper
Member
Joined
Jul 26, 2017
Messages
2
Reaction score
0
First Language
German
Primarily Uses
N/A
Hello,

i need help with my Plugin-Script,
i will make a movie(mp4)-layer(Sprite) under the title-menu-layer(Scene_Title).

Look picture :)
ezgdkfii.png


I want that the movie played behind the menu and not before it.
But the movie is always in front of it, how can I change this?

z index? layer position? Need help, nothing work :_)


In love, sierena
(PS. yeha, my English is very bad, sorry)
 
Last edited:

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,635
Reaction score
1,457
First Language
French
Primarily Uses
RMMV
Hello,

i need help with my Plugin-Script,

(PS. yeha, my English is very bad, sorry)
check in Scene_Title.prototype.createBackground
PHP:
Scene_Title.prototype.createBackground = function() {
    this._MyBackSpriteVideo = new Sprite...// you video objet <==
    this._backSprite1 = new Sprite(ImageManager.loadTitle1($dataSystem.title1Name));
    this._backSprite2 = new Sprite(ImageManager.loadTitle2($dataSystem.title2Name));
    this.addChild(this._MyBackSpriteVideo); //<== add you video sprite or objet or ..picture or .. what you whant
    this.addChild(this._backSprite1);
    this.addChild(this._backSprite2);
};

z index are not exist and is not like CSS. !
z-index is when you code in HTML&CSS
These according to the order when you add the children.
 
Last edited:

Dr.Yami

。◕‿◕。
Developer
Joined
Mar 5, 2012
Messages
1,004
Reaction score
760
First Language
Vietnamese
Primarily Uses
Other
You will need to use PIXI.Texture and PIXI.Sprite for loading the Video.

Code:
let videoTexture = PIXI.Texture.fromVideo('path/to/video')
let videoSprite = new PIXI.Sprite(videoTexture)

To add it into the scene, you need to addChild(videoSprite) in the Scene, there is no z-index so you need to addChild(videoSprite) before any other addChild in the Scene
 

Sierena

Warper
Member
Joined
Jul 26, 2017
Messages
2
Reaction score
0
First Language
German
Primarily Uses
N/A
Hi,
thanks Dr.Yami and Jonforum, its help me really.

My code at the moment :), play the movie in the front of all
the methode Graphics.loadMP4() -> load, play and loop the movie
Code:
    Scene_Title.prototype.createBackground = function() {
        this._myBackSpriteVideo = new Sprite(Graphics.loadMP4());

        this._backSprite1 = new Sprite(ImageManager.loadTitle2(parameters['backgroundFrame']));
        this._backSprite2 = new Sprite(ImageManager.loadTitle2(parameters['backgroundFrame']));

        this.addChild(this._myBackSpriteVideo);
        this.addChild(this._backSprite1);
        this.addChild(this._backSprite2);
    };

Its a Sprite, not the full movie, but in the background
Code:
    Scene_Title.prototype.createBackground = function() {
        var videoTexture = PIXI.Texture.fromVideo('movies/' + parameters['backgroundPicture'] + '.webm');
        var videoSprite = new PIXI.Sprite(videoTexture);

        this._MyBackSpriteVideo = new Sprite(Graphics.loadMP4());
        this._backSprite1 = new Sprite(ImageManager.loadTitle2(parameters['backgroundFrame']));
        this._backSprite2 = new Sprite(ImageManager.loadTitle2(parameters['backgroundFrame']));
        this.addChild(videoSprite);
        this.addChild(this._backSprite1);
        this.addChild(this._backSprite2);
    };


But i mean, i wont play the movie in the background of the Scene_title xP, not the Sprite.

ik6gbfsa.png
 

Negi-Mox

My hand got fractured!!
Veteran
Joined
Jun 19, 2017
Messages
140
Reaction score
33
First Language
English
Primarily Uses
RMVXA
OH No I can't understand anything:dizzy::dizzy::dizzy::dizzy::dizzy::dizzy::dizzy::dizzy::dizzy::dizzy::dizzy:..???
 

Skunk

Melody Master
Veteran
Joined
Mar 2, 2013
Messages
1,081
Reaction score
418
First Language
English/Slavic
Primarily Uses
RMMV
@Negi-Mox Please don't post just for the sake of posting, unless you have something to add to the discussion.
 

Latest Threads

Latest Posts

Latest Profile Posts

Evening humans! How goes the game make?
The anime characters we saw 20 years ago,
still have the same age when we see them now.
Somehow it's strange but also beautiful.
It's like no matter how much we change,
there's certain part of ourselves we can reconnect to when we see them again.
Took a long, long time, way longer than it should to be honest...but I've finally finished the big content update to my demo!
Lots of not good things happening IRL but I'm not gonna let this day end like this. Quote time:
"Success is not final, failure is not fatal: it is the courage to continue that counts." -Winston Churchill

So, keep going, lads. Whatever you do keep going. Until next time.

It's a Spanish devlog don't get scared!. (please)

Forum statistics

Threads
117,243
Messages
1,105,818
Members
153,411
Latest member
colonn
Top