我有一个严重的问题,因为从创建问题到发现问题之间有 6 个月的间隔。早在年初,我就被要求在仅 Flash 的网站中添加一些图形并更改一些文本。该站点非常复杂,我当然没有/我没有达到从头开始创建此类代码的水平,但我确实有一些使用 Flash 的经验,并且似乎能够添加图形并更新一些内部文本。在添加图形的过程中,我不得不放大包含所有元素的 main_mc,包括新的元素。当时我不知道,但现在发现,更改 main_mc 符号的属性似乎禁用了在单独的 Main.ac 文件中创建的复杂补间操作。我没有碰主要。
这是我认为与此相关的类文件中的代码:
public function showSamples(event:Event = null):void
{
// create new timeline to allow us to move the desk elements back into place
showSamplesTimeline = new TimelineMax({onReverseComplete: resetSamples});
// create array of all desk elements
var deskElements:Array = /* of TweenMax */ [
TweenMax.to(main_mc.memorandum_mc, 1, {x: main_mc.memorandum_mc.x - 1700}),
TweenMax.to(main_mc.phone_mc, 1, {x: main_mc.phone_mc.x - 1700}),
TweenMax.to(main_mc.todo_mc, 1, {x: main_mc.todo_mc.x - 1900}),
TweenMax.to(main_mc.menuMask_mc, 1, {x: main_mc.menuMask_mc.x - 1700}),
TweenMax.to(main_mc.menu_mc, 1, {x: main_mc.menu_mc.x - 1700}),
TweenMax.to(main_mc.flags_mc, 1, {x: main_mc.flags_mc.x - 1700}),
TweenMax.to(main_mc.clocks_mc, 1, {x: main_mc.clocks_mc.x - 1700}),
TweenMax.to(main_mc.device_mc, 1, {x: main_mc.device_mc.x - 1700}),
TweenMax.to(main_mc.content_mc, 1, {x: main_mc.content_mc.x - 1700}),
TweenMax.to(main_mc.coffeeContainer_mc, 1, {x: main_mc.coffeeContainer_mc.x - 1700})
];
main_mc.printer_mc.translate_btn.mouseEnabled = false;
/*
var memorandumTween:TweenMax = ;
var memorandum_mc,
var phone_mc,
var todo_mc,
var menuMask_mc,
var menu_mc,
var flags_mc,
var clocks_mc,
main_mc.device_mc,
main_mc.content_mc,
main_mc.coffeeContainer_mc
*/
// tween all desk elements out out of the state somewhere...
showSamplesTimeline.insertMultiple(deskElements);
//showSamplesTimeline.insertMultiple(TweenMax.allTo(deskElements, 1, {x:-400}));
// bring in the printer element for printn' out samples... arrgh!
showSamplesTimeline.insert(TweenMax.fromTo(main_mc.printer_mc, 0.5, {x: 2000, y: -140},{x: 800, y: -140.0, delay: 0.25}));
showSamplesTimeline.append(TweenMax.to(main_mc.printer_mc, 0.5, {y: -340.0, delay: 0.25, onComplete: showGermanSample}));
}
/**
*
*/
public function showGermanSample():void
{
// create short reference to the loader content
var container = main_mc.printer_mc.paper_mc.getChildAt(0).contentLoaderInfo.content;
// move the scroller out of view
container.scroller.x = 2000;
// hide the english translation
container.germanContentDropShadow_mc.visible = false;
container.englishContentDropShadow_mc.visible = false;
container.content_mc.englishContent_mc.visible = false;
// tween the paper into view and when complete put the scroller next to the german sample
TweenMax.to(main_mc.printer_mc.paper_mc, 1, {
y: 443,
onComplete: function():void
{
container.scroller.x = 599;
container.germanContentDropShadow_mc.visible = true;
main_mc.printer_mc.translate_btn.mouseEnabled = true;
}
});
}
/**
*
*/
public function showEnglishSample(event:Event = null):void
{
// create short reference to the loader content
var container = main_mc.printer_mc.paper_mc.getChildAt(0).contentLoaderInfo.content;
// move the scroller out of view
container.scroller.x = 2000;
// move the paper to make room for the english content
TweenMax.to(main_mc.printer_mc.paper_mc, 0.5, {x: -454});
// show the english sample
container.content_mc.englishContent_mc.visible = true;
// tween the english sample into view and when complete put the scoller next to the english sample
TweenMax.from(container.content_mc.englishContent_mc, 1, {
y: -1000,
delay: 0.5,
onComplete: function():void
{
container.scroller.x = 1210;
container.englishContentDropShadow_mc.visible = true;
main_mc.printer_mc.translate_btn.mouseEnabled = false;
}
});
// tween the paper
TweenMax.to(main_mc.printer_mc.paper_mc, 0.5, {x: -142, delay: 1.5});
}
/**
*
*/
public function hideSamples(event:Event = null):void
{
// back to the future
showSamplesTimeline.reverse();
}
/**
*
*/
public function resetSamples(event:Event = null):void {
// unload sampleContentLoader
sampleContentLoader.unload();
// reset position
main_mc.printer_mc.paper_mc.x = 164;
main_mc.printer_mc.paper_mc.y = -600;
trace(main_mc.printer_mc.x);
trace(main_mc.printer_mc.y);
// remove loader content
main_mc.printer_mc.paper_mc.removeChildAt(0);
// kill tweens
showSamplesTimeline.kill();
}
冒着给我自己和我的客户带来一些公众尴尬的风险,但因为我真的可以使用帮助,这里是现场网站:(删除)
导航到(英文)服务 -> 示例。您可以单击按钮,例如 Legal,它将深入到示例主题。在旧的工作版本中,您将单击最后一个主题,例如诉讼,屏幕将动画到舞台右侧,您将看到一个看起来像是从打印机出来的英文文档的图像。然后用户可以点击翻译按钮,然后会出现第二张德语图像。单击“再次选择”将使您从舞台左转回到主屏幕。当然,这是行不通的。
我已经在开发位置放置了一个工作版本:(已删除)
我可能会在一天左右的时间内删除开发副本。
我真的很感谢一些帮助解决这个问题。
[编辑] 我可能应该补充一点,旧的 main_mc 是 2359x1692,而新的 main_mc 是 2967.65x1939.35。舞台上的位置是相同的:-800 x 0。不完全确定新尺寸是如何达到 6 个月前的,但需要放大以适应额外的图形元素。客户需要原始开发人员提供的大面积区域才能在宽屏显示器上看起来不错。
谢谢。