PDA

View Full Version : Flash probs


clueless
01-09-2007, 12:11 PM
Hi , im trying to get some interaction between flash and am6.
All im trying to do at this point is to take a flash movie out of a loop.

in flash i have got

if (AString=="Go") { gotoAndPlay(100;
}
else
{
gotoAndPlay(10);
}


causing the movie to loop. When i try and set AString from AM6 the flash movie just keeps on looping?

rhosk
01-09-2007, 12:48 PM
Look into fscommand()

clueless
01-09-2007, 03:17 PM
ill look into it , thanks.

rhosk
01-09-2007, 03:38 PM
If you get lost, try providing a bit more detail.

How are you sending the variable info to Flash (or vice-versa)? The more detail, the better.

clueless
01-10-2007, 03:58 AM
i made a simple movie using 200 frames in flash mx.
- In the first frame of the flash movie i added the code;

set(AString="loop");

-i then set another key frame at frame 10 (more of a visual ref)

-Then at frame 99i added the code;-

if (AString=="Go") { gotoAndPlay(100;
}
else
{
gotoAndPlay(10);
}

... to the flash movie.
- i then added the compiled swf to my AM6 project and added a simple button . Using the OnClick event on the button i tried to set the variable "AString" inside the flash movie to "go" to make the movie continue past the condition causing the loop.
To set the flash variable i used Flash.SetFlashVariable() ;-

Flash.SetFlashVariable("Flash1", "AString", "go");

But I've been getting no visible results in the flash movie.

I swapped the value in the Astring variable a few times to check the flash code was working OK and everything seems to be fine.

rhosk
01-10-2007, 05:44 AM
Ah, I misinterpreted your first post, try the attachment.

You have some typos in your code for starters, but could be just from transposing?