ActionScript 2.0 :: Specify Which Directory Flash Should Look In?
Sep 12, 2003Can someone explain a little bit about the operator in. Does it just specify which directory flash should look in?
View 6 RepliesCan someone explain a little bit about the operator in. Does it just specify which directory flash should look in?
View 6 RepliesWhen I have a class linked to a MovieClip in my library and that class takes an argument in its constructor method. That class will compile properly ONLY when it's located in my top-level directory (same dir as the .fla and Document.as files). If I move that class to a deeper directory, say com.place, and update the package statement and symbol link appropriately, the compiler will generate error "1136: Incorrect number of arguments. Expected 0."Create flash project and put a rectangle on the stage. Covert it to symbol and assign it to class TestPanel - or whatever you choose. Also configure the fla so that is uses a Document (Main) class.Create Main.as and TestPanel.as in the same folder. In the Main class, instantiate a instance of TestPanel and add it to the stage. Flash will, predictably, add the rectangle symbol and everything is fine.Now modify TestPanel so that its constructor method takes a Number and have Main.as pass some number to TestPanel.[code]You now get the error: 1136: Incorrect number of arguments.Expected 0.When I move the TestPanel.as into a deeper directory, Flash somehow is looking elsewhere for the base class for Symbol, even though I'm mapping that Symbol to com.place.TestPanel.
View 4 RepliesI have a web service running in http://server/abc/service which is being accessed by Flash from a different domain. I deployed a cross domain policy file to http://server/abc/crossdomain.xml and made the Flash load it using: flash.system.Security.loadPolicyFile("http://server/abc/crossdomain.xml");
in the constructor of the main movie clip. However, when the Flash starts, it requests and loads this file (observed in Firebug), but then it also requests it from the root of the server (i.e. from http://server/crossdomain.xml) which does not exist. Subsequent HTTP requests don't work reporting security cross domain errors. When I put the policy file to the root of the server, it all works. Why does it request the policy file from the root as well even thought it loads it from the subdirectory? Why the subdirectory policy file is not enough?
I should also note that the two policy files are loaded before any application HTTP requests are issued.
I need to get a random filename from a directory in AS3, and open it. (This will be online, so no AIR)
I'm thinking of just using a text/xml file with all the filenames listed, and just traverse through it getting the filename. But is there a more "direct" way to just look at the directory so I don't have to edit the text/xml file all the time?
Anyway what im trying to achieve is - AS reads a directory on a server lets say, it contains 10 images, this would create movie clips for each one and assign them to array "pockets"(im not sure if you can do this in AS, you can in PHP and JS so I'd expect so) then I'd use a repetitive function to manipulate each one of those images.
View 2 RepliesI've seen examples that use a timer, get the file list, and check each file for changes, but is there a simpler way to do this such as...
<mx:FileSystemList id="fs" visible="false" />
private function onCreationComplete():void
{
[code].......
I want to browse or list the directory present in my system and display those dirs graphically.
View 9 Replieshow can i create a directory using flash actionscript 2.0..can someone post a tutorial or a link for working with local file system.
View 3 RepliesI use javascript to play a flash file, and it plays correctly. But it also needs to parse some configuration files in the flash default directory. So the problem is: the flash file I am going to play can't access its config file for the wrong working directory.
For example, I specify the swf path value as 'falsh/list/test.swf', so my javascript will give this swf value by swfobject.embedSWF to play this flash. But the flash file flash/list/test.swf needs to parse a config file in the same directory with flash file like flash/list/config.xml. The problem is flash attempts to parse this config file under the current javascript working directory.
[Code]...
I've installed a couple of fonts on my Mac that I want to use in Flash CS3, but they're not showing up in the font list.how do I install them so that Flash will pick them up?
View 2 RepliesIs it possible to use a Document class that is above the FLA in the directory structure?[code]...
View 1 RepliesHow should I change the following code if I want to put my flash object into a directory named "flash/", I tried changing the value to "flash/photo.swf" but it didn't work.
[Code]...
Originally my classes(.as) and project (.fla) were stored in the same directory. But I would like to refactor them. I've created a subdirectory "classes", and moved my classes into this subdirectory but I've got error.
All my classes are stored in one package.
How can I "include" or "import" my classes from a subdirectory of my project?
I'm trying to save an image to the application directory by opening a file stream and write the bytes from a bitmap data. I added some events listeners for testing the file stream process but I don't receive any response event. [code]...
View 3 RepliesDue to decisions out of my control I've created a iPad app by way of a CS5.5 Flash build and using the 'Air for iOS' publish.
In the 'Air for iOS' settings I've included a file. The issue I'm having is in trying to call the file and not knowing what the path is.
I'm hoping this is a case where files added in this manner are placed in a consistent location.
Is that the case? And if so, what would the path be?
How do I organize my flas, class, xml, shared library, and deployment files? What does the com in the standard layout stand for?Here is my attempt so far:
1) com
1a) source
1a1) assets
1a2) xml
[code]....
What methods could I use to save a xml generated in flash into the same directory as the swf file?
I know I can use "FileReference.save()" for flash player 10. But this has prompt window that appears and lets the user choose where to save. I just want it to automatically save in the directory of the flash file.
There are many articles available online regarding directory structure best practices, but none of them seem to fit exactly what I need/would like. That, and it seems regardless of what I try, I always get a "5001: The name of package '[package name]' does not reflect the location of this file..." error. This is my current directory structure:
Code:
- colorselector
- assets
[code].....
I am working through an audio player demonstration in the book "Foundation Actionscript 3.0". When I try to publish my AudioDemo_final.FLA file I get the following error, "Adobe Flash CS3 - Error creating flash movie file. Destination directory does not exist. Change your publish settings."The following is displayed in my output panel >> Error opening URL 'file:///C|/Sites/flashcoder.net/FAS3/Audio/AudioDemo%5Ffinal.swf'My file directory is set up like this:AudioDemo_final.flasong1.mp3com.fas3.smc (folder)Main.asSounds.as
I've got some actionscript which begins with:
package obfus_plugin{
import org.flowplayer.model.Plugin;
import org.flowplayer.util.Arrange;
import org.flowplayer.model.PluginModel;
import org.flowplayer.view.Flowplayer;
public class obfus extends Sprite implements Plugin {
and when I try to publish, I get the error:
5001: The name of package 'obfus_plugin' does not reflect the location of this file. Please change the package definition's name inside this file, or move the file. C:flowplayerurl_securesrcactionscriptobfus_pluginobfus.as
the location of the .as file is:
C:flowplayerurl_securesrcactionscriptobfus_pluginobfus_plugin.as
In my classpaths I have:
C:flowplayerurl_securesrcactionscriptobfus_plugin
Is it possible to upload a complete folder with subdirectories and files (in the subdirectories) in Flex?
I am using a Flex / BlazeDS / Spring application. The question is not how to transfer the data to the server.The question is: if it is possible to get access to the files and subfolders (recursive) with Flex?
I have a website setup in IIS 7.5 with a virtual directory pointing to a local folder outside of the www root of my website e.g:
the website is c:website
the virtual directory is in c:images
I use flowplayer to play my movies, when I put the movie path in my website root directory structure, say c:websitemoviesa.flv it works fine in the player, but if I put them inside the virtual directory and point the player to play it from there using a relative URL, it doesn't work
I suspect that this has to do with either permissions or flash configurations to allow it to access directories outside of the scope of the website, but I have no idea where to edit such settings
The web designer on a project is using Flash Gallery which loads a images.xml file. The SWF expects it to be in the same directory as the .html file. So if I am at the action /Public/Home/Gallery, it would expect the images.xml to be in at Public/Home.
How do I allow the Flash SWF to load the file? I have no access to the source code, so I cannot change the behaviour of the SWF.
I'm developing an application using Flash CS5. The application itself runs successfully when tested with Ctrl+Enter. The problem being the moment I moved that .swf file from the original directory, the content disappears, and the Flash Player shows ellipsis literally ) instead of the usual content.
When I moved it back to the original directory, however, it works once more. I'm stumped. This didn't happen when I developed a flash content with Flash CS3 a year back. Is there something that I have to do? I've searched with keywords "swf content disappears when moved" but everything is about the file itself being gone, not the content inside it
This is a huge problem. I'm developing for AIR, and once the application is installed, the same thing befalls the application Maybe there's a configuration in my PC that causes this to happen?
I have a nicely working actionscript project in Flash Builder 4.5. However, I'd like to change the directory name that it sits in. Seems Flash Builder breaks if I manually change this directory name using the operating system. Is there a way to change this in Flash Builder so it doesn't get mad at me, or other workaround?
View 2 Repliesis there a way to have flash read swf from a directory dynamicaly. so if you add a new one it reads it and you could have a next and previouse button to dynamicly browse throught them.
this way you could just upload new swf and it would automaticaly add it to the set so when you hit next at the end it would read the new one.
When I upload file using a simple uploader the file does not appear on the servers directory..Everything is working, the preloader the status text etc, as if it is uploading the file but nothing appears on the server I am not very sound in php The code goes like this:-
Code:
Select allSystem.security.allowDomain("http://localhost/");
//import the FileReference Object
import flash.net.FileReference;
//initial settings - since no upload file type selet yet user cannot upload a file
uploadButn.enabled = false;
//create a new FileReference object
var fileRef:FileReference = new FileReference();
[Code] .....
I have given a folder called uploads on the server and that is where files are supposed to come. Also I have given the correct name of php file which is upload.php in the fileRef.upload But its not working.
I am new to flash and decided to start out using templates to gain a beter understanding. I grabbed a template - that when I went to save it said it was an MX version - once I began to make changes in it re-save and publish it I noticed that some of the elements were missing. I thought it was something I did so I copied the entire directory and just opened the .fla and saved it without making a change and then published it and the items were gone again. I saved it in the same directory only changing the output .swf file and used all of the same html files
View 5 Replies(Spoiler alert: It's not an issue of my package statement not reflecting the location of my class file.) When I have a class linked to a MovieClip in my library and that class takes an argument in its constructor method. That class will compile properly ONLY when it's located in my top-level directory (same dir as the .fla and Document.as files). If I move that class to a deeper directory, say com.place, the compiler will generate error "1136: Incorrect number of arguments. Expected 0.
[Code]....
Just trying to make a flash photo gallery that displays all the image files in a certain directory with the usual photo gallery functionality.
View 1 Replies