Po stokroć przeogromne dzięki!
Ostatnie tylko pytanko,
kod pliku który chcę zmienić wygląda tak:
(function (lib, img, cjs, ss) {
var p; // shortcut to reference prototypes
// library properties:
lib.properties = {
width: 750,
height: 200,
fps: 25,
color: "#FFFFFF",
opacity: 1.00,
manifest: [
{src:"images/db.png?1473760814537", id:"db"}
]
};
lib.ssMetadata = [];
// symbols:
(lib.db = function() {
this.initialize(img.db);
}).prototype = p = new cjs.Bitmap();
p.nominalBounds = new cjs.Rectangle(0,0,750,200);
(lib.Klatkapośrednia2 = function(mode,startPosition,loop) {
this.initialize(mode,startPosition,loop,{});
// Warstwa 1
this.text = new cjs.Text("tekst do zmiany", "20px 'Arial'", "#FFFFFF");
this.text.lineHeight = 24;
this.text.lineWidth = 80;
this.text.parent = this;
this.text.setTransform(-39.7,-11.1);
this.timeline.addTween(cjs.Tween.get(this.text).wait(1));
}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-41.7,-13.1,83.5,26.4);
(lib.Klatkapośrednia1 = function(mode,startPosition,loop) {
this.initialize(mode,startPosition,loop,{});
// Warstwa 1
this.text = new cjs.Text("qwerty", "43px 'Arial'", "#FFFFFF");
this.text.lineHeight = 50;
this.text.lineWidth = 175;
this.text.parent = this;
this.text.setTransform(-87.5,-24);
this.timeline.addTween(cjs.Tween.get(this.text).wait(1));
}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-89.5,-26,179,52.1);
(lib.button = function(mode,startPosition,loop) {
this.initialize(mode,startPosition,loop,{});
// Warstwa 1
this.shape = new cjs.Shape();
this.shape.graphics.f().s("#A63100").ss(1,1,1).p("Eg/fgLUMB+/AAAIAAWpMh+/AAAg");
this.shape.setTransform(375,100,0.923,1.379);
this.shape_1 = new cjs.Shape();
this.shape_1.graphics.f("#00CC99").s().p("Eg/fALUIAA2oMB+/AAAIAAWog");
this.shape_1.setTransform(375,100,0.923,1.379);
this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.shape_1},{t:this.shape}]},3).wait(1));
}).prototype = p = new cjs.MovieClip();
p.nominalBounds = null;
(lib.rek = function(mode,startPosition,loop) {
this.initialize(mode,startPosition,loop,{});
// 750x200
this.instance = new lib.Klatkapośrednia2("synched",0);
this.instance.parent = this;
this.instance.setTransform(374.2,118.6);
this.instance.alpha = 0;
this.instance._off = true;
this.timeline.addTween(cjs.Tween.get(this.instance).wait(19).to({_off:false},0).to({alpha:1},8).wait(62));
// Reklama
this.instance_1 = new lib.Klatkapośrednia1("synched",0);
this.instance_1.parent = this;
this.instance_1.setTransform(-117,79.4);
this.timeline.addTween(cjs.Tween.get(this.instance_1).to({x:378,y:81.4},10,cjs.Ease.get(1)).to({x:373},8,cjs.Ease.get(1)).wait(71));
// db.png
this.instance_2 = new lib.db();
this.instance_2.parent = this;
this.timeline.addTween(cjs.Tween.get(this.instance_2).wait(89));
}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-206.5,0,956.5,200);
// stage content:
(lib.db_750x200_v1 = function(mode,startPosition,loop) {
this.initialize(mode,startPosition,loop,{});
// timeline functions:
this.frame_0 = function() {
this.target_button.addEventListener("click", fl_ClickToGoToWebPage);
function fl_ClickToGoToWebPage() {
window.open(clickTag, "_blank");
document.removeAllChildren();
document.update();
}
var parsed
= (document
.location
.href
.split('#')[1
]||'').split('&'); var params = parsed.reduce(function (params, param) {
var param
= param
.split('='); params
[param
[0
]] = decodeURIComponent
(param
.slice
(1
).join('=')); return params;
}, {});
var clickTag = params.clickTag;
/* ustawienie marginesu na 0 powinno być zawsze w pierwszej klatce */
var bodyStyle = document.body.style;
bodyStyle.margin = 0;
bodyStyle.padding = 0;
/* brak tła */
canvas.style.background='transparent';
bodyStyle.background='transparent';
}
// actions tween:
this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1));
// button
this.target_button = new lib.button();
this.target_button.parent = this;
this.target_button.setTransform(406.5,72.5,1,1,0,0,0,406.5,72.5);
new cjs.ButtonHelper(this.target_button, 0, 1, 2, false, new lib.button(), 3);
this.timeline.addTween(cjs.Tween.get(this.target_button).wait(1));
// Warstwa 1
this.instance = new lib.rek();
this.instance.parent = this;
this.instance.setTransform(375,100,1,1,0,0,0,375,100);
this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));
}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(168.5,99,957.5,202);
})(lib = lib||{}, images = images||{}, createjs = createjs||{}, ss = ss||{});
var lib, images, createjs, ss;
w liniach zawierających frazę potrzebuję tylko podmieniać TEKST do zmiany
this.text = new cjs.Text("TEKST do zmiany", "20px 'Arial'", "#FFFFFF");
Może coś zrobiłem nie tak, ale Twój skrypt wydaje mi się, że czyści inne dane?
Przepraszam, że jeszcze męczę. Obiecuję więcej już nie "marudzić"
dzięki!