• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

swf file is appearing on multiple pages of site.

New Here ,
Dec 02, 2013 Dec 02, 2013

Copy link to clipboard

Copied

how do i stop the swf file from appearing on other pages .. heres a pic of the code.Screen shot 2013-12-02 at 11.13.42 PM.png         

TOPICS
ActionScript

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 02, 2013 Dec 02, 2013

Copy link to clipboard

Copied

remove your loader from the display list:

myLoader.parent.removeChild(myLoader);

(and, if it's not longer needed, null it: myLoader=null; )

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 02, 2013 Dec 02, 2013

Copy link to clipboard

Copied

do i write this directly after the code or do i write it on all other pages of the site?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 02, 2013 Dec 02, 2013

Copy link to clipboard

Copied

tried it and i got this error Screen shot 2013-12-02 at 11.41.00 PM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 02, 2013 Dec 02, 2013

Copy link to clipboard

Copied

you put that code where/when you want to remove the loaded swf.  it makes no sense to add it where you did because myLoader hasn't even been added to the display list yet. 

that flash error is telling you that myLoader.parent is null because myLoader has not been added to any display object.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 02, 2013 Dec 02, 2013

Copy link to clipboard

Copied

what display object do i add it to?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 02, 2013 Dec 02, 2013

Copy link to clipboard

Copied

you're already adding it to the timeline that contains your code in your onComplete function:

addChild(myLoader);  // <- this adds myLoader to your timeline.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 02, 2013 Dec 02, 2013

Copy link to clipboard

Copied

wait it worked!! its just giving me error messages though..is that because the maintimeline doesnt understand the

myLoader.parent.removeChild(myLoader);

initailly because i havent loaded it yet?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 02, 2013 Dec 02, 2013

Copy link to clipboard

Copied

nothing will work after trying to remove myLoader before it's been added.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 05, 2013 Dec 05, 2013

Copy link to clipboard

Copied

now im getting these error meesages

scrnshot.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 05, 2013 Dec 05, 2013

Copy link to clipboard

Copied

remove line 28.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 05, 2013 Dec 05, 2013

Copy link to clipboard

Copied

got the same messages

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 05, 2013 Dec 05, 2013

Copy link to clipboard

Copied

LATEST

delete line 32 and change line 32 to call removesSWF instead of removeSWF

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines