ActionScript 2.0 :: Flash8 Flash_A To Detect Flash_B's Sharedobject File?
Jun 30, 2009I just learned how to use sharedobjects few week ago. Is it possible for Flash_A to detect Flash_B's sharedobject file?
View 1 RepliesI just learned how to use sharedobjects few week ago. Is it possible for Flash_A to detect Flash_B's sharedobject file?
View 1 RepliesOn my stage is a dynamic text box and a "save button".The text box shows a random number which somehow does not save.In the fla file I added is a circle whose color can be changed from red to green, just to point out what I mean.
View 3 RepliesI've installed developer version of Flash Media Server 4.5 and trying to get remote object, but no matter how I call my object all i get is this error .I've rad configuration guide and it told me that I should set StorageDir for shared objects, enable RPC (<RPC enabled="true">) and allow shared object (<Allow>users</Allow> in <RPC> - <SharedObject> tags)
View 1 RepliesIs there a possibility to find out which objectEncoding was used for a loaded SOL file?(The properity is always defaultObjectEncoding when not manualy set)
View 0 RepliesAfter spending a whole week on this,which most likely will turn out to be very simple, I have an xml file (with over 1300 cNodes) that is set up like this:
Code:
<?xml version="1.0" ?>
<rNode>
<cNode theWord="A" theSynonym="A" theMeaning="A" theExample="A" />
[Code].....
What I am trying to do is to create an array (arr =[]) that hold only the cNodes chosen in the "saveText" .. in other words the cNodes assigned the value var = 1 in the SO file.
Is this easier done as a temporary array or as second SO file.
what is the maximum size of SharedObject file?
View 2 RepliesI've set up a shared object using user_so.data.flashVar = value.This works fine, but as it is being used to store details for saved games, users could easily edit their saved games to cheat their way through the game. Is there any way to check if a shared object has been altered outside of Flash, or are there any other methods of saving files in AS2 that I'm unaware of?
View 4 RepliesI have attempted to create a save file using sharedObject but it doesn't work. I don't get any errors it just doesn't seem to save when I press the save button. In the main frame I have:
Code:
user_so = SharedObject.getLocal("user");
if(user_so.data.tclock != undefined) {
clock_txt.text = user_so.data.tclock;
gregism_txt.text = user_so.data.gregism;
} else {
gregism = 0
clock = -1
}
In the save button movie clip I have:
Code:
on(release) {
user_so.data.tclock = _root.clock_txt.text;
user_so.data.gregism = _root.gregism_txt.text;
user_so.flush()
}
Is there a possibility to find out which objectEncoding was used for a loaded SOL file? (The properity is always defaultObjectEncoding when not manualy set)
View 3 RepliesI'm currently working on a chat with uploading an image and sharing it. The problem is I can upload and display the image but I can't share it to the other side. Here is some code:
[Code]...
Currently, I do serialize my model object to the SharedObject instance:
try {
var mySo:SharedObject = SharedObject.getLocal("sig");
mySo.clear();[code]....
Likewise, I load the saved model using the SharedObject instance. Works great.Ultimately, I'd like to serialize it to a file - which fails. Here is how:
var fp: File = File.applicationStorageDirectory;
fp = fp.resolvePath( PREFS_FILENAME );
var _prefsStream:FileStream;[code]....
The complementing read operation suddenly breaks and reports missing bytes.In fact, I can't image how FileStream / _model.writeExternal() is able to serialize, since it needs to somehow know, that a new serialization operation is about to start. If it doesn't know, it won't be able to determine, which object instances are left to serialize.Thus, I image that my concept is completely wrong or I missed how to initialize the serialization operation.I'd be happy to read the raw ByteArray from the shared object and write it to a file. Unfortunately, I didn't find a method to retrieve from a SharedObject a ByteArray of a certain property, in my case mySo.data.model.My question is loosely related to this one: Why does delete( DictionaryInstance[ key ] ); fail?
I am working on a project which there are two .swf file play side by side simultaneously. I need to use one of the file to control the animation in another file.
If they are in same .swf it should be easy. I can just use:
gotoAndPlay("frameNumber")
but there are two .swf now. (lets say movieA and movieB) I think I should use something like:
"LinkToMovieB".gotoAndPlay("frameNumber")
"LinkToMovieB" should be the link to movie clip in the movieB file.
my problem is how do I get the link to movie B's movie clip. or there is other proper way to do this task.
Gives me this error:
Error: Error #2134: Cannot create SharedObject.
at flash.net::SharedObject$/getLocal()
at as3_shared_objects/showVar()
[code]....
I'm trying to insert an SWF flash file (a game) into another Flash file. However, when I import the swf file into the library and drag it onto the frame (and insert the stop(); command onto the frame action to stop it playing the whole movie), the SWF file plays constantly, ignoring all the actionscript and button commands in the game SWF file.When I try inserting it using the Window component, the game SWF refuses to play at all - it just stops (clicking buttons in the game work, but it goes-to-and-stops instead of go-to-and-play like it's supposed to do).When the game SWF is played by itself (by just double-clicking to open it from Windows Explorer or embedding it in a web page), it works fine.
View 2 RepliesI need to find a way to detect keystrokes when the flash file is not selected and send that information to an .swf file. The file would be stored locally (not on the internet).
View 3 RepliesI have a video in .flv format that I have converted into .swf. And this .swf file, I have added it in into my main flash file by using Loader. And now, I want to detect when this video will finish playing so that I can go to the next frame which is not looping the video again and again.
View 3 RepliesI am creating a new site using Flash 8 AS2, I have a question but im not even sure if its possible. I have created (for arguments sake) Main.swf which is made up of a logo, music player and a main window, this main window is a MC called content (content_mc). This loads external SWF files into it.
At the moment when the main.swf file is accesed it automatically fades content_mc window to black then fades back out to display a swf file called 'door.swf' that all loads fine and heres my question --- within door.swf there is a button (door_btn) what i want to happen is when door_btn is clicked I want it to look at the action script listed under the main.swf file and fade out content_mc (currently displying door.swf) then fade back in with the a new swf file i.e room.swf.
So the main.swf file has no buttons on it, all the buttons will be displyed within the swf files loaded into the content MC, when any of these buttons are clicked I want the Main.swf to perfom the transition and disply the new swf file, is this possible ?
The code im using at the moment is as follows: In Main.swf i have a content_MC and transition_MC
Content_mc
Code:
onClipEvent (enterFrame) {
if (!loaded && this._url != _root._url) {
if (this.getBytesLoaded() == this.getBytesTotal()) {
[Code]......
I know ive got to put some code into the external swf files but i dont know what ?
I am designing a website. My flash file comes up to a size of 1.5 mb. It takes around 1 minute to load.reduce the file size.
View 1 RepliesI have a loop which duplicates a MC ('news_list')on the stage and places it underneath the most recent clip...
code:
for( i = 0; i < total; i++)
{
var news= news_list.news_item.duplicateMovieClip("news_item" +i, i);[code].........
I have a text box inside the MC which autosizes depending on how much text is inserted from an xml file. This should then obviously increase the height of my 'news_list' movieclip.What I want is for the next instance of the 'news_list' MC to be placed directly underneath the current one,no matter the height of the clip.Currently,I can only get it to position a specified distance below the current instance.The code above is what I've currently got,but I can't quite grasp how to grab the height of the current instance, and then use that in the code to place the next instance below it...
I have a number of different swf files that all have a score variable. I was wondering is it possible to save this variable into an external file and be able to load these variables in a different swf?
View 3 RepliesIf I use an imported txt-file in my flash-move. Is it possible for flash to see if it has been uppdated ( last time saved ) the last five days?
View 2 RepliesI need to create two combo boxes that are populated by an XML file. In the first combo box there are 13 choices and depending on what the user selects I need to populate the second combo box with the correct information. Now I can create the first combo box just fine but when I try to dynamically create the XML file name for the second combo box it doesn�t seem to work. What I am doing so far is taking the data from the first combo box and adding the quotes and .xml with this piece of code:
PHP Code:
pModCombo = '"'+event_obj.target.selectedItem.data+"Combo"+".xml"+'"';
pModComboXML = new XML();
pModComboXML.ignoreWhite = true;
pModComboXML.load(pModCombo);
If you trace that code it creates the file name just fine however the xml file will not load. If I replace that code with the normal xml code like this:
PHP Code:
pModComboXML = new XML();
pModComboXML.ignoreWhite = true;
pModComboXML.load("new.xml");
The second xml file seems to load just fine. However, if I create an if statement with all the different xml file names I will have to update the swf every time I add a new choice in the first combo box. So my question is does anyone know how to dynamically create the xml file name?
PHP Code:
pmComboXML = new XML();
pmComboXML.ignoreWhite = true;
pmComboXML.load("brands combo.xml");
[code]...
I was wondering if it's possible to make a file tree in flash without xml or mysql. Just define the folder to read from the same server and the component would display folder contents...
View 6 RepliesLoading the text file works just fine until I put the .swf on another domain. How can I still load the .txt file without just putting it on the same domain? Is there some kind of security or permission that I can place into the html or flash?
View 1 Repliesthere are 2 items on stage, one is the "button" with instance name myButton and a dynamic text field.so the action script goes this way...
myVar=0;
myButton.onRelease=function(){
myVar++;
trace("click");
}
the dynamic text is initially zero (0) and when i click the button it counts the clicks up to here every thing works right but...when .swf file previewed in html after clicks if refresh is pressed the number is going back to zero.i want to upload this file and use on webpage.
i have a flash file where i have created a text it is dynamic .i would need to get evry 10 seconds an update on this text from a file called update.txt
View 2 RepliesI am using flash 8 and I have succeeded so far in loading variables from a text file that contains around 20 lines and have the variables displayed in texboxes. The problem is that it goes directly to the last line and displays those variables. I need it to read the first line only and stop so I can add a "next" and "previous" buttons and be able to navigate through the database.
View 11 Repliesdynamic text field, which displays a txt file.
If I hardcode the file name in the code, then it works fine. This is on the first frame of my movie, which holds the dynamic text field.
Code:
myData = new LoadVars();
myData.onLoad = function(success)
{
[Code]....
Is there a trick to defining url's for dynamic text fields? Because if I hardcode the path from the server, it works locally, but again not on the server..
I want to change the color of a movie clip, and I've succeeded with the following code:
var my_color:Color = new Color(mc);
my_color.setRGB(0xFF0000); // mc turns red
Now, this is only the start. What I really want is that the color is changed via an external textfile (or similar).
I've gathered that this is possible with the LoadVariables function, but I can't seem to get it right. Does anyone have a solution for this? I'd also like to know how I should format the textfile code (should it be something like this: "&mc=0xFF0000"?)...
I'm using flash 8 and slideshowzilla to make a 3d /2d gallery site. Ok, here's what I have so far. I have one folder named 3d and another named 2d. Each folder has all the files that slideshowzilla makes to play the gallery. (see image) In flash 8 I have the 2dimages.swf and 3dimages.swf set in loaders and it all works fine but i get a "Error opening URL 'file:///C|/slides.xml' and the gallery won't play because the slides.xml file that it's looking for is in each folder. how do I get flash to read the slides.xml file thats in each folder?
View 1 Replies