PDA

View Full Version : MMExecute Error / file handling


chayanvinayak
10-29-2006, 06:09 PM
I have following code on a button , to create a file named :"TextCarousel.as" and to insert some text into it .
but its is not working


on(click){
classFileURI="file:///C:/TextCarousel.as";
code="Any code to be inserted"
MMExecute("FLfile.write("+classFileURI+","+code+")");
}

krayzeebean
10-30-2006, 01:46 AM
You're missing some quotes.

MMExecute("FLfile.write('"+classFileURI+"','"+code+"');");

Also I think the URI needs to be C| not C:

chayanvinayak
10-30-2006, 04:47 AM
hi krayzeebean,

its still not working, if you know the complete code ,pls help me by providing that .

Sunny13
10-30-2006, 01:49 PM
Where are you placing the swf of the file... MMExecute can be executed only from Window > Other Panels menu. and place ur file in WindowSWF directory that is located in your Configuration directory(see flash help)

chayanvinayak
10-30-2006, 03:59 PM
hi sunny ,
yup i am playing it from panel.(my swh is placed in Swf directory - where the panels are situated).

krayzeebean
10-30-2006, 05:16 PM
Here's the code I used, and it worked when I tested it:

on(release){
classFileURI="file:///C|/TextCarousel.as";
code="Any code to be inserted";
MMExecute("FLfile.write('"+classFileURI+"','"+code +"');");
}