Help Understanding Why This Code Works - For Loop
I have 4 buttons on the stage. I want to assign each button a unique action by using a for loop to assign the actions to these buttons
This example does not work:
PHP Code:
for (i=0; i<4; i++) {
this["btn"+i].onRelease = function() {
trace("this"+[i]);
};
}
each button traces "this4"
this example does work!
PHP Code:
for (i=0; i<4; i++) {
myBtn = this["mybtn"+i];
myBtn.num = i;
myBtn.onRelease = function() {
trace(this.num);
};
}
each button traces properly.
what I want to know is why, I'm happy that I got this code to work at all, but I would really like to know why the bottom one works, and the top doesn't, so I at least learn from this.
My guess is that it has to do with the incrementing variable ("i") inside the for loop, but I just want to be clear on this.
thanks
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 08-09-2004, 04:26 PM
View Complete Forum Thread with Replies
Sponsored Links:
Help Understanding Why This Code Works - For Loop
I have 4 buttons on the stage. I want to assign each button a unique action by using a for loop to assign the actions to these buttons
This example does not work:
PHP Code:
for (i=0; i<4; i++) {
this["btn"+i].onRelease = function() {
trace("this"+[i]);
};
}
each button traces "this4"
this example does work!
PHP Code:
for (i=0; i<4; i++) {
myBtn = this["mybtn"+i];
myBtn.num = i;
myBtn.onRelease = function() {
trace(this.num);
};
}
each button traces properly.
what I want to know is why, I'm happy that I got this code to work at all, but I would really like to know why the bottom one works, and the top doesn't, so I at least learn from this.
My guess is that it has to do with the incrementing variable ("i") inside the for loop, but I just want to be clear on this.
thanks
View Replies !
View Related
Deeper Understanding Of How RGB-color (and GetPixel) Works.
Hi,
I have gotten the getPixel() function to work, which returns the RGB value of the target at a certain pixel.
However I don't know much about the color information that I get back from it, which is causing me to write half-assed code that I don't really understand myself.
for example, if the value I got from getPixel() from a full green was something like "000 255 000" I would understand it, but instead it is 65280.
How does that make sense?
Here's some other color and it's values:
White: 16777215
Red: 16711680
Blue: 255
Green: 65280
So for example if I get a value of 11423124 (just made up), how do I know what color it is?
What I'm doing is that my game has a greyscale heightmap which I need flash to know the brightness of the pixel where the character stands so that I can set the character sprites size.
So.. does anyone know?
View Replies !
View Related
Need Some Help Understanding This Code...please Help.
I am trying to understand some code for a drop down menu. Below is not all of the code, but if someone could explain frame 2 especially to me I think it would help me to understand how this is working. Thank you.
This is on frame 1 of the main timeline...
mymenu1 = new Array("HTML", "1.html", "2.htm", "3.html", "4.html");
mymenu2 = new Array("JavaScript", "1.html", "2.html");
mymenu3 = new Array("Spring", "1.html", "2.html", "3.html");
mymenu4 = new Array("Fall", "1.html", "2.html", "3.html", "4.html");
window = "_blank";
x_iniz = 250// Menu starting X point
y_iniz = -7// submenu starting y point
x_diff = 91// Menu width
y_diff = 15// submenu height
timeout = 10 //Delay to close submenu
This is on frame 2 of the main timeline...
stop ();
// build menu
for (a in _root) {
if (typeof (_root[a]) == "object") {
i++;
}
}
for (var b=1; b<=i; b++) {
_root.attachMovie("menu", "menu"+b, b);
// This attaches the submenu (id, new name, depth)
_root.attachMovie("contenitore", "dummy"+b, 10+b);
//Assigns my1 to menu. It is on _root level.
my1 = _root["menu"+b];
my1._x = x_iniz;
my1._y = 175;
cont = _root["dummy"+b];
cont._x = x_iniz;
cont._y = my1._y+7;
x_iniz += x_diff;
titolo = _root["mymenu"+b][0];
titolo = titolo.toUpperCase();
my1.txt = titolo;
for (h=1; h<_root["mymenu"+b].length; h++) {
cont.attachMovie("submenu", "sub"+y, 12000+y);
my2 = cont["sub"+y];
my2._y = y_iniz+(h*y_diff);
testo = _root["mymenu"+b][h].split('.');
my2.txt = testo[0];
my2.url = _root["mymenu"+b][h];
y++;
}
}
View Replies !
View Related
Help Understanding Code
I found this code to fade music and I need some help understanding what is going on. Firstly, the function to fade the sound. How does that work?
Code:
//**********************************************
// create Sound obj and set volume at 0
//**********************************************
sndObj = new Sound();
//sndObj.attachSound("loop");
sndObj.loadSound("spinme.mp3", true);
sndObj.setVolume(0);
//**********************************************
// function to fade in the sound
//**********************************************
function fadeSnd(speed) {
this.onEnterFrame = function() {
vol+= speed;
if (sndObj.getVolume() == 200) {
trace("sound at max!");
delete this.onEnterFrame;
} else {
sndObj.setVolume(vol);
//show the fade
display = sndObj.getVolume();
}
};
}
Code:
_root.onEnterFrame = function() {
sndObj.start(0, 9999);
fadeSnd(1);
};
View Replies !
View Related
Need Some Help Understanding Code...
I am using a swf decompiler, and i saw these codes and couldn't understand what they were for. if anybody can help me, it would be much appreciated... THANKS!!!
CODE
NUMBER #1.
// [Action in Frame 152]
stop();
_level0:menuexit = "cl_main";
NUMBER #2.
// [Action in Frame 188]
getURL(_level0:menuitem, "_level1");
NUMBER #3.
on (release)
{
gotoAndPlay(153);
_level0:menuitem = "org_m.swf";
}
questions.
#1 - what is '_level0:menuexit'? is it an instance name, a label, a movie clip, a variable?
#2. what's the difference between 'getURL' and 'loadMovie'? this code came from a swf that loads other swf into the parent swf.
#2 and #3 - again, whats '_level0:menuitem', is it an instance name, a label, a movie clip, a variable?
Again, THANKS FOR HELPING A NEWBIE!!!
btw, how do I post the code so that it will appear exactly as seen from flash?
View Replies !
View Related
[F8] Understanding This Code
Hello, I posted this on the Flash ActionScript board originally and thought it would help if I posted this on another board at the same time.
I was wondering why I had to use different paths to call two separate button instances that are placed inside of the same movie clip. Immediately you may assume that they are not inside of the same movie clip, but believe me, they are. The full code is here:
Code:
this._lockroot = true;
viewpic_btn.onRelease = function() {
_root.createEmptyMovieClip("target_mc", 1);
target_mc._x = 79;
target_mc._y = 140;
target_mc.attachMovie("inlineID", "showInline_mc", 5);
};
viewpic2_btn.onRelease = function() {
_root.createEmptyMovieClip("target_mc", 1);
target_mc._x = 309;
target_mc._y = 145;
target_mc.attachMovie("remoteID", "showRemote_mc", 5);
};
viewpic3_btn.onRelease = function() {
_root.createEmptyMovieClip("target_mc", 1);
target_mc._x = 535;
target_mc._y = 139;
target_mc.attachMovie("internalID", "showInternal_mc", 5);
target_mc.showInternal_mc.magiclung_btn.onRelease = function() {
getURL("http://www.us-appliance.com/magiclung.html", _blank);
};
};
_root.target_mc.closeWindow_btn.onRelease = function() {
_root.target_mc.removeMovieClip();
};
The bit of code that I am referring to where the two buttons are in the same mc is the last chunk:
Code:
viewpic3_btn.onRelease = function() {
_root.createEmptyMovieClip("target_mc", 1);
target_mc._x = 535;
target_mc._y = 139;
target_mc.attachMovie("internalID", "showInternal_mc", 5);
target_mc.showInternal_mc.magiclung_btn.onRelease = function() {
getURL("http://www.us-appliance.com/magiclung.html", _blank);
};
};
_root.target_mc.closeWindow_btn.onRelease = function() {
_root.target_mc.removeMovieClip();
};
"closeWindow_btn" and "magiclung_btn" are both inside of "showInternal_mc" which is attached to the empty mc "target_mc." I also use instances of "closeWindow_btn" in the other two mc's "showRemote" and "showInline." I would really like to understand what is going on here, if anyone could please provide some insight. It does not make sense to me that you would have to write two different paths to get to the same location for something.
Thanks...
View Replies !
View Related
Help With Code Understanding... (MX's Drawing API)
OK. This is the code I'm trying to understand (like what it does):
createEmptyMovieClip("myClip",1);
myClip.lineStyle(1,0x000000,100);
onMouseDown = function () {
myClip.moveTo(_xmouse, _ymouse);
onMouseMove = function () { myClip.lineTo(_xmouse, _ymouse);};
};
onMouseUp=function(){
onMouseMove=null;
}
Here's what I get:
1. The first line creates an empty movie clip, names it "myClip" and gives it a depth of 1. Question: What do they mean by "depth"?
2. The second line uses MX's drawing API to define a line style for myClip --> Explanation of that entire thing?
3. This line invokes a developer-defined function whenever the mouse is pressed down, thereby creating an "action-based" loop for interactivity. Q: Why is it just "function()"?
4. This line physically moves the MC "myClip" to the x and y coordinates of the mouse.
5. Last three lines I don't get at all.
Help much appreciated,
-Avenger
View Replies !
View Related
[AS2] Help With Understanding Aspects Of Code
Hello,
I've been a loyal lurker for a long time. I've recently elevated my ActionScript learning, and I'mgoing to need help from my Kirupian brothers and sisters. At the same time, I'll try to help where I can.
Now, I've got a series of questions that I can't easily find the answers to, so I'm going to ask them here. If you need me to clarify for expand on a question, please let me know.
1. init object ...what does this mean?
2. listener... I'm wrapping my head around what this means, but I just need a clear definition.
3. instantiate variable: I just need a clear definition of what this means. I'm pretty certain I understand what it does, but I'd just like it in plain english. I use external AS files, which is formatted with commented-out sections to write my code. So, I have an 'instantiate variables' section.
4. Can I use MovieClipLoader to bring in an .swf?
5. If I use mcl or attachMovie, can I use easing?
6. If I have 20 movie clips, should they reside in one keyframe? Or should each movie clip have it's own layer? I'm constructing my projects using one keyframe, and external AS files.
See? That's it. Just some basic stuff, I'm sure.
Thanks in advance!
View Replies !
View Related
Understanding Action Script Code
--lol, it might be easiest to read the help file! sorry guys and gals
(I'm using Flash 5, and I am a flash novice)
I have some programming experience already...
Ok I have learned most of C++(all but graphics), some Pascal(basic graphics), and BASIC, I learned last but fast.
So I think I'm pretty smart, at least at programming languages.
Now I'm trying to understand action script code, but I don't know if it would be easier to try and just look at written code, or look through the tutorials on actionscript... It seems most of the tutorials are for people who have had no programming experience before. So basically I was wondering if there are any tutorials with code breakdown, where they decribe it line by line, and what everything does, rather than saying just what the whole program does.
OR would it be easier to read about the basic types in code, like data types, primative and reference, and objects, and then learn from other's coding?
Fortunately I can understand WHAT they are doing, I just don't know what symbols flash uses; For Example: With methods/functions; To get the hour with time, the method returns the number of the hour with the method "getHour()". And then with objects, (like class objects in C++), it goes "this.getHour()"
So what do you think would be easier:
Reading Code or Searching for Tutorials?
Thanks, and Happy New Year, Woo HOO!
View Replies !
View Related
External SWFs, Code Works But Not With Additional Code
I'm using a loadMovie code that works perfect by itself, but when I add additional code to the button, it doesn't work.
Here's the scenario:
I have an MC named songs In this MC I have several buttons that should each perform very similar actions.
The first action is a:
gotoAndPlay("somewhere"); action that takes the movie to a specific frame of this MC. This code by itself works fine.
The second action I need to happen is:
this.contents.loadMovie("music1.swf") which loads an external SWF which is nothing more than an MC with an audio clip. This code, by itself works fine.
The problem comes when I combine the two codes to create:
on (release)
{
gotoAndPlay("somewhere");
this.contents.loadMovie("music1.swf");
}
The movie does go to the "somewhere" frame, but the external SWF no longer loads.
I have tried it with _root.songs.contents.loadMovie("music1.swf");
I have tried placing the loadMovie code first, but neither of those solutions work.
Any ideas?
Thanks
View Replies !
View Related
Pausing Execution Of Code In A For Loop Between Each Loop. Howto?
I have a for loop which runs x amount of times and between each loop i'd like to implement a small pause of execution of the code. How would i do that? Can something like that only be done using a timer? If so how would i go about doing that and what things should i import? (Trying to do this in a class)
Though i'm wondering if there's an easier way than timers to be able to do something like that, like C's sleep() function for example.
View Replies !
View Related
For Loop Works For All But OnRelease
i am making a basic picture viewer....and trying to better understand for loops. i have the 7 thumbnails programatically generated and positioned. The onRollOver, and onRollOut effects work fine for each. The only thing i am not understanding is how to make each thumbnail upon onRelease unique...in other words, i have to write the onRelease functions seperately for each thumbnail in order to bring a new large picture to the stage....is there a way to do this within the "for" loop- or at least more dynamically?:
Code:
function loadImages(myXML) {
var mcImage:MovieClip;
// Load the four images.
for (var i = 0; i<=7; i++) {
frames[i]._visible=false
mcImage = this.createEmptyMovieClip("mcImage"+i, this.getNextHighestDepth());
mcImage.createEmptyMovieClip("mcHolder", mcImage.getNextHighestDepth());
mcImage._alpha = 30;
mcImage.onRollOver = function() {
upAlpha(this);
};
mcImage.onRollOut = function() {
downAlpha(this);
};
mcImage0.onPress = function() {
loadBigImage(0);
};
mcImage1.onPress = function() {
loadBigImage(1)
};
mcImage2.onPress = function() {
loadBigImage(2)
};
mcImage3.onPress = function() {
loadBigImage(3)
};
mcImage4.onPress = function() {
loadBigImage(4)
};
mcImage5.onPress = function() {
loadBigImage(5)
};
mcImage6.onPress = function() {
loadBigImage(6)
};
mcImage7.onPress = function() {
loadBigImage(7)
};
var mclLoader:MovieClipLoader = new MovieClipLoader();
var mclListener:Object = new Object();
var mclLoader:MovieClipLoader = new MovieClipLoader();
mclLoader.addListener(mclListener);
//this listerner will always refrence the clip immediately loaded
mclListener.onLoadInit = function(mcClip:MovieClip) {
if(nX==undefined){
nX=Stage.width/2-(mcClip._width +200);
nY=20;
}
mcClip._parent._x=nX;
mcClip._parent._y=nY;
nX+= mcClip._width+10;
if (mcClip._x>Stage.width){
//define method to start second row
}
};
mclLoader.addListener(mclListener);
mclLoader.loadClip("images/"+myXML.firstChild.childNodes[i].attributes.thumb,mcImage.mcHolder);
}
}
function loadBigImage(index) {
var bigImageX:Number;
var bigImageY:Number;
var bigImageLoader:MovieClipLoader= new MovieClipLoader;
var bigImageListener:Object= new Object
bigImageListener.onLoadInit=function (mcCurrentBigImage:MovieClip):Void{
mcCurrentBigImage._alpha=80;
/*if(bigImageX==undefined){
bigImageX= Stage.width/2- (mcCurrentBigImage._width)/2
bigImageY= Stage.height/4-50;
}
mcCurrentBigImage._x=bigImageX;
mcCurrentBigImage._y=bigImageY;*/
}
bigImageLoader.loadClip("images/"+myXML.firstChild.childNodes[index].attributes.picture, imageTank);
bigImageLoader.addListener(bigImageListener);
}
var myXML:XML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(success:Boolean) {
if (success) {
loadImages(this);
}
};
myXML.load("images/images.xml");
View Replies !
View Related
Same Code Works In One SWF, Not In Another
I've got two different SWF's that basicaly are nothing more than text with a little bit of a background. Each SWF has a "print" button with the following code:
SWF #1 code
on (release) {
print("Date", "bmovie");
}
"Date" is the name of the MC I'm trying to print
SWF #2 code
on (release) {
print("Bytes", "bmovie");
}
"Bytes" is the name of the MC I'm trying to print.
In both cases the "Print" button will cause my computer to open a print options window with 2 options, print or cancel. With SWF #1, it works perfectly and the SWF prints. With SWF #2 the print option window buttons are not active. The cancel button only becomes active after I click on some nother application I have open, then click back to it. The print option never becomes actove.
Any idea whats going on?
Thanks for the help
View Replies !
View Related
[AS3][help] Code Works W/ A 404
coding in as3 is getting easier everyday but I'm not a guru yet. My code makes curvy lines. The problem is, is that i get this error
<pre>
TypeError: Error #1010: A term is undefined and has no properties.
at liner/::init()
at liner$iinit()
</pre>
this is my code
<pre>
package {
import flash.display.Sprite;
public class liner extends Sprite {
public function liner() {
init();
}
private function init():void
{
graphics.lineStyle(1,0xff0000,1);
graphics.moveTo(200,200);
var points:Array = new Array();
for (var i:int =0; i<10; i++) {
points[i]=new Object();
points[i].x=Math.random()*550;
points[i].y=Math.random()*110;
}
for (i =0; i<10; i++) {
var dx:Number=(points[i].x+points[i+1].x)/2;
var dy:Number=(points[i].y+points[i+1].y)/2;
graphics.curveTo(points[i].x,points[i].y,dx,dy);
}
}
}
}
</pre>
the code works so why do i get this 404?
View Replies !
View Related
The Above Code Works The Way It Should
on (press) {
d = this._currentframe;
if (d== 3) {
this.gotoAndStop(1);
}
if (d== 1) {
this.gotoAndStop(3);
}
}
the above code works the way it should
this one below dosn't . Arn't they the same code?
on (press) {
if (this._currentframe== 3) {
this.gotoAndStop(1);
}
if (this._currentframe== 1) {
this.gotoAndStop(3);
}
}
View Replies !
View Related
Code Works With 1.0 But With 2.0 ?
Hi .. my deadline is comming closer and the costumer demands an arc text function, which I found here: http://www.kirupa.com/forum/showthread.php?t=54700
The problem is that it works with actionscript 1.0, but not with 2.0 .. I just dont know what to do!
heres the code:
Code:
rad = 120;
word = "Kirupa rules the Flash universe";
center = {x:Stage.width/2, y:Stage.height/2};
// make sure you have a dummy textfield with the same settings as below on
// the stage, and that the dummy text field's font is embedded. Otherwise,
// the arc text won't show.
textformat = new TextFormat();
textformat.color = 0x000000;
textformat.font = "Arial";
textformat.size = 12;
// -------------------------------------------------
Math.toRadians = function(d) {
return d*(Math.PI/180);
};
Math.toDegrees = function(r) {
return r*(180/Math.PI);
};
Math.convertAnglesForRotation = function(angle) {
var newAngle = 0;
if (angle>=0 && angle<90) {
newAngle = 90-angle;
}
if (angle>=90 && angle<270) {
newAngle = -(angle-90);
}
if (angle>=270 && angle<0) {
newAngle = 90+(360-angle);
}
return newAngle;
};
MovieClip.prototype.drawArcText = function(txt, txtformat, radius, centerx, centery) {
var letters = txt.split("");
var textformat = txtformat;
for (var i = 0; i<letters.length; i++) {
this.createEmptyMovieClip("_arctext_"+i, i);
var rotationAngle = Math.toDegrees(Math.PI-((Math.PI/(letters.length-1))*i));
var positionAngle = Math.PI+(Math.PI/(letters.length-1))*i;
this["_arctext_"+i].createTextField("letter", 1, 0, 0, 1, 1);
this["_arctext_"+i].letter.autoSize = true;
this["_arctext_"+i].letter.embedFonts = true;
this["_arctext_"+i].letter.text = letters[i];
this["_arctext_"+i].letter.setTextFormat(textformat);
this["_arctext_"+i].letter._x = -this["_arctext_"+i].letter._width/2;
this["_arctext_"+i].letter._y = -this["_arctext_"+i].letter._height/2;
this["_arctext_"+i]._x = centerx+Math.cos(positionAngle)*radius;
this["_arctext_"+i]._y = centery+Math.sin(positionAngle)*radius;
this["_arctext_"+i]._rotation = Math.convertAnglesForRotation(rotationAngle);
}
};
this.createEmptyMovieClip("arc", 1);
arc.drawArcText(word, textformat, rad, center.x, center.y);
View Replies !
View Related
Code Works With 1.0 But With 2.0 ?
Hi .. my deadline is comming closer and the costumer demands an arc text function, which I found here: http://www.kirupa.com/forum/showthread.php?t=54700
The problem is that it works with actionscript 1.0, but not with 2.0 .. I just dont know what to do!
heres the code:
Code:
rad = 120;
word = "Kirupa rules the Flash universe";
center = {x:Stage.width/2, y:Stage.height/2};
// make sure you have a dummy textfield with the same settings as below on
// the stage, and that the dummy text field's font is embedded. Otherwise,
// the arc text won't show.
textformat = new TextFormat();
textformat.color = 0x000000;
textformat.font = "Arial";
textformat.size = 12;
// -------------------------------------------------
Math.toRadians = function(d) {
return d*(Math.PI/180);
};
Math.toDegrees = function(r) {
return r*(180/Math.PI);
};
Math.convertAnglesForRotation = function(angle) {
var newAngle = 0;
if (angle>=0 && angle<90) {
newAngle = 90-angle;
}
if (angle>=90 && angle<270) {
newAngle = -(angle-90);
}
if (angle>=270 && angle<0) {
newAngle = 90+(360-angle);
}
return newAngle;
};
MovieClip.prototype.drawArcText = function(txt, txtformat, radius, centerx, centery) {
var letters = txt.split("");
var textformat = txtformat;
for (var i = 0; i<letters.length; i++) {
this.createEmptyMovieClip("_arctext_"+i, i);
var rotationAngle = Math.toDegrees(Math.PI-((Math.PI/(letters.length-1))*i));
var positionAngle = Math.PI+(Math.PI/(letters.length-1))*i;
this["_arctext_"+i].createTextField("letter", 1, 0, 0, 1, 1);
this["_arctext_"+i].letter.autoSize = true;
this["_arctext_"+i].letter.embedFonts = true;
this["_arctext_"+i].letter.text = letters[i];
this["_arctext_"+i].letter.setTextFormat(textformat);
this["_arctext_"+i].letter._x = -this["_arctext_"+i].letter._width/2;
this["_arctext_"+i].letter._y = -this["_arctext_"+i].letter._height/2;
this["_arctext_"+i]._x = centerx+Math.cos(positionAngle)*radius;
this["_arctext_"+i]._y = centery+Math.sin(positionAngle)*radius;
this["_arctext_"+i]._rotation = Math.convertAnglesForRotation(rotationAngle);
}
};
this.createEmptyMovieClip("arc", 1);
arc.drawArcText(word, textformat, rad, center.x, center.y);
View Replies !
View Related
Loop Check Works As Long As Needed Number Isn't Last
for detecting straights in my poker game, I've got this:
ActionScript Code:
//this array works: [6, 9, 10, 11, 12, 13, 2]
//
straightArray = [2, 6, 9, 10, 11, 12, 13];//this one doesn't
function straightCheck() {
sCounter = 0;
for (var i = 0; i<straightArray.length; i++) {
if ((straightArray[i] == straightArray[i+1]-1)) {
sCounter++;
doublecheck();
} else {
sCounter = 0;
continue;
}
}
}
function doublecheck() {
trace("here is sCounter = "+sCounter);
if (sCounter>4) {
trace("made straight");
if (someScenario) {
doSomething();
}
}
}
this works fine SO LONG AS the card number that finishes off the straight IS NOT the last number in the array. If you need the last number to make the straight, you're out of luck. The sCounter will have only gone up to four and stopped on the last one - not counting it, even though you're very disappointed with it, and browbeating it.
For those who need a refresher, a straight is a string of five cards whose values are in consecutive order - 2,3,4,5,6, or 10, 11, 12, 13, 14 (ten, jack, queen, king, ace).
Anyway, I've tried a slew of different -/+/i combinations. I've been working on this one little thing for about 6 hours now. I'm well beyond the point of frustration - I've gone to plaid. Just a tepid, somewhat eerie slant to my grin, as if to say I may just start throwing sh*t around and barking.
this array works: 5,9,10,11,12,13,14
and the one in there now doesn't - and it's because
View Replies !
View Related
Understanding The "for" Loop?
Hi,
I have a bit of a problem with a dynamic grid I am trying to create.
It consists of 10 squares x 10 squares. I am trying to put down multiple instances of the same clip on the stage using a "for" loop.
As it is at the moment, I can put down the first row. How do i populate the rest of the grid?? (ie. jumping down a row every time it reaches the end.)
Please take a look at my .fla
Thanks
Chris
View Replies !
View Related
Code Works In IE, Not In Netscape 4.5 Or 4.7
We have the following code assigned to a button on our movie. It works fine in IE 5 (Mac and PC) and Netscape 6 (PC)but does not work in IE 4.5 or Netscape 4.7 or older. (MAC)
Code looks like this:
on (release, keyPress "<Enter>") {
if (password eq "password" or password eq "PASSWORD" or password eq "Password") {gotoAndPlay ("thank you", 1);
} else {password = "";
}
}
on (release) {
Key.ENTER;
if (password eq "password" or password eq "PASSWORD" or password eq "Password") {
gotoAndPlay ("thank you", 1);
} else {password = "";
}
}
Any thoughts?
View Replies !
View Related
Eval Code That Works In 5 & Not MX :(
I've the the following code which works & compile fine in Flash 5 but won't compile in MX
items=20;
for (i=0;i<=items;i++){
_root.floorCheck=new Object();
eval("_root.item"+i+"ac")="empty";
eval("_root.item"+i+"tpL")="empty";
eval("_root.item"+i+"tpM")="empty";
eval("_root.item"+i+"tpH")="empty";
eval("_root.item"+i+"ex")="empty";
}
I'm basically trying to setup lots of varibales, without using array because those variables will be update & load from text file.
Can anyone tells me while they compile in 5 & not MX?
View Replies !
View Related
This Code Works But It's Passe
Could someone convert this code to Flash MX syntax(i.e. dispose of the "tellTarget" and implement a dot syntax)
PHP Code:
on (release) {
_root.currentMovie = "contact";
if (_root.movieCont._currentframe> 500){tellTarget("_root.movieCont"){gotoAndPlay("end");}}
else{
tellTarget("_root.movieCont"){gotoAndPlay(_totalframes-_currentframe);}
}
}
I tried with little luck
thanks
View Replies !
View Related
This Code Works With One Movie And Not Another
Somebody wrote this on another post to help load and align a movie inside another movie:
--------------------------
_root.createEmptyMovieClip( "receptor" , 4 );
_root[ "receptor" ]._x = 100; //change X position
_root[ "receptor" ]._y = 50; //change Y position
_root[ "receptor" ].loadMovie( "scrollbar.swf" );
---------------------------
Where "scrollbar.swf" is the movie I want loaded.
Anyway, it works in some movies when I test it out, but when I try and put it in other movies, to do the same thing, it doesn't work.
As a matter of fact, if I take the movie that it does work with, and copy and paste the whole thing onto the other one that doesn't work, then that one stops working too! Get it? The loaded movie never shows up.
Any idea? Is this code not for flash mx?
View Replies !
View Related
Code Works On One Button...not Another
I have a button that sits on all frames of my main stage with this code:
on (release) {
gotoAndStop("sheryl");
_root.audiomc.loadMovie("sheryl.swf");
spectrum.gotoAndPlay("start");
}
This button works perfect.
This exact code works on one button, but doesn't on another. On the second button, the playhead does go to the labeled frame and the "spectrum" MC plays, but the external SWF doesn't load.
I've checked and the empty mc is sitting on all the appropriate frames. Both buttons sit on the main time line.
What could be the reasons behind the code not working on the second button?
Thanks
View Replies !
View Related
Code That Works In Mx6.0 But Not In Mx2004
A game that is working fine when exported from mx6.0 does not work when it is exported from mx2004. Why is that?
Here's the code:
test="smiley"
stop();
SmileyCounter = 0;
while (Number(SmileyCounter)<12) {
SmileyCounter = Number(SmileyCounter)+1;
set(test add SmileyCounter, false);
}
SmileyCounter = 0;
Row = 0;
Column = 0;
while (Number(SmileyCounter)<12) {
SmileyCounter = Number(SmileyCounter)+1;
if ((Number(SmileyCounter)>=1) and (Number(SmileyCounter)<=4)) {
Row = 1;
Column = SmileyCounter;
} else if ((Number(SmileyCounter)>=5) and (Number(SmileyCounter)<=8)) {
Row = 2;
Column = SmileyCounter-4;
} else if ((Number(SmileyCounter)>=9) and (Number(SmileyCounter)<=12)) {
Row = 3;
Column = SmileyCounter-8;
}
Done = false;
while (Number(Done) == Number(false)) {
CurrentSmiley = Number(Math.round(Math.random()*(12-1)))+1;
if (eval(test add CurrentSmiley) == False) {
setProperty(test add CurrentSmiley, _x, Number(((Column-1)*80))+40);
setProperty(test add CurrentSmiley, _y, Number(((Row-1)*80))+40);
Done = true;
set(test add CurrentSmiley, true);
} else {
Done = false;
}
}
}
View Replies !
View Related
LoadMovie Works But I Can't Get The Code To Come In. :O(
I've made a scrolling image viewer using the following code, (yeah I suck at coding. )
_root.onEnterFrame = function() {
movieCenter = _root.centerLine._x;
mousePosX = _root._xmouse;
mousePosY = _root._ymouse;
var speed = (mousePosX-movieCenter)/18;
if (mousePosX>25 && mousePosX<561) {
// slides area
if (mousePosY>459 && mousePosY<545) {
// slides area
for (i=1; i<=7; i++) {
if (mousePosX<movieCenter) {
_root["box"+i]._x += speed;
}
if (mousePosX>movieCenter) {
_root["box"+i]._x += speed;
}
if (_root["box"+i]._x>movieRight._x) {
_root["box"+i]._x -= 977; ;
}
if (_root["box"+i]._x<movieLeft._x) {
_root["box"+i]._x += 977;
}
}
}
}
};
However, when I do a loadMovie on my main movie since I have this a seperate .swf and loading into a mc_holder my images won't scroll when I roll over them. I've tried changing the _root to everything else as well as tried it without the _root etc. Can anyone help me as to how I can get this loaded into my main scene? I will also attach the file so someone else can either use the scroller or at least try doing a loadMovie to get it to work.
Also, can anyone get it to not stop abruptly when you scroll off the hitzone area, right now it just stops and I'd like it to continue at the speed you scrolled off or gradually come to a stop.
Yeah I must really suck. I can't even get a scroller to work when loaded in from a seperate swf. It seems like anything coded that doesn't just have a regular rollover or animation doesn't work when I do a loadMovie to a main scene. Maybe I'm just an idiot but I've tried _root's etc. What do all the good and real flash guru's do to make these coded items work. I know with the one I posted above it needs to be in a certain place for the scroller to work, does the load movie take this into account in the new movie and not allow for cooridinates because the size and dimesnions are different? I've even tried taking off the cooridinate checker that makes you need to have the mouse directly over the movie tho and it still didn't work. I'm just a stupid artist I guess, please help with the code part.
Here's the page it's goin on, so obviously I can make some thing's, but grr don't know what I'm doing wrong with the loadMovie stuff.
http://www.fullthrottlesaloon.com/_new/Site_2-25.html
Thanks
so much!!!
View Replies !
View Related
Code Only Works On Player 6
I have this code that only works if published to player 6. It is an mc with a line that randomly goes up and down on the stage area. But if published to player 7 or 8 e moves only one time and stops. I would like to be able to publish it with player 8.
onClipEvent (load) {
w = 420;
h = 720;
xR = _parent._y;
x = random(w)-xR;
}
onClipEvent (enterFrame) {
if (x-_y>-5 && x-_y<5) {
x = random(w)-xR-_parent._parent._y;
}
_y += (x-_y)/20;
}
Thanks.
kuli
View Replies !
View Related
Code Only Works On Player 6
I have this code that only works if published to player 6. It is an mc with a line that randomly goes up and down on the stage area. But if published to player 7 or 8 e moves only one time and stops. I would like to be able to publish it with player 8.
onClipEvent (load) {
w = 420;
h = 720;
xR = _parent._y;
x = random(w)-xR;
}
onClipEvent (enterFrame) {
if (x-_y>-5 && x-_y<5) {
x = random(w)-xR-_parent._parent._y;
}
_y += (x-_y)/20;
}
Thanks.
kuli
View Replies !
View Related
Code Works In Flash 6 Not 8
Hi, I am new to this forum. I am trying to make some updates to a website designed by another designer. It was originally created in Flash 6. When I saved it to Flash 8 I got this error message:**Error** /Users/myname/Library/Application Support/Macromedia/Flash 8/en/Configuration/Classes/toplevel.as: Line 68: You must export your movie as Flash 6 to use this action.
#endinitclip
I don't know how to fix the problem. Does anyone have a solution? I would appreciate any help or direction. Thanks.
Edited: 03/14/2007 at 01:31:54 PM by stellamay
View Replies !
View Related
Code Works In Flash 6 Not 8
Hi, I really need some help with this one. I've looked through all the forums and across the web and can't find a solution. I am somewhat newish to Flash so i apologize in advance. I am making some basic changes to a preexisting website which was created in Flash 6. When I changed out an image and saved it to Flash 8 I get this message:**Error** /Users/myname/Library/Application Support/Macromedia/Flash 8/en/Configuration/Classes/toplevel.as: Line 68: You must export your movie as Flash 6 to use this action. #endinitclip
Can anyone please please please help me fix this problem with compatibility? I would appreciate any help you can offer.
Thankyou!
View Replies !
View Related
Code Works In For Flash 6 But Not 7
Code:
this.onEnterFrame = function() {
i = i+1;
clip = this.createEmptyMovieClip("eqbar"+i, i);
this.clip._x = 0;
this.clip._y = 0;
with (this.clip) {
lineStyle(1, 0xCCCCCC, 20);
for (var j = 0; j<10; j++) {
z = int(Math.random()*8+5);
beginFill(0x222222, 30);
moveto((j*6), 0);
lineto((j*6), (0-z));
lineto((3+j*6), (0-z));
lineto((3+j*6), 0);
lineto((i*6), 0);
endFill();
}
if (i == 3) {
i = 0;
}
}
};
This code works fine when published in Flash6. However, when I publish in Flash 7 I don't see anything. Any ideas?
View Replies !
View Related
Can Someone Please Explain To Me How This Code Works ?
Hi Guys,
I am pretty new to AS .. i am not too sure how this resizing AS actually get the size of the image n dynmically resizes it ... i hope someone can give me some detailed explanation on how this work.Would be pretty pointless if i just copy codes and not knowing how it really function. Any help is much appreicated
Code:
spacing = 10;
containerMC._alpha = 0;
var pArray = new Array();
var tArray = new Array();
var cur;
MovieClip.prototype.loadPic = function(pic) {
cur = pic;
this._alpha = 0;
this.loadMovie(pArray[pic]);
this._parent.onEnterFrame = function() {
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
bar._visible = 1;
per = Math.round((l/t)*100);
if (l == t && containerMC._width>0 && containerMC._height>0) {
var w = containerMC._width+spacing, h = containerMC._height+spacing;
border.resizeMe(w, h);
bar._visible = 0;
containerMC._alpha = 0;
picinfo.info.text = tArray[pic];
delete this.onEnterFrame;
} else {
bar._width = per;
//gives the bar a max width 100
picinfo.info.text = per+" % loaded";
}
};
};
MovieClip.prototype.resizeMe = function(w, h, pic) {
var speed = 3;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
nav._x = Math.round(this._x-this._width/2);
nav._y = Math.round(this._y+this._height/2+spacing/2);
shadowFollow();
prevb._x = nav._x-5;
nextb._x = nav._x+this._width+5;
nextb._y = prevb._y=this._y-this._height/2;
picinfo._y = nextb._y-5;
picinfo._x = border._x-picinfo._width/2;
if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
this._width = w;
this._height = h;
containerMC._x = this._x-this._width/2+spacing/2;
containerMC._y = this._y-this._height/2+spacing/2;
containerMC._alpha = 100;
delete this.onEnterFrame;
}
};
};
Here's the FLA for the whole code ..
Original FLA by scotty
http://www.kirupa.com/forum/attachme...9&d=1109332771
Thanks Again
View Replies !
View Related
Same Code, Works Once Not Again FRUSTRATING Plz Help :)
ok, i am making a clone of breakout, (pong type game...). i want it so that when all of the blocks get hit, it goes to the next level. i have the code working on the first to levels, so you get to the third level. but the EXACT same code used on the first two levels won't work on the third!! I've been staring at it for an hour now, and it makes no sense, the fla is attached, someone please help
thanks
View Replies !
View Related
Code Works As 2 Buttons, But Not As One?
I've made a little demo fla so you can see what I mean, i can have 2 buttons, one that loads a movie that contains a dynamic text box, when i click first button it loads the movie, then the second one loads teh text into it, if i put the code together, loadmovie, then load text variable into text box, it doesnt work, gets as far as loading the movie, doesn't load the text.
I thought it might be the movie not being fully loaded before trying to put the textfile into it so it wasnt loading anywhere, so I made a function whereby the combined button loaded a variable (the name of desired text.txt) that was updated by each button to see if that would buy it some time but ive never made functions in AS before, might have been poor coding that stopped it. Just so you know what i tried already..
The reason I need it to load the movie is because other buttons load a different movie file and to get back to a text one it will need to load textmov.swf which only has a text box.
well, heres the demo
View Replies !
View Related
FLV Code Errors: Works On 1 Fla, But Not The Next?
I've been experimenting with cue points, and pasted the FLV code from adobe livedocs. This works fine on a blank fla with only the FLV Playback component on stage, but when pasted into a fla with some full browser flash code, I get these error messages:
Code:
**Error** Symbol=intromovie, layer=Layer 2, frame=1:Line 8: Syntax error.
import mx.video.*;
**Error** Symbol=intromovie, layer=Layer 2, frame=1:Line 20: '{' expected
listenerObject.cuePoint = function(eventObject:Object):Void {
**Error** Symbol=intromovie, layer=Layer 2, frame=1:Line 24: Unexpected '}' encountered
};
The code from livedocs:
Code:
import mx.video.*;
my_FLVPlybk.contentPath = "intro_final.flv";
my_ta.visible = false;
// create cue point object
var cuePt:Object = new Object(); // create cue point object
cuePt.time = 2.444;
cuePt.name = "ASCuePt1";
cuePt.type = "actionscript";
my_FLVPlybk.addASCuePoint(cuePt); //add AS cue point
// add 2nd AS cue point using time and name parameters
my_FLVPlybk.addASCuePoint(5, "ASCuePt2");
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
my_ta.text = "Elapsed time in seconds: " + my_FLVPlybk.playheadTime;
my_ta.visible = true;
};
my_FLVPlybk.addEventListener("cuePoint", listenerObject);
How could the same code have errors in a different document? Thanks to anyone who can shed some light on this.
View Replies !
View Related
How Come, Not Much Works With Such Simple Code?
Helle everyone,
I am trying to do a simple task, wich is showing a number in a ball, wich is loaded from a file. Many operation work fine, but there must be a concept I don't get, because, the scene is playing after I ask it in my actions of the first frame. I put the "trace" action to see, and all actions runs, and the trace shows, the film play after i asked for it in my actions. If someone could look at my code and help me with that concept I don't get .
What I want the script to do is
1 - read variablesw from the file and put them in variable .
resultats
2- Then, do the action "for" in wich if variable i = 1 plays the movie with a variable set to the first one read in the file.
3-do the previous action as many times as i want with i that go from 1 to whatever.
4- stops.
If someone can tell me what I do wrong.* My file is zipped. Don't mind french commentary in my file. Thank you
View Replies !
View Related
Get Url No Longer Works With My Html Code
hi !
as something magic happened, a code that i always used stopped to work. can anyone help me?
the code was in flash in a buttom
__________________________
on (release) {
getURL ("http://" + alink);
}
_____________________
and in my hmtl code
______________________
<param name="movie" value="entrada.swf?alink=www.oglobo.com.br">
____________________________________
thanks in advance
View Replies !
View Related
Code Works In Flash 5 Player - Not In 6 Why?
Hi,
I'm using this code to give an 'elastic' effect to buttons/mc's - The thing is, it works a treat when exported ash Flash 5 but not in Flash 6 format....Any ideas why? Thanks
accel=.8;
convert=.2;
Movieclip.prototype.sticky_load=function(){
_parent.released=0;
number=menunum;
iterations=5;
xstart=_x;
drag=0;
ystart=_y;
targetx=xstart;
targety=ystart;
r=1.5;
x=(2*Math.PI)*(number/iterations);
t=Math.tan(x);
mycol=new Color(internal);
_parent.drag=0;
}
Movieclip.prototype.sticky_update=function(){
if(this.hitTest(_root._xmouse,_root._ymouse,true) and _parent.drag<2 and _parent.released==0){
if(random(5)==0){
counter++;
addcol=random(151);mycol.setTransform({rb:addcol,g b:addcol,bb:addcol})
duplicateMovieClip ("line0", "line"+counter, counter );};deltax=_parent._xmouse-xstart;deltay=_parent._ymouse-ystart;targetx=(_parent._xmouse-deltax/r);targety=(_parent._ymouse-deltay/r);if(drag==0){mysound.attachSound("sound7");mysou nd.start();this.swapDepths(2);drag=1;_parent.drag+ +}} else if(_parent.released==0){_parent["inhead"+(number+1)]._visible=1;mycol.setTransform({ra:100,ga:100,ba:1 00,rb:0,gb:0,bb:0});targetx=xstart;targety=ystart; if(drag==1){this.swapDepths(0);drag=0;_parent.drag--}} else {targety=-170;targetx =(t*85)-56;if(_parent.trigger==1){this.removeMovieClip();} };
xpos = xpos * _parent.accel + (targetx - this._x) * _parent.convert
this._x += xpos
ypos = ypos * _parent.accel + (targety - this._y) * _parent.convert
this._y += ypos
}
Movieclip.prototype.sticky_press=function(){
if(this.hitTest(_root._xmouse,_root._ymouse,true)) {
r=10;
}
}
Movieclip.prototype.sticky_release=function(subnam e){
if(_root.pause==0){
if(this.hitTest(_root._xmouse,_root._ymouse,true)) {
_parent.atext = subname.toUpperCase();
_parent.released=1;
_parent.label=subname;
_parent.atext = subname.toUpperCase();
_parent.gotoAndPlay(_parent._currentframe+1);
};
}
}
View Replies !
View Related
Key Code Works In Test, Not When Viewing Swf....
Hi. I've been working trying to get this onKeyDown code to work, and it works fine in test movie, but if I test the swf from disk, nothing. Any help would be appreciated.
Code:
ritKey = new Object();
ritKey.onKeyDown = function(){
if(Key.isDown(Key.RIGHT)){
this.nextFrame;
}
};
Key.addListener(ritKey);
lftKey = new Object();
lftKey.onKeyDown = function(){
if(Key.isDown(Key.LEFT)){
this.nextFrame;
}
};
Key.addListener(lftKey);
View Replies !
View Related
2 Lines Of Code 1 Works 1 Doesn't
OK I am trying to create buttons dynamically. I'm sure this has been posted a million times, but I cannot find the answer. How can you create onRelase functions inside a dynamically created MC? here's what I have so far which works:
Code:
_root.createEmptyMovieClip("test", 10);
test.createEmptyMovieClip("container", 10);
test.container.loadMovie("images/1.jpg")
test.onPress = function() {
test._x = 100;
}
and this does not work:
Code:
_root.createEmptyMovieClip("test", 10);
test.createEmptyMovieClip("container", 10);
test.container.loadMovie("images/1.jpg")
_root.test.container.onPress = function() {
test._x = 100;
}
Can I only place this type of code on the root level? is there any work around?
Thanks for looking
View Replies !
View Related
Code Works Locally But Not Online...?
This loads in a movie based upon your selection of quality with a preloader...
code:
loadListener = new Object();
loadListener.complete = function(eventObj){
pBar._visible = false;
rrs_mc._visible = false;
}
loader.addEventListener("complete", loadListener);
loader.autoLoad = false;
loader.contentPath = "http://www.ramsredson.com/frame2.swf";
loader.load();
pBar.source=loader;
stop();
loader - loader component
pBar - progress bar component (event mode)
when i run this online it hides the pBar and rrs_mc instantly then loads the movie. However if i run it locally the progress bar works and on completion it hides the pBar and rrs_mc. Any ideas, or other ways to make it work? thanks
View Replies !
View Related
Code For Preloading External Swf Works...but Not For FLV....
Hello I have a code where preloading external swf works perfectly fine...Why doesnt it work when i try to preload FLV files?....what is the diference?
sample12_btn.onRelease = function() {
loader._visible = true;
mcloader.loadClip("sample12.swf",holder);
gotoAndPlay(10);
}
this works fine...But if i change it to
sample12_btn.onRelease = function() {
loader._visible = true;
mcloader.loadClip("sample12.flv",holder);
gotoAndPlay(10);
}
This doesnt work?...ANy ideas?...Thank you so much in advance...
View Replies !
View Related
Code Works When Exported As Player 6 But Not 7
Hi, Is there anything glaringly obvious that needs to be changed in the code below to enable it to work when exported as player 7 format. I've been looking for answers here: http://www.senocular.com/flash/tutorials/faq/ but couldn't spot anything...
Code:
fscommand("allowscale", "false");
Stage.scaleMode = "noScale";
targetPhoto._visible = false;
slides_xml = new XML();
slides_xml.onLoad = loadSlideShow;
slides_xml.load("album.xml");
slides_xml.ignoreWhite = true;
function loadSlideShow(success) {
if (success == true) {
rootNode = slides_xml.firstChild;
totalSlides = rootNode.childNodes.length;
currentSlideNode = rootNode.firstChild;
photos = new Array(totalSlides);
thumbs = new Array(totalSlides);
captions = new Array(totalSlides);
tx = 0;
for (i=0; i < totalSlides; i++) { // populate arrays and create thumbnails dynamically
photos[i] = currentSlideNode.attributes.jpegURL;
thumbs[i] = [currentSlideNode.attributes.jpegWidth,currentSlideNode.attributes.jpegHeight];
captions[i] = currentSlideNode.firstChild.nodeValue;
_root.attachMovie("thumb","thumb"+i,i);
_root["thumb"+i]._x = tx;
_root["thumb"+i]._y = 595; // using fixed Y coord
_root["thumb"+i].tindex = i;
tx += 22;
currentSlideNode = currentSlideNode.nextSibling;
}
// initialize values
currentIndex = 0;
targetWidth=thumbs[currentIndex][0]; // get width
targetHeight=thumbs[currentIndex][1]; // get height;
updateSlide();
}
}
function updateSlide() { // load photo, update caption and status fields
targetPhoto.loadPhoto(photos[currentIndex]);
caption = captions[currentIndex];
statusField = (currentIndex+1) + "/" + totalSlides;
}
function slideShow() {
if (currentIndex == totalSlides-1) { currentIndex = 0; } else { currentIndex++; }
targetPhoto._visible = false;
targetWidth=thumbs[currentIndex][0]; // get width
targetHeight=thumbs[currentIndex][1]; // get height;
updateSlide();
}
MovieClip.prototype.loadPhoto = function(fn) { // load external jpeg method + preloader
this.createEmptyMovieClip("holder", 1);
this.holder.loadMovie(fn);
this.onEnterFrame = function() { // NOTE: could use this to display percentage to user
if (Math.floor((this.holder.getBytesLoaded()/this.holder.getBytesTotal())*100) >= 100) {
delete this.onEnterFrame;
}
}
}
View Replies !
View Related
Publiched In Flash 6 Code Works But Not In 7 Or 8
Hi!
This code works when published in flash6 but not if published in flash7 or 8. Is there a way to get it work published in flash8?
Code:
q=0;
question.htmlText="Press the key <b>SHIFT</b>";
myFunc = {};
myFunc.onKeyDown = function() {
if (q==0){
q++
if (Key.getCode() == 16){
score++;
feedback.htmlText="Well done, SHIFT was right, go on with UP";
res.htmlText="Your score: "+score+" points" ;
question.htmlText="Press the key <b>UP</b>";
}else if (Key.getCode() != 16){
feedback.htmlText="SHIFT was wrong, go on with UP";
res.htmlText="Your score: "+score+" points" ;
question.htmlText="Press the key <b>UP</b>";
}
//-------------------
}else if (q==1){
q++
if (Key.getCode() == 38){
score++;
feedback.htmlText="Well done, UP was right";
res.htmlText="Your score: "+score+" points" ;
question.htmlText="";
}else if (Key.getCode() != 38){
feedback.htmlText="UP was wrong";
res.htmlText="Your score: "+score+" points" ;
question.htmlText=""
}
}
}
key.addListener(myFunc);
View Replies !
View Related
Code Doesn't Work In 7 But Works In 6?
Hi, I just got MX 2004 and wanted to use some of the new features in 7 with my project however when I tested my movie by changing the publishing settings to version 7 instead of 6, it no longer works. Does anyone know why something works in 6 and not 7? Are there that many changes in 7? I'm still using Actionscript 1 not 2 in both cases so that wouldn't be an issue. Any help is appreciated. Thanks.
View Replies !
View Related
Javasript Code Works Just Sometimes From Flash Help Please.
Hi!
I have a few buttons in the main movie. One of them loads a music player and an external file into the stage. Music player been loaded by javascripts.
It works, but especially after using other buttons which do other jobs, it happens that the javascript code doesn't work.
Should it be some optimization in addition to the code: ?
PHP Code:
getURL("javascript: myFunction(parameter)");
mx-guest2004
View Replies !
View Related
|