저는 플래시 개발자가 아니지만 복사/텍스트가 올바르게 할당되지 않은 문제를 디버깅하고 있습니다. .as
파일에서 내 주요 콘텐츠 영역 텍스트가 업데이트되지 않는 이유는 무엇입니까? 참조가 잘못 되었습니까?
195 body.heading.htmlText = heading;
196 body.sectionheading.htmlText = nav_name;
197 body.subheading.htmlText = subheading;
198 body.subheading.htmlText = 'testtt';
그러나, 본체 복사하지 않습니다 :
180 body.textholder.myText.htmlText = 'mederTest';
내가 밖으로 모두 찾을 수있는 몇 가지 방법이있다 텍스트 영역 (할당 가능한
htmlText
이있는 요소)을 프로그래밍 방식으로? Flash 자체에서는 제목/부제목 개체를 선택할 수 없습니다. 캔버스에있는 것처럼 보이지 않습니다. 그들은 숨겨진 것처럼 보입니다.
편집 : 디버깅의 제 24 SWF에있어. 마침내 실제 텍스트를 업데이트해야합니다.
428 var bodyClip:MovieClip = eval("bodyparts.bodycontent_"+tmpclipname.id+"_0");
429 ExternalInterface.call("console.log" , bodyClip)
430 for (var p in bodyClip) {
431 ExternalInterface.call("console.log" , p)
432 ExternalInterface.call("console.log" , bodyClip[p])
433 ExternalInterface.call("console.log" , bodyClip[p])
434 for (var thing in bodyClip[p]) {
435 if (thing === 'htmlText') {
436 ExternalInterface.call("console.log" , 'OMG');
437 ExternalInterface.call("console.log" , bodyClip[p][thing])
438 }
439
440 if (thing === 'myText') {
441 ExternalInterface.call("console.log" , 'SUPEROMG');
442 ExternalInterface.call("console.log" , bodyClip[p][thing]['htmlText'])
443 }
444 ExternalInterface.call("console.log" , thing)
445 }
446 }
그것은 드릴 다운과 bodyClip은 '으로 myText'속성과 인스턴스를 가질 때, 나는 업데이트 할 것을 이잖아.
왜이 행이 업데이트되지 않습니까?
body.textholder.myText.htmlText = 'mederTest';
프로그래밍 방식으로 말해서, 내가 잘못된 개체/인스턴스를 참조 할 가능성이 높기 때문일 수 있습니다. .as
파일에 body
에 대한 참조가 없습니다.
첫 번째 .as
파일 또는 해당 전역 개체에 정의 된 것으로 가정 할 수 있습니다. 누구든지 내게 빌려 줄 수 있니?
그건 그렇고, 이것은 액션 스크립트 2입니다. 두 번째'.as '파일에서 업데이트해야한다는 점을 제외하고는 이전'.as'에서 업데이트해야 할 내용을 발견했기 때문에 제 질문을 업데이트했습니다. 나를 돕는 마음? –
아, 네 말이 맞아, 그건 AS2 야. 죄송합니다. 실제로 AS2에 대해 전혀 알지 못합니다. 귀하의 문제가 귀사의 문제와 매우 유사합니다 (편집에 게시 한 코드가 AS3에서 실제로 의미가 없음). 다행히도 도움을 줄 수있는 AS2 전문가가 있습니다. – Aaron