0
我在我的Flash應用程序中設置了滑塊部件。這個滑塊有一些額外的我創建的影片剪輯。如何改變父母的滑塊中的動畫片段的寬度
從父時間軸中,我想更改滑塊中其中一個動畫片段的寬度。
我不能訪問子影片剪輯像我通常會(slider_mc.other_mc.width
),因爲它坐落在一個滑塊,它給了我這個錯誤:
ReferenceError: Error #1069: Property other_mc not found on fl.controls.Slider and there is no default value. at play_fla::MainTimeline/frame1()
有誰知道我怎麼能做到這一點?
感謝
編輯:
只是爲了進一步解釋:
滑塊組件實例名稱爲slider_mc
和other_mc
坐在滑塊影片剪輯內的影片剪輯。我需要從父級動畫片段改變other_mc
的寬度。
希望有所幫助。
我覺得你有點誤解。 'other_mc'位於'slider_mc'中。我想改變父母的'other_mc'。你提供的代碼不會起作用,因爲'other_mc'不在父代中。最初,我應該可以做'slider_mc.other_mc.width',但是因爲'slider_mc'是一個滑塊組件,它不起作用。 – user2981
請檢查我的編輯。 – user2981
Ahh ok我不確定如何或爲什麼要將滑塊組件放在滑塊組件中,但我想問題是other_mc不是Slider組件類定義的一部分。使用MovieClip(slider_mc).other_mc或slider_mc [「other_mc」]可能會爲您提供您想要的訪問 – dezza