Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

tween display above loaded swf

This is a discussion on tween display above loaded swf within the Actionscript 3.0 newbies forums, part of the Flash CS3 eng category; While I am loading a swf into a container (main.swf), I have a nice graphic page tween that I ...


Go Back   Forum Flash CS3 Flash CS4 > English Forums > Flash CS3 eng > Actionscript 3.0 newbies

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 16-10-07, 13:01
Member
 
Join Date: Jul 2007
Posts: 33
Rep Power: 0
jimbo is on a distinguished road
tween display above loaded swf

While I am loading a swf into a container (main.swf), I have a nice graphic page tween that I would like to cover the screen while the external swf is being loaded. I can run this tween that is in main.swf when the call is made to unload the current swf and load the new swf. BUT, the new swf loads on top of the animation. Can I set the layer of the animation so that it is on top, so that the animation hides the transition from the current swf to the new swf? ( it is an oil painter site, and he likes an animation I did that 'paints' the screen to hide the current page, and when the painted screen goes away, the new page is underneath.)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2 (permalink)  
Old 16-10-07, 13:09
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,486
Rep Power: 6
Flep is on a distinguished road
Re: tween display above loaded swf

You should ' play ' with swapChildren or swapChildrenAt
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 16-10-07, 14:03
Member
 
Join Date: Jul 2007
Posts: 33
Rep Power: 0
jimbo is on a distinguished road
Re: tween display above loaded swf

hmmm, I'm having trouble with this . . . am I close to the answer? The 'id' is an int, and I'm having trouble swapping display object pageTween with an int.

pageTween.play();

id=m.target.parent.id+1;
loader.unload();
removeChild(loader);
rimuoviListeners(loader.contentLoaderInfo);
loadPage(m.target.parent.id+1);

setChildIndex(pageTween, 0);
//setChildIndex ((m.target.parent.id+1), 1)
trace("tween level is " + getChildIndex(pageTween));
//trace("tween level is " + getChildIndex((m.target.parent.id+1)));
swapChildrenAt(1,0);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 16-10-07, 14:11
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,486
Rep Power: 6
Flep is on a distinguished road
Re: tween display above loaded swf

Did you try with swapChildren() ?
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #5 (permalink)  
Old 16-10-07, 14:32
Member
 
Join Date: Jul 2007
Posts: 33
Rep Power: 0
jimbo is on a distinguished road
Re: tween display above loaded swf

If I do this:
swapChildren(pageTween, m.target.parent):

- I get the error of "The Supplied DisplayObject must be a child of the caller" - does that mean that the page tween should be inside each child swf instead of one copy in the main.swf?

Same error if I do:
setChildIndex(m.target.parent, 0)
setChildIndex (pageTween, 1)
swapChildrenAt(0, 1);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Flash Multi Gallery
  #6 (permalink)  
Old 16-10-07, 14:35
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,486
Rep Power: 6
Flep is on a distinguished road
Re: tween display above loaded swf

cos they must be in the same father.
You should swap the loader with the tween, i think...
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #7 (permalink)  
Old 16-10-07, 14:46
Member
 
Join Date: Jul 2007
Posts: 33
Rep Power: 0
jimbo is on a distinguished road
Re: tween display above loaded swf

Nope. Even moved the tween and the swap to the loadPage function, and got either the coertion (wanted object, got int), or the 'child of caller' error when swapping with any of the statement objects.

Could it be that I should load the target swf and the tween into an empty mc in main.swf, so that they are children of the same object, then swap them?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #8 (permalink)  
Old 16-10-07, 14:52
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,486
Rep Power: 6
Flep is on a distinguished road
Re: tween display above loaded swf

before to swap the loader, did you say:
var m:MovieClip=loader.content as MovieClip;
swapChildren(m,tween);
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #9 (permalink)  
Old 16-10-07, 15:02
Member
 
Join Date: Jul 2007
Posts: 33
Rep Power: 0
jimbo is on a distinguished road
Re: tween display above loaded swf

I get ' a conflict with definition m in namespace internal
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #10 (permalink)  
Old 16-10-07, 15:05
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,486
Rep Power: 6
Flep is on a distinguished road
Re: tween display above loaded swf

change its name

var nn:Mov....
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
How to refer to a MovieClip placed in library of a loaded SWF? Flep Tutorials 7 24-10-08 21:53
image display flex nitish dhar FLEX builder 3 0 07-07-08 14:37
How to display an SWF at 100% Flep Tutorials 17 08-05-08 15:54
access loaded object jimbo Actionscript 3.0 newbies 6 18-10-07 13:20
Display Object Container e gestione classi tem Actionscript 3.0 avanzato 5 22-08-07 13:45


All times are GMT. The time now is 22:42.


Powered by vBulletin versione 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC4
Forum SiteMap


FlepStudio
by Filippo Lughi
P.IVA 03605860406