ActionScript 3.0 :: SetProperty() Will Not Work?
Jul 27, 2007I seem to have found a bug.....setProperty() will not work
View 5 RepliesI seem to have found a bug.....setProperty() will not work
View 5 RepliesI'm trying to do something pretty simple: I am duplicating a movie clip and setting the _x and _y properties of the duplicate. The reason it is driving me up the wall is that the code works if I export for Flash Player 6, but not for anything later, and according to the sites I've read this code should work. I don't want to get into this project (which is big) and find out later that I can't export for such an old player.Here's the code:
Code:
function createBalls(ballNum) {
var newClipName:String = "ball" + ballNum;
[code].......
first have a look at this: [URL] It loads "auto" coordinates from php file, and makes the "auto" move after timeinterval. It is needed tht it could load infinate coordinates, but i fail to do it. If u change setProperty(auto, _x, kord ) to setProperty(auto, _x, x2 ) , it works, but as u can see only with one coordinate.
View 9 RepliesWhen state is changed, we can define the new properties for the new state overidding the properties of the base state.
But, I had a doubt. What is the difference between using setProperty() and removeChild() in Flex ?
Take the following case.
Suppose there are 2 Vbox inside the application container. When the state is changed by some event, I need only 1 VBox in the appln container.
(a) Should I set setProperty for that particular VBox of width and height to 0 ? or (b) Should I remove the VBox from the new state by using removeChild() property ?
I have read this a few times, however, I never really understood the alternative. Please help me understand.How would I, without SetProperty, change the _alpha of a movieclip defined by a variable.With setProperty I would define the variable(which obviously will be changing, therefore a variable is needed):var movieClip = "_root.someMovieClip_mc"setProperty(movieClip, _alpha , 50)
View 5 Repliesi want to duplicate a movie clip b1 and create ball1 to manipulate them with setproperty, and the same for b2 but this one into ball2. when i execute this code it would only do it for b1 and not for b2.
Julie(^_^)
var x1=50
var y1=100
var x2=60
var y2=89
[Code]...
I'm having some problems setting _x and _y positions of a movie clip attached (into a clip on a masked layer) using attachMovie. The code should position the clips icon1-8 on the y axis (100 pixels Ipart). The destination movie clip (the one with the actions) resides in a masked layer, I remember reading that there were some problems with masked layers in version 5. (i'm using flash MX). The movie clip is _root.openwindow.files
onClipEvent (load) {
for (var counter=1; counter<9; ++counter) {
this.attachMovie("icon", "icon"+counter, counter);
this["icon"+counter]._x= 37;
this["icon"+counter]._y=counter*100;
}}
I am pretty sure there is nothing wrong with the code.. as it works outside the masked layer..
I've 2 mc in timeline instance names are:
form1
form2
in first frame I wrote the following code
setProperty(form1, _alpha, 50);
setProperty(form2, _alpha, 50);
this works ok. but the question is... multiple targets, how could I do something like this:
setProperty((form1; form2), _alpha, 50);
although I know this doesn't work... how could I setProperty of more than one instance?
I can't seem to get setProperty to affect any change detectable by getProperty, or any other means.
* Can you please help me find and fix the problems in my code? Also, it would be great if you could provide a snippet of code to both read/write to the SO from the Flash swf client, and changes required in the FMS server-side code to receive events onSync from another FMS server (also sending to another FMS server.. I know it should be very similar in theory).
[Code]...
Is the setProperty method only applicable to remote shared objects and not to local shared objects? The following code works fine:
Code:
web_so.setProperty("web", "someURL");
trace(username_so.data.Name);
Where 'web_so' was earlier declared as a remote shared object. When the above line of code is parsed, the bbc website opens in the browser and the trace statement get's printed in the output cosole. However if I were to replace the web_so...code witht the following:
Code:
username_so.setProperty("web", "someURL");
trace(username_so.data.Name);
Where 'username_so' was earlier declared as a local shared object. The trace statements prints out fine, but the brower dosent fire up at all. Which makes me wonder if the 'setProperty' method is something unique to remote shared objects, but I dont see the API mentioning that.
got stuck with this... I've 2 mc in timeline instance names are: form1 form2 in first frame I wrote the following code
[Code]...
this works ok but the question is... multiple targets, how could I do something like this: setProperty((form1; form2), _alpha, 50); although I know this doesn't work... how could I setProperty of more than one instance?
how can i set alpha property in flash mx without using the setproperty action. when i use setproperty action to change alpha value ,the graphic doesn't animate.
View 3 RepliesCan anyone translate this AS2 code to AS3? I tried myself but I am having a problem with the setProperty method. Code is pasted and here's the link to the source files.
[Code]...
I am trying to defeat my psychological block with dynamically loaded fonts in AS3, and I have an annoying problem. I am creating a clock with a textfield and I am loading fonts from a SWF library: the available classes/linkages are "Arial", "ArialBold", "MyriadPro", "MyriadProBold" and "Verdana".This is the line where I get the class from the SWF, and it extracts the class correctly
Code:
clock = new Clock( { fontClass: assetsLoader.getFontClass("skin", "Arial") } );
The constructor...
[code]......
I have run across a strange problem. When I load products2.swf by itself, I can call the two "copy" files and everything works. When I open 0342.swf (the index page), I can switch between the home and products2 pages, but I can't view the "copy" pages.I'm guessing there may be some sort of conflict with variable names, but I have been messing with it for most of today.I have uploaded all of the FLA files to here:[url]....
If you make an swf file out of each of the attached items, and open the 0342 file, you will see what is supposed to be happening.
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "home";[code].....
I have a button object that I need to scale to align with the variable width of an array of images.However, when I set the width in code, the button does not actually become that width. Tracing out the width gives me the correct value, but on screen.. it's off.
I've proved it to myself by scaling the same button object manually in the properties pane and visually comparing. Both of the buttons below have a width of 410.
Code:
navigatorDown_btn.width = 410;
navigatorDown_btn.x = (stage.stageWidth/2)-(navigatorDown_btn.width/2);
trace(navigatorDown_btn.width); // output: 410
I am using Flash CS4 with actionscript 2 to create an interacitve portfolio.I have 2 text buttons that work when I test them with "enable simple buttons." When I publish to IE these buttons won't work. I have created over 50 buttons using the same methods, they all work.
View 8 RepliesI have a completed project (AS2) that contains a lot of FLVs. I burned it onto DVD and it works great on Mac (guide.app) and PC (guide.exe).Here's the web version of the project.http:[url]....Now, months later, I have to provide the project with source files (FLA's) and some other stuff - so I got an external HD, copied the files from the working DVD onto it. Running the guide.exe off of the external (connected to WinXP SP3) works just like running it off the DVD - EXCEPT for the FLVs which simply to not appear.
http:[url]...Everything up to that step works: When I click on "guide.exe", the "splash screen" opens showing the title and 4 buttons. These buttons are to choose a language and they work.When I select a language and click its button the GUI for the language with menus appear and they work. When I click on a topic from the menu, the topic's skin appears but the video inside the skin doesn't play. Everything works but the FLVs.
Even weirder - If I use VLC Player to open an FLV directly - the FLV will play. That tells me there is some path issue but how can a path change when it's compiled into the SWF? Besides - the paths from swf to flv has not changed when I copied all the files to the external.why the FLVs will not play on the external the same way they play when on the DVD?
i have a flash that I have tried to add my html link to the aboutus.htlm, billboard.html, and contac.html and it is not working? I am still new but would like to email the flash file for someone to tell me why its not working- I added the link for aboutus.html but its not working.
View 6 Repliesalright, here is the deal: i have published a .swf AND a macintosh projector file and the only thing the movie contains is one button with a link to a web page. here is my actionscript:
on(release) {
getURL("http://www.google.com");
}
i click on the button and absolutely nothing happens. has anyone ever come across something like this? is this a settings problem?
Whenever I try to import any .wav, .mp3, or any other kind of file, it always says that there was a problem reading them.
View 2 RepliesI have a swf that is pretty complicated, you can interact with the page and go to different keyframes and it stops and/or starts depending on buttons, but I want to put it in a fla or something so I can put other swfs next to it and build it up and put several of them together as one.
I don't care about making it too complicated, I just want one interactive swf to go to the next compiled swf when that movie ends, but when I try importing it or loading it it just runs straight through without stopping or paying any attention to the scripting.
The Listbox is populated with the category and the image and caption is being shown in the correct place but the list box doesn't function and the images cycle through all and not just the ones in that category.Here is my code
Code:
var ssx:XML = new XML();
ssx.ignoreWhite = true;[code]...........
I have created a simple site in flash cs 4 using AS2.0. The nav bar buttons are text. I have made them into Movie Clips and put actionscript onto the MC instance which looks like this: [code]The button does not work. I have converted the symbol to a button and kept the Actionscript on the instance and they do not work. I have in fact copied exactly what I have done on a previous site that worked and it is not working here.The AS is not on the timeline, nor on the button or movieclip but on the instance of it. I am at a loss as to why it doesn't work. When I use the button instead of the MC the button flashes/blinks but still does not work.
View 1 RepliesMacromedia Flash MX 2004 I posted this somewhere else - but then realized no one actually uses that forum except to post ads...
Quote:
onClipEvent(enterFrame){
if(this.hitTest(_root.blaze))
_root.floor.speed = -20;
else{
[Code]...
I won't post the file because I'm using someone else's character and it's fine with them, but I doubt it should be here - this is the only code that's a problem, though.
I am working on a site (in Flash CS5 -- using AS3) with drop-down menus. I finally got my drop-downs to work and was stoked for that. I then decided that I wanted the menu bar to motion tween in from the left. I placed the tween on the bar, and saw the tween line on the stage. However, when I go to test the movie in Flash, or publish it and watch it in my browser, the tween doesn't happen, the bar just stays left of the stage.
View 3 RepliesI have made a swf that loading another swf file,it works well alone. When i put it into a powerpoint file using shockwave flash object,it works only one time. When i close the ppt and reopen it, the swf cannot work.
View 1 RepliesI finished my website and uploaded to internet. And when I showed friends that use IE7, CHROME or any other browser besides FIREFOX it failed to work. The SWF gets stuck at the preloader at a certain percentage but the animation of the preloader still runs. Here is the link (try to watch from different browsers): [URL]..
View 4 RepliesI'm trying to create an informative flash program on Mt. St. Helens about the dust cloud it created when it errupted. I have everything ready to go including the buttons and the pages the screen or next image it should take you to. I'm just stuck on how I get the buttons to actually take you to the next frame.
View 24 Replieshow to work with XML? with a Photo Gallery?Tried to change the image
Before(Still Working)
<?xml version="1.0" encoding="utf-8"?>
<photos>
<photo>
<thumbnail>s_flashmo_175_01.jpg</thumbnail>
[code]....