ActionScript 2.0 :: Use Correct External Path For So.addVariable?
Sep 25, 2007
i was trying to load an dynamic swf by an external path using the addVariable of swfObject. But i seem to be lost when im already trying to call the path of the swf. on the loadMovie function, i noticed that "_level0.bg" which is a String and myRandom as Number is not possible to concatenate. how to be able to call this path properly so that i can load the swf?
Code:
_root.onLoad = function() {
var myRandom = Math.floor(Math.random() * _level0.totalPic) + 1;
_root.bg_mc.loadMovie("_level0.bg" + myRandom); // it should be like _level0.bg1;
}
On a Mac we have username/Library/Application Support/Adobe/Flash CS3/en/Configuration/Classes/(where the aso files are located). What is the path on a Windows machine?
Previously it was put as keepLevel1(event.target) at each seperate function. Now I would like to make it frun the functions after an object is successfully loaded. How should I change the (event.target) to?
ActionScript Code: private function startSearch(event:MouseEvent):void { var loadID:String; loadID=searchArea.text; myLoader2.load(new URLRequest("GetData.aspx?id="+loadID)); myLoader2.addEventListener(Event.COMPLETE,processXML2); [Code] .....
What I'm trying to do is for a play button to just play the first thing that is on my XML file. I have the XML file played out like this and it is being loaded earlier in the actionscript file.
The mySound.loadSound(loc[0]); is coming up with an unknown, and this is because the file path is not in quotes because it wants a URL, not a variable (loc[0] should be passing on the file path for the first song in the XML file). Is there some way to change the variable so that the loudSound() function reads the path correctly? It works fine when I just pop the file path in there instead of loc[0].
I'm brand new to AS 3.0, and I'm having a lot of trouble with it. Basically, all I want to do is load in an external swf when a button is clicked. The swf to be loaded would be defined by a variable, rather than hardcoded. Sounds pretty simple, no?[code]....
I'm using AS2 and Flash CS4. I'm having problems loading an external swf correctly. I get it loaded and displayed ok, but not in the correct spot. The movie clip is the same size as swf, and the registration point is in the top left corner. However, each time it loads it ends up in the bottom right corner of the screen.
Again some questions I feel a decent as3coder should know...I created a class to load image files. It works nice and all, but I have some questions... ok here goes ...This is my class :
I'm trying to get the depths of all the blocks to be at the correct levels at the correct times so that the 3d effect is maintained. I've tried many things, but have had little success. All the instances of the blocks are stored in an array, but since it's adding them in accordance with when they're added to the stage, it doesn't help me locate them to swap depths. Is there a way to arrange them by location on the board?
So I've created a script where a mc is clicked on and the player can draw a path using the mouse. I'm trying to figure out how I can get the mc to follow the path drawn out by the player's mouse and when the player clicks again, it erases all of the path.my code is below
I found the problem. I had my container as a guide. I took off the guide and it shows up in my server. But why did it show up on my local computer if it still was on guide then?I have external jpgs that are loading into a flash website. When I run it off my hard drive it works. But when I put it on my server the external jpgs are no longer loading. Does anyone know what I might be doing wrong with my paths?
I have embedded a external swf in a movieclip called "container". In the external swf is a movieclip "black_rectangle". How do I have to write the path to this rectangle? My version doesnt't work and i have no idea why not
I have my main swf that has a container called "mc_dropphotos" where I have:loadMovie("photo_scroll.swf",_root.mc_dropphotos);In the photo_scroll.swf there are movieclips that I want to get the x coordinate of and do something in the main swf by:if (mc_dropphotos.mcPhoto1._x < -4.15){etc.which is the path syntax I thought you use for checking properties from an external swf. I have tried _root.mc_dropphotos.mcPhoto1._x , _root.mcPhoto1._x, _root.mc_dropphotos.mcPhotos.mcPhoto1._x, c_dropphotos.mcPhotos.mcPhoto1._x and none of them work either.
1) Place symbols on the stage manually in loaded.fla
2) Exclude these symbols from the swf because they will already be in loading.swf
So I:
1) Created a component.fla
2) Created a "comp" symbol in the fla
3) Turned that symbol into a component via Component Definition
4) Exported the comp.swz into Configuration/Components/MyComps
5) Opened up loaded.fla
6) Pulled the comp component onto the stage
7) Went to file AS settings and added Configuration/Components/MyComps to the External Library Paths
8) Compiled loaded.swf and played it
BUT the swf includes the comp component on the stage...which is NOT what I wanted. I only want the swf to work and have a reference to comp when it it loaded into loading.swf.Why haven't the classes in comp been excluded?Obviously this is a workaround for runtime shared libraries, which is unpredictable, time-wasting and generally painful. Is there a better way to retain WYSIWYG and share symbols? I don't want to do dynamic placing.
I created a Jing video to describe my problem. In short, I'm not sure how external AS3 scripts are supposed to referenced, though I did get it to work in AS2 years ago.
I am having trouble loading an external swf on a server using the absolute path. This external swf uses webcam streams and is loaded in the original swf file using the URL request code. I can load other swfs but just not that one. I have set the permission of the external swf to allow write/read/execute
//Loads the augmented SWF into the main timeline. var request:URLRequest = new URLRequest("http://www.reminisce.me/files/jz_AR.swf"); var loader:Loader = new Loader()
I have an external swf file that I am using for an image gallery utilizing XML.I have a main swf that loads the external swf. Everything works fine locally, however i get nothing when I put it on the server. I have been trying to find the answer and I think it has something to do with the path, its a guess really.So this is how I have it set up. On my main flash time line, I have an empty movie clip with an instance name of loader_mc. When a user clicks on the button for portfolio it stops on the portfolio keyframe and should call the external swf located in the folder Flash. This works when I test it locally, but does not work when I test on server. Here is my exampleThis is my actionscript.
I am trying to create a flash viewer, which will load various other flash movies. The viewer will be in the root directory, but the flash movies it will load are a few directories deep.
It seems that when I load one of these movies into my viewer, the loaded movie is looking for the sounds in an audio folder in the root directory, and not relative to the swf I loaded. Is there a way to set this? I would rather not have to make the changes in each of my other movies to use the absolute path
I need to say I'm VERY aggravated right now at all of this because I know whats going on I imported a QT h.264 640X480 mov into flash. I've used both local files across the network and files on the live web server. 1. the exported SWF on the server want to use the skins. swf thats TWO folder levels higher then the output and the local MOV. there appears to be no way to edit this.I didn't export to here, I exported to a folder deeper down to hold everything. no idea how or why flash is reaching 2 levels up.
2. if I manually move the skin file up, then I get a sandbox secruity error with the hint that Security.loadPolicyFile("");
Alright, so I've tried quite a few things with no luck. I have a scrollbar that works in the swf fine, but when loaded into my mainmovie container I get this error... Target not found: Target = "/scrolling text " Base = "_levelO.swf container"
Basically I understand this to mean that the externally loaded movie cannot find the instance name /scrolling text. The code is as follows that I have set to the scrollbar button in the externally loaded swf....
on (rollOver) { tellTarget ("/scrollingtext") { nextFrame(); } gotoAndStop("down1"); }
I tried changing the target to _root.scrollingtext with no luck. Also tried _parent.
the same class is passed to the mxmlc compiler in SWF library as a symbol linkage class and again in a source-path. But the compiler uses the definition from the source-path so creating new instance of that class won't create new instance of the library symbol. How do I tell the compiler to prefer the definition linked to the symbol (the one dfrom SWC)?
I have my design assets in an FLA file and they are linked to classes (e.g. [URL]. Then I export those assets to a SWC library and pass it to the compiler. Now when I create an instance of the class (new MyAsset();) it will be a new instance of the library object.
But there are other classes too in the source folder (e.g. "com.myproject.model.*" so I need to pass the source folder to the compiler too. And that is the problem, now the compiler will use the MyAsset.as definition from the source path, not from the SWC where it is assigned to the library object so if I create new instance of MyAsset now it won't duplicate the library object.
I was wondering if it possible to write up some AS that will take line paths that you have drawn and convert them into a Path object? For example say you drew a jagged line from left to write, would there be a way to have AS convert that into a Path object.
I am displaying some flash content on a fairly standard page. This works really well when the flash, xml file and html page are sitting together in the same directory.url...However, I want to display that same content in another page which is deeper inside the site but outside of the directory that houses the .swf and .xml files as well as the assets.[code]The js files are loading properly but the flash content is not, so I could use a little help getting that sorted out.