ActionScript 2.0 :: Setting Base Attribute For An External Swf From Flash?
Jun 16, 2010Is there any provision to set the base attribute from flash for an external swf loaded by MovieClipLoader
View 2 RepliesIs there any provision to set the base attribute from flash for an external swf loaded by MovieClipLoader
View 2 RepliesIn flash CS3 we can set a base class. What if I do artworks in Flash 8 and code in Flashdevelop? How do I achieve the base class functionality in this situation?
View 8 RepliesThis question stems from this question that I asked yesterday.I've followed Theo's advice and created a .swc with all the common classes and added the .swc as an external library to my module .swf. This all seems to have worked smoothly--I don't get TypeErrors and my classes are all present in the catalog.xml of the .swc file when I unzip it--but now I've encountered a new problem: when I try to link a symbol in the module .fla's library to a base class from my .swc rsl, it says the base class definition can't be found in the classpath. The whole reason I want to use rsls is so I can do this,If I now include the project's source path or the .swc in the normal (not external) library path, will that cancel the sharing benefits of the rsl, or will the compiler still know not to compile the shared classes into the module .swf?
View 1 RepliesSince i upgraded to Flashplayer 9.0.124.0 i've noticed that using textures on 3D Objects via the beginBitmapFill method and setting the smooth attribute to 'true' causes the player to hang a few milliseconds at random. Setting smooth to 'false', the player runs without any hang. I tested this on different machines. An upgrade to player 10 beta didn't cure the symptoms but the hangs appear less in time. Has anyone else such problems or an idea what is going on?
View 1 RepliesMy Flash app doesn't work in FireFox (but works in IE). The problem I know is associated to loading external SWF and JPG files when using a BASE folder. Without the base folder it works fine. Here is some syntax I use:
[On Frame 1 of the base SWF, i.e. one frame before the preloader frame:]
....
_root.logo_mc.loadMovie("FlashFiles/Logo.jpg", "GET");
This file never gets loaded into the BaseApp.swf. The object html tag looks something like this:
<OBJECT....
<PARAM NAME=movie VALUE="[URL]">
<PARAM NAME=menu VALUE=false>
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
[Code] ....
What's the easiest resolution to get it working in FireFox as well as IE?
I have been trying to figure out how you could add in custom attribute tags that flash can recover.
EX:
<param name = "movie" value = "somefile.swf">
<embed src = "somefile.swf" width = "550" height = "400">
Except, that I would like to add a Custom tag, like "randNum" so that the tag user could input some number, or rather, a flash movie could generate a tag with a number already put in...Basically, heres a really basic version of the idea.There is a Flash Movie.In the movie, you can input text into a textfield.Upon finishing your message, you click a button "save".
The flash movie then:
1. Comes up with a random number unique to the message.
2. Assigns that number to a variable... "randNum".
3. Saves message as a xml file to the server as "filename" + randNum.
4. Outputs into a textfield a generated HTML tag that a user can post on myspace and such so that it will load in the flash movie.
Except... in the tag, there will be a custom attribute. If the random number variable "randNum" was 00112233, the custom attribute will be 00112233.
EX:
<embed src = "somefile.swf" width = "550" height = "400" randNum = "00112233">
So when the movie opens, it retrieves that randNum from the tag and can use it inside flash. How can this be done? Sorry this post was so long, but I wanted everyone to understand the concept.
str = "<mytag name='Here should have attributes from an external file'>''</ mytag> ";
doc = new XML (str);
foot_name.text = doc.firstChild.attributes.name;trace (y);
I have a method that converts an int to a base60 string (using 0-9, a-z, and A-Z chars), but can't work out how to convert it back again. Here is my method for converting base10 to base60:
public static function toBase60(value:Number):String
{
var targetBase:uint = 60;
[Code]....
Works well. But how do I get the base60 string back into a base10 int?
Its been a while since i touched flash, which is funny considering i started my web/development career here.Anyway, in PHP there is a nice little function called base_convert (http:url....) which will take any number in any base (e.g. base 10, decimal) and convert it to any base (e.g. base 16, hex).So base_convert (15, 10, 16) will output F, which is convenient.I am wondering, as i cannot seem to find, if there is any similar function in actionscript. I am trying to convert from base 10 to 16 and then base 16 to 36.
View 3 RepliesI am having trouble parsing some xml that has a few attribute names with : characters in them. The compiler is not throwing any errors and when I trace my complete xml object out it is all there, however when I try to trace out any element or node it keeps comming up undefined. I removed the attribute names with : characters in them and everything works fine. I cant seem to target the attributes either to delete them.
View 3 RepliesI'm trying to create a new instance of a MovieClip when the original one has been used. Would sound easy enough. Just use: var
instanceName:ClassName = new ClassName();
the class name/mc in the library im trying to duplicate is MCg1 so
var instanceName:MCg1 = new MCg1(); right?
However, the particular object in the library i'm trying to duplicate has a base class that is an external class file (just to control it's drag drop functionality)... i.e baseclass is not set to the standard flash.display.MovieClip, or whatever the case maybe. So i end out with a: TypeError: Error #1009: Cannot access a property or method of a null object reference.
I am trying to control some of the global variables in my script through an external text file.I have a variable called "_global.scrollOrNot", which determines whether I want flash to use the text window with a scroll-bar or the one without a scroll-bar. I am trying to control that through an external text-file called "ScrollCommand.txt". Here is my code:
the external txt states:
&sb1WindowScroll=yes
frame1:
_global.scrollOrNot;
[code]....
this is were I have a problem. It will always choose "MCtextFeldSB1noscroll". I have tested the whole thing with other variables, which were not changed by any LoadVars function and it works just fine then. As soon as I change the variable using the LoadVars function it will not work any more.
i'm now working on a project using action script 3 now what i'm trying to make is a Main SWF that load whatever other swf into it the tricky thing is that i used 1 xml document read the external swf source nad it's setting(such as it's x,y position and it's width and height) and i'm having problem setting it's width and height (i mean the loaded swf width and height)[code]
View 2 Repliesi want to add a external swf to be a background of my swf.
then i want to be able to add a external swf over the top as well.
so 2 layers.
1 swf playing in the back and then another external swf over the top.
because as i have it now i cant add anything new to my old swf! and i need to keep it the same.
so i just want to add a new scroller at the bottom is all, over the old swf movie
can i do this with load movie?
In my timeline I have different link hot spots, so that each product will link to a separate web page (externally).I don't think this is going to work:When I upload the Flash file to a server to test, the links show me the 'pointing finger' icon, but when clicked upon it does not even open another web page attempting to follow the link. - that tells me this doesn't work!I need to get this correct for when the final goes live. What am I missing? Should I try the extension? (product01.asp)
View 6 Repliesi'll be straight to point,well i'm now working on a project using action script 3 now what i'm trying to make is a Main SWF that load whatever other swf into it the tricky thing is that i used 1 xml document read the external swf source and it's setting(such as it's x,y position and it's width and height) and i'm having problem setting the loaded swf width and height btw it's an desktop application and not a website application.,
[Code]...
how I can declare a variable that is retrievable when the browser reloads.
View 7 RepliesI have a question about setting up an image array from an external source. I have the following action script and would like to edit it so that it reads from an external file. Either TXT or XML. how to edit the array action.
CODE:
spacing = 10;
image_array = ["image01.jpg", "image02.jpg", "image03.jpg", "image04.jpg", "image05.jpg", "image06.jpg", "image07.jpg", "image08.jpg", "image09.jpg", "image10.jpg", "image11.jpg", "image12.jpg", "image13.jpg", "image14.jpg",
[Code]......
How can I set the width and height of a external swf when it is loaded in to the holder?
View 1 RepliesI 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.
/flashViewer.swf
/myContent/someProgram/program.swf
/myContent/someProgram/audio/sound1.wav
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 have a flash file(full link to flash looks like [url]... which loads mp3-file(link to mp3 I send with php through flashvars)
I've embed dynamically(with swfobject) this swf to my page. It's ok. Then I send ajax-request to script, which reloading div with flash. Div is empty.
Experimentally I found out that I've trouble with relative paths. Flash file embed with this address ./swf/audio/player.swf and mp3-address is ./media/audio/user/1/random.mp3.
I am loading the SWF just fine, but I want the SWF to fit the root stage exactly. What happens instead is that the external SWF seems to include white space from around itself.
For example, the author-set width of the Tanks game (an example file I was using) is 550px, but when I set the width of loadEvent.currentTarget.content.width to 550px, the game is resized to maybe 350px width. I have to set the value of loadEvent.currentTarget.content.width to something like 640 in order to get the game itself to make full use of those 550 pixels.
Code:
package {
import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;
[Code].....
I have CS4 with AS3. I hard-coded values for cWidth and cHeight instead of getting them from flashvars because I am just testing in the IDE right now. Normally I would get those vars from flashvars.
My project consists of various external SWF files and also uses SWFAddress. What I want is the internal state of some external clips to set the SWFAddress value.
View 1 RepliesI have this base class
package sevengames.miranda.front.res {
import flash.display.MovieClip;
import flash.text.TextField;
[Code].....
I then, in the Flash document, create a movie clip which has this class set as the "Base class" in the properties. However, if I then do this.updateText(); in the movie clip's frame script, it complains
TypeError: Error #1006: updateText is not a function.
at miranda_fla::MenuButton_3/frame1()
Why doesn't it work? I know the class is read and compiled, because I had an error there which was reported.
If I've already specified in the symbol's package which class the symbol's class extends, do I still need to specify the base class in the symbol properties dialog?
View 2 Replieswhen I create a new flash project, I would like to put the source files in /src/ folder.When I try to add the base class to my project, flash can't find it.I've added the folder "src/" to source paths, in flash preferences.
View 2 RepliesI have a class "BaseMenu", which, needless to say, is a base class to menus that have eventlisteners. When I trigger the function to remove the menu itself, I don't know how to remove these eventlisteners, since their respective functions are in the extended classes, not in "BaseMenu".
Code:
//...
public function BaseMenu() {
this.cacheAsBitmap = true;
alpha = 0;
y = 400;
[Code] .....
I am trying to build a website completely in flash or in other words its complete but the problem is of linking. I can't build the entire website in one single flash file coz it is so heavy that it will take terrible time to load hence i decide to break them in different files so to make loading easy. Now the problem is it works great at my classes but when i try to do it some where else the links not work at all... Now a little about my project I am not using any complicated action script just simple get url
View 4 Repliesi'm trying to work with flash, can any one tell me how to put a text in the flash base website do i have to use html?
View 1 RepliesI have a gfx which I have created 6 shapes and converted them into simple buttons. I have urls sat inside an xml file. How can I get the buttons to use the urls set from within the xml file?Also how can I change the current external photo that is being loaded to load the url from a setting in the same xml file.
View 9 Replies