header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
sanjay
Points:0
Posts:0

10/14/2011 9:57:01 AM

Title: How can a loaded child swf 1 communicate to next child swf, child swf 2, which is currently not load


I have a parent swf with three buttons: next button, back button, ticker on/off button. I have three child swfs, each with a ticker mc. When I click on ticker button on parent swf it dispatches a custom event which brings ticker MC on stage and thus ticker becomes visible (ticker off button displaces it out of stage by changing the value of ticker_mc.y). the problem I am facing is when ticker is on and I click next or back button to load next or previous child swf, the ticker goes off. How can I make sure that ticker is on all the time and closes only when I close it. How can a loaded child swf 1 communicate to next child swf, child swf 2, which is currently not loaded, that since the ticker is on on swf 1 so you please keep the ticker on on swf 2 as well?! Thanks in advance.



1
Andrid
Points: 720
Posts:0
10/15/2011 5:41:53 AM



you are loading the ticker movieclips in the same container. which will empty the current content when loading of new content starts. o there will be noting visible during the loading time of next ticker. Instead you should load the new ticker in a new movieclip each time and on load complete event of the new ticker remove the old one.

2
sanjay
Points: 0
Posts:0
10/15/2011 5:02:00 PM



Thanks for replying. Yes, you are right "which will empty the current content when loading of new content starts." On parent swf in Event.Complete, I remove the old child swf and replace it with new child swf. I would like to explain it further. There are three possibilities: 1) ticker on (I am able to do this by moving ticker to stage by changing ticker_mc.y=160) 2) ticker off (I am able to do this as well by moving ticker off stage, again by changing ticker_mc.y=194). 3) Here I am facing problem. If I turn on the ticker and go to next child swf, ticker goes off or if I turn on ticker on child swf 2 and come back to child swf 1 again ticker goes off. Can I do it like this? Suppose I load child swf 1, turn on the ticker, now ticker_mc.y should be 160, hold this value in a variable (var tickerPos) and pass this value to next child swf and say ticker_mc.y = tickerPos. Will it work? Can you guide as to how can I write this code?

3
sanjay
Points: 0
Posts:0
10/16/2011 2:56:35 AM



If I write the following code in Event.COMPLETE function, I am able to trace the position of tickerMaskMC (located on child swf) based on whether I have clicked on or off button (values in the trace: 160 and 194). Is there anyway I can pass these values to next loading child swf and position the tickerMaskMC accordingly?? I am trying but I keep on getting error 1009 and 1010. Please help.



var tickerPos:uint = thisMC.tickerMaskMC.y;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
function onEnterFrame (event:Event):void {
	tickerPos = thisMC.tickerMaskMC.y;
	trace(thisMC.tickerMaskMC.y);


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 8+8 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions