Tally List : mailing list management, archiving, and analysis
click for archive home
 
Archive of:
Flash
Macromedia Flash List
 
home
24 hour view
quick stats
weekly updates
 
all tallylists
corporate solutions
archive your favorite
help / feedback


Search the Tallylist search by keyword:

About Flash :
product's home
product's list home
 
  Archived TallyList / Flash: 
Subject: address syntax to loaded swf? vs MC?
Jefferis Peterson (35p/+0r)     Posted: Thursday 10 May 2001
This post: 57 views, +0 rating

I've run into a problem. I have a preloader MC on the main timeline of a PICT.swf

PICT.swf is loaded into SlideShowMC container and SlideShow is attached to the main timeline of CONTAINER MOVIE via a _.root.attachMovie command. I can get the preloader MC to work when I test the PICT.swf, but it fails when PICT.swf is loaded into SlideShow on the main timeline...

To repeat the hierachy from Top down: >PreloaderMC on maintimeline of PICT.swf movie ----> PICT.swf loaded into SlideShowMC ---->SlideshowMC attached to the root and main time line of CONTAINER MOVIE with a depth of 5

Here is the code for the preloaderMC in PICT.swf. I was told that since it is an MC in a swf, root refers to the root of SWF, not of the CONTAINER MOVIE, but this code is causing an endless loop on the main time line:

onClipEvent (enterFrame) { if (_root.getBytesLoaded()<=100) { this.display = "wait for it .."; } else if (_root.getBytesLoaded()>=_root.getBytesTotal()) { _root.play (); } else { this.display = int(_root.getBytesLoaded()/1000)+"k of "+int(_root.getBytesTotal()/1000)+"k"; } }

IS THIS _root. syntax address the root of PICT.swf or because it is loaded into an attached MC, is it addressing the root of the Main timeline?

I tried to address this by addressing the PICT.swf itself, but it didn't work. [You can't use PARENT can you, since PICT is a SWF and not an MC...????]

I then tried to address the SlideshowMC, but it didn't work either:

>onClipEvent (enterFrame) { > if (_root.SlideShow.getBytesLoaded()<=100) { > this.display = "wait for it .."; > } else if (_root.SlideShow.getBytesL >oaded()>=_root.SlideShow.getBytesTotal()) { > _root.SlideShow.play (); > } else { > this.display = int(_root.SlideShow.getBytesLoaded()/1000)+"k of >"+int(_root.SlideShow.getBytesTotal()/1000)+"k"; > } >}

-- Jefferis Kent Peterson www.PetersonSales.net Flash, Web Design and Marketing ICQ 19112253 _______ "Happy is the person who finds wisdom, and the one who gets understanding, for the gain from it is better than gain from silver and its profit better than gold." - Proverbs 3:13,14.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The Chinwag site carries a wealth of Flash resources. Find useful links, suggested reading and archives at:

** http://www.chinwag.com/flasher ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You are subscribed to flasher as: flash@tallylist.com To unsubscribe, email leave-flasher-479872H@lists.chinwag.com


Similar Subject Line Posts (+/- two weeks of this post)
address syntax to loaded swf? vs MC?  10 May 2001 (this post)   (57 v/ +0 r)
 

Send a reply to the Flash list!
click to send a reply! NOTE: Many lists will reject your post unless you have already registered with them. Also - don't forget the right account to send from (for those with multiple emails!)

Feedback: If this post was exceptionally helpful, please help by giving this post a positive review.

 

TallyList : copyright Ububik - 2000