Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0

Thread Tools Rate Thread Display Modes
Old 06-13-2005, 04:14 PM   #1
Actionscripting Learner
meesh's Avatar
Join Date: Jun 2005
Location: Ottawa, Ontario
Posts: 3
Send a message via MSN to meesh
Question Dynamic Text: Not working in 2nd. swf called. Need HelP Please!

My name is Meesh and I'm having a problem with a small bit of actionscript I was hoping you might be able to help me with.

To explain:

I've got this SWF named "sa.swf" file I have loads into another SWF file called "interface.swf"

In the "sa.swf" file I have two movie clips and two dynamic text boxes, a drag and drop scenario, where in my properties one movie clip is called "drag2" and the other is called "drop2". Basically you drag "drag2" to "drop2" and it provides an answer to the "Dynamic Text" box called "theanswer1".

At the moment I have this part working such that when you drag one onto the other it sticks fine - no problems there. My problem is: How do I get the dynamic text box located in the "sa.swf" file to show up the answer "correct" when the "interface.swf" file calls upon the "sa.swf" file. At the moment the code only wants to show a "Try Again" message in the dynamic text box called "theanswer1" when I run the "interface.swf" file where the s"sa.swf" file is being called within.

In the "sa.swf" file I named the movie clip, I named it in the properties "drag2" as mentioned above, and I have the below set of code on the actual movie clip:

(note: I put the "_root" instead of "_parent" and nothing showed up at all. Then I tried "this.parent" and this didn't work well either. So I'm totally frustrated! Please help. I included a JPG file to show you what I'm dealing with and put arrows to the areas i felt would help you as well in understanding the structure of the code and all. I hope you have a bit of time and I'd appreciate anything you could do to help.

__________________________________________________ _____
on(press) {

on(release) {
if (this._droptarget == "/drop2") {
_parent.theanswer1 = "Correct";
trace ("theanswer1")
_parent.allCorrect +=1;
_parent.theanswer1 = "Try Again";
__________________________________________________ ___

In a nut shell, when you press the button it starts to drag and on release it drops, and then send the answer to the right dynamic box but when its run by its self it works but when I run it in the "Interface.swf" file which calls this "sa.swf" file it only gives me a "Try Again" response in the dynamic text box called "theanswer1". Any thoughts?

If I find a solution, I will write a tutorial for everyone so we can all develop a solution for this which I heard was a common problem.

Thanks sooooo much!


Last edited by meesh; 06-13-2005 at 04:19 PM. Reason: Want to add that I will provide a solution to everyone when I find one.
meesh is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 02:01 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.