問題を作成してから問題を認識するまでに 6 か月のギャップがあるため、深刻な問題を抱えています。今年の初めに、Flash のみの Web サイトにグラフィックの追加とテキストの変更を依頼されました。サイトは非常に複雑で、私はそのようなコードをゼロから作成するレベルに達していませんでしたが、Flash の経験があり、グラフィックを追加して内部テキストの一部を更新できたようです。グラフィックを追加する過程で、新しい要素を含むすべての要素を含む main_mc を拡大する必要がありました。当時は不明でしたが、main_mc シンボルのプロパティを変更すると、別の Main.ac ファイルで作成された複雑な Tweening アクションが無効になったようです。メインには触れませんでした。
これに関連していると思われるクラスファイルのコードは次のとおりです。
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();
}
私自身と私のクライアントに公の場で恥をかかせる危険がありますが、私は本当に助けを使うことができたので、ここにライブのウェブサイトがあります: (削除されました)
(英語で) [サービス] -> [サンプル] に移動します。法務などのボタンをクリックすると、サンプル トピックにドリルダウンします。古い作業バージョンでは、訴訟などの最後のトピックをクリックすると、画面が右側にアニメーション化し、プリンターから出てきたように見える英語の文書の画像が表示されます。次に、ユーザーが翻訳ボタンを押すと、ドイツ語の 2 番目の画像が表示されます。[Choose Again] をクリックすると、ステージ左のアニメーションでプライマリ画面に戻ります。もちろん、これはうまくいきません。
動作中のバージョンを dev の場所に置きました: (削除済み)
おそらく 1 日かそこらで dev コピーを削除します。
これを整理するための助けをいただければ幸いです。
[編集] 古い main_mc は 2359x1692 で、新しい main_mc は 2967.65x1939.35 であることを付け加えておく必要があります。ステージ上の位置は同じです: -800 x 0. 6 か月前の現在のように、新しい寸法がどのように達成されたのか正確にはわかりませんが、余分なグラフィック要素に合わせて拡大する必要がありました. クライアントは、ワイドスクリーン モニターで見栄えを良くするために、元の開発者に広い領域を要求しました。
ありがとう。