Converting A Flash6 To Flash7 On Scroller
Hi
Here is a link to fla Fla Link If you open this you will see it works saved as a flash 6 file. But what I really need is it to work on Flash 7 and saved as 7. How do you convert the actionscript to flash 7. Why do Macromedia keep changing their way of coding.
Someone help please
This Actionscript works in 6 and not in 7
onClipEvent (enterFrame) {
Y=(getProperty("_root.main.Norman",_y)-(_root.main.top))*(_root.main.factor); newY = oldY - (Y+oldY)/(_root.main.ease);
setProperty("_root.main.WindowIN.Nadine",_y,newY); oldY=newY;
}
DevShed > Flash Help
Posted on: October 21st, 2005, 09:32 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Work In Flash6 But Not In Flash7 : Why ?
hi,
how to update this simple as code to flash 7 ??
Code:
stop();
loadText = new loadVars();
loadText.load("text.txt");
loadText.onLoad = function(success) {
if (success) {
play();
my_st = this.mytext;
}
};
i try lot of thing, but it don't work !
Flash6 Listbox Component Troubleshooting In Flash7
Hello,
when I use flash6 listbox component in flash7 and when I export movie with publish settings: version-flash6 and actionscript version-1.0, all the fields of flash6 listbox component are filled with "undefined" by default.
can anybody suggest how to resolve this problem?
Converting AS 2.0 Scroller To AS 3.0
Hi,
I'm trying to upgrade an AS 2.0 scroller to AS 3.0, but haven't got the first clue when it comes to removing stuff like _root etc.
My code is:
PHP Code:
function parallax (layer, speed)
{
var distance=_root._xmouse-Stage.width/2;
if (_xmouse > Stage.width/2){
layer._x -= distance*speed;
}else{
layer._x += distance*-speed;
}
if(layer._x <= 0){
layer._x = layer._x + layer._width/2;
}else if(layer._x >= layer._width/2){
layer._x = layer._x - layer._width/2;
}
}
profiles_mc.onEnterFrame = function() { parallax(this, 1/40); }
Can someone help me to work out how to make it work in AS 3.0, please?
Cheers.
FLash 6 To Flash7
why is that my movie works fine when exported as Flash 6, yet when I export it as Flash 7, several things go wrong. I didn't change the Actionscript version, just the Flash version. I attached the movie (works "fine" in flash 6 (not optimized) but dosen't work at all in Flash 7 (or at least the tiles do not attach))
Is The Full Version Of Flash7 On My Cd
Recently I published a data Cd that includes 20 seconds of animation.
An essential requirement of the Cd is that it can be used by persons not connected to the internet.
The CD opening page has buttons to install either Macromedia 7 for Windows or Macromedia 7 for Mac (OSX) from the CD.
A few people, using both Windows and Mac, have had problems opening the Cd.
It has been suggested that the Macromedia Flashplayer 7 software provided on my Cd is an UPGRADE, and that if a computer does not already have a previous version installed, the installation will not work.
Can someone please tell me if the above statement is correct?
If the statement is correct how do I download a full version of Flash7 onto a Cd to send to people without access to the internet?
The files currently on my CD are:
FlashPlayer7.msi 656kb
flashplayer7_macrosx.bin 1140kb
flashplayer7installer.exe 668kb
Thank you.
Kynuna
Flash7- Slow SWF Output
Hello moderators, I think this time I’ve got a challenge for you
Managed to stack MC's on top of each other using GetNextHighestDepth, which is new to MX2004 and only works when movie is published for Flash 7. Here is the test site: (600K downloads) http://www.koosha.com/m/
Problem: after clicking few times on buttons, MC's load become slower and slower. It looks like there is a rendering problem.
But if i publish the movie for Flash 6, no problem, they load normally as fast as you expect them. (Obviously, publishing for Flash 6, i loose the functionality of GetNextHighestDepth and MC's replace each other rather than stacking on top of each other.)
Also, getting rid of the scrolling text in all of the MC's, helps a lot, but problem still there. Is this a bug in MX2004? or its my code?
Thank you all
Koosha
ActionScript 1.0(flash5) To 2.0(flash7)
Could someone help me "traduce this code" into actionscipt 2.0 for flash 7 because i dont understand it !!!
selection = /:selection;
if (selection ne oldselection and
./:_name ne selection) {
tellTarget ("..") {
if (Number(_currentframe)<>1) {
play();
}
}
}
oldselection = /:selection;
My Movie Doesn't Look Right In Flash7
I have a flash movie on my website that consists of play/stop buttons with text along side each one with the name of the song that each button plays.
On my computer (flash8) everything shows up properly. The play/stop buttons are black with white backgrounds and when you hover over them a circle appears around each button. And then there's just plain black text next to each set of play/stop buttons.
When I view the site on my friend's computer (flash7) the white backgrounds don't show up, nothing happens when you hover, and all of the text is missing. The buttons all play and stop correctly, though. He upgraded to flash8 and then everything showed up properly.
Any idea how I can fix this? And as a very last resort, is there a way to check to see what version of flash the viewer has and then pop up a download for the newest version?
Thanks so much for your help!
Code Won't Work In Flash7
The following code will only work if I set the publish settings to flash 5. How can I get this to work in Flash MX 2004?
ActionScript Code:
fscommand("allowscale","false")
for(x=0;x<10;x++){
for(y=0;y<10;y++){
this.attachMovie("grid","c"+ ++depth,depth)
this["c"+depth]._x = x * 50 + 200
this["c"+depth]._y = y * 50 + 50
}
}
Flash7 ... Loading AVI Movieclips
I have some AVI MovieClips, coded with Virtualdub.
I usually average 1 Mb per minute of AVI Videoclip.
I have recently tried to import these into flash but ran into 2 problems when trying to import the AVI as an embedded object.
1. The frame rate of the AVI file needs to match a whole ratio of the frame rate of the original flash movie (player),else you get voice syncing problems,...
2. When I import the movieclip I have trouble matching the quality of Virtualdub,..infact i don't get anywhere near it,...ive heard programs like flix work well,....
but,..
Is there anyway to play the AVI clips directly in flash,...say into a movieclip on the main stage ?????.....
Wont Work Exported As Flash7
Hi could anybody tell me why this code wont work exported as flash 7 but will as 6?
thanks alot for your help
heres the code:
function restartTimer() {
hours = "00";
minutes = "00";
seconds = "00";
milliseconds = "00";
pergatory = "0";
buttonPressTime = getTimer()/1000-pauseLength;
pause();
}
//
function pause() {
pauseTime = (getTimer()/1000);
timing = false;
}
//
function unpause() {
unpauseTime = getTimer()/1000;
pauseLength = (unpauseTime-pauseTime)+pauseLength;
timing = true;
}
//
onEnterFrame = function () {
totalTime = getTimer()/1000-pauseLength;
goTime = (totalTime-buttonPressTime);
// this is where you set the original amount of time (in seconds)
StartTime = 10;
runTime = (StartTime-goTime);
//
if (timing) {
hours = Math.floor((runTime+int(pergatory))/3600);
minutes = Math.floor(((runTime+int(pergatory))/3600-hours)*60);
seconds = Math.floor((((runTime+int(pergatory))/3600-hours)*60-minutes)*60);
milliseconds = Math.floor(((runTime+int(pergatory))-(seconds+(minutes*60)+(hours*3600)))*100);
if (seconds<10) {
seconds = "0"+seconds;
}
if (minutes<10) {
minutes = "0"+minutes;
}
if (hours<10) {
hours = "0"+hours;
}
if (milliseconds<10) {
milliseconds = "0"+milliseconds;
}
if ((runtime+int(pergatory))<1) {
restartTimer();
pausebutton._visible = 0;
unpausebutton._visible = 1;
}
}
};
unpausebutton.onRelease = function() {
unpause();
pausebutton._visible = 1;
unpausebutton._visible = 0;
};
pausebutton.onRelease = function() {
pause();
unpausebutton._visible = 1;
pausebutton._visible = 0;
};
reset.onRelease = function() {
restartTimer();
pausebutton._visible = 0;
unpausebutton._visible = 1;
};
[F8] Publishing To Flash7. Form Trouble...
Hi...
I have a form that works fine when I test movie, but when I've uploaded my swf to my server, the form doesn't send me an email when I fill it out and submit it.
Any idea why this might happen? I've used this form before with no problems, just tweaking and modifying slightly to fit my needs. But for some reason it won't work on my own website.
I hope I wasn't too vague. If there are specific details I need to give to help with this situation, please let me know.
Thanks!
-jason
Works With Flash7 But Not Flash 8 Player....Why?
Could someone tell me why this code works perfectly when I publisch with Flash 7. When change the publish setting to Flash 8 I get an error.
Here is the code:
if (Number(box_num) < Number(box_total)) {
duplicateMovieClip("box","box" add box_num, box_num);
setProperty("box" add box_num, _x, random(765));
setProperty("box" add box_num, _y, random(735));
setProperty("box" add box_num, _xscale, 100);
setProperty("box" add box_num, _yscale, 100);
setProperty("box" add box_num, _alpha, random(100));
box_num = Number(box_num)+1;
}
AND HERE IS THE ERROR:
**Error** Symbol=randomBoxes, layer=Layer 1, frame=2:Line 2: ')' or ',' expected
duplicateMovieClip("box","box" add box_num, box_num);
**Error** Symbol=randomBoxes, layer=Layer 1, frame=2:Line 3: ')' or ',' expected
setProperty("box" add box_num, _x, random(765));
Total ActionScript Errors: 2 Reported Errors: 2
I hope someone can help
FlashPaper - Flash8/Flash7 Compatability
Developing an application in Flash that displays FlashPaper(v2), amongst a
variety of other content.
If I publish the app as Flash8, FlashPaper works in Projector mode, however
in a Browser appears to load the FlashPaper object (FP grey banner appears
for a second or so), but never displays the FlashPaper content. This is true
for IE7, FireFox, Safari, and Netscape, so doesn't appear to be a particular
browser issue.
If I publish app as Flash7, FlashPaper works in Projector mode, and works in
Browsers listed above, but app breaks for other specific Flash8
requirements. So it is not an option for me to just publish as Flash7.
Has anyone come accross this issue, and are there any known updates/fixes
for the problem. (Have searched over most forums and KP's without any
success).
Cheers
chris
Code Does Not Work In Flash7 / Flash8
Here's an elastic function, when I test, it seems only work in flash6, not in flash7 or flash8.
here is the code, anyone with any ideas?
ActionScript Code:
function elastic(){
obj.onEnterFrame = function(){
var speed:Number =.67;
var elastic:Number =0.62;
ax=(thisTargetX-this._x)*speed;
ay=(thisTargetY-this._y)*speed;
vx+=ax;
vy+=ay;
vx*=elastic;
vy*=elastic;
this._x+=vx;
this._y+=vy;
}
}
- mark
[as1][flash7] Adding Functions To 'classes'
In Flash 6, I was able to do this without a problem. Flash 6 returns the number 3. Flash 7 returns errors. I'm using default settings for Flash MX 2004 Pro. Is there a different syntax to use when adding methods to pre-built classes?
Thanks,
Chris.
ActionScript Code:
Math.plus = function(a,b)
{
return a+b;
};
trace(Math.plus(1,2));
output
-------
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1:
There is no property with the name 'plus'.
Math.plus = function(a,b)
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 6:
There is no method with the name 'plus'.
trace(Math.plus(1,2));
Total ActionScript Errors: 2 Reported Errors: 2
Scroll Text And Image Problem Flash7
A few month ago I dl a file from some forum a text and image scroller! I alteres the file and it works perfect on Mac. Some PC and IE have problems, so I tried to export the scroller with flash 7 but the internal links wont work no more. Is ther a way to fix this?
Please help!
File
Thomas
Scroll Text And Image Problem Flash7
A few month ago I dl a file from some forum a text and image scroller! I alteres the file and it works perfect on Mac. Some PC and IE have problems, so I tried to export the scroller with flash 7 but the internal links wont work no more. Is ther a way to fix this?
Please help!
FILE
Thomas
Label A Button Generated By Script (flash7)
hi my frends
i changed moivie cilp to button. but unable to assign a text to it.
can any one help me, please...
here is my code.
i am very new to actionscripting.so please guide me.
this.createEmptyMovieClip("but01", 10);
but01.beginFill(0x00CC33, 100);
but01.moveTo(2, 4);
but01.lineTo(116, 4);
but01.lineTo(116, 17);
but01.lineTo(2, 17);
but01.lineTo(2, 4);
//turning into a button.
but01.hitArea = but01;
but01.onPress = function() {
trace("on press! "+this._name);
};
but01.onRelease = function() {
trace("on release! "+this._name);
};
but01.onRollOver = function() {
trace("on rollover! "+this._name);
};
but01.onRollOut = function() {
trace("on rollout! "+this._name);
};
thankx in advance
cheri
[Flash7 AS 2.0]Help With Pre-made Site Calling Varibles, Etc
Hi. Flash has never been my strong suit I can do basic things but now i'm pressed for time and need some assistance.
I have a movie that calls a XML file and stores all the data into an array. The data then creates a duplicate button/text movie clip that shows the name of the the item. I have this down. I need help making it so when the item is clicked it goes to a description frame where the rest of the array's data is then displayed in the appropriate fields. I was thinking of trying to pass just a simple number that corresponds to the array values
for example: itemName[0], itemPicture[0], etc I would just pass 0 on release and
then have the frame gather the info from the arrays that matched record 0 or whatever was passed.
I guess the real trouble is I can't seem to figure out how to make each duplicate movie clip contain unique action script to pass the variable on click. Can any one please help?
Scroll Text And Image Problem Flash7
A few month ago I dl a file from some forum a text and image scroller! I alteres the file and it works perfect on Mac. Some PC and IE have problems, so I tried to export the scroller with flash 7 but the internal links wont work no more. Is ther a way to fix this?
Please help!
File
Thomas
Scroll Text And Image Problem Flash7
A few month ago I dl a file from some forum a text and image scroller! I alteres the file and it works perfect on Mac. Some PC and IE have problems, so I tried to export the scroller with flash 7 but the internal links wont work no more. Is ther a way to fix this?
Please help!
FILE
Thomas
Action Script Help. Works In Flash5 But Not Flash7
Hi any one who can help me with this!
I have some action script code for a interactive circle patterm. However it doesn't work in flash players after 5.
here's the action script for the object clipevent;
ActionScript Code:
onClipEvent (load) {
// distance at which the mouse effects the objects
range = 150;
// maximum scale an object can have (when the mouse is right on top
max_scale = 400;
// ratio of the maximum size and range of influence of the mouse
ratio = max_scale/range;
}
onClipEvent (enterFrame) {
// distance on the x- and y-axis
distx = _root.spring._x-this._x;
disty = _root.spring._y-this._y;
// total distance between object and mouse
distance = Math.sqrt(distx*distx+disty*disty);
// check if inside of range, if so change the _xscale + _yscale properties
if (distance<range) {
this._xscale = this._yscale=(range-distance)*ratio+range;
} else {
this._xscale = this._yscale=range;
}
}
Heres the code for the mouse
ActionScript Code:
onClipEvent(load) {
// setting the acceleration of the mouse over
accel = 6;
// setting the 'bounciness' feel of the mouse interaction
bounce = 1.4;
}
onClipEvent(enterFrame) {
// Get the distance between the mouse and this Retropattern
distX = _root._xmouse - _x;
distY = _root._ymouse - _y;
// Calculate the new position
xInc = (distX/accel+xInc)/bounce;
yInc = (distY/accel+yInc)/bounce;
// Start moving towards the new position
_x += xInc;
_y += yInc;
}
And finally here's the code for the generation of the dots
ActionScript Code:
// Set the Location of the first dot in the pattern (top left)
startX = 30;
startY = 490;
// Set the number of dots in the pattern
horz = 25;
vert = 4;
// Set the distance between the dots on the screen
width = 25;
height = 25
;
// Set the naming value so duplicated Retropattern will be circle1, circle2, circle3, etc...
z = 1;
Retropattern = "circle";
// the loop to duplicate and place everything
// It is looping through vertically placing each Retropattern with the loop inside
for (i=0; i<vert; i++) {
for (p=0; p<horz; p++) {
// duplicating the dot
duplicateMovieClip (Retropattern, Retropattern+z, z);
mc = _root[Retropattern+z];
// setting the _x + _y values for the new dot
mc._x = startX+p*width;
mc._y = startY+i*height;
// increment z so each new dot has a different name
z++;
}
}
stop();
An example of this code being used in the flash player 5 is here http://www.n-generationads.co.uk
thanks i would really aprciate any help as this is killing me! well you know...
cheers
Mart
FLASH6 Vs WIN NT... WHY?
the same flash movie (flash6) having many actionscripts works several times slower if runs at win nt (xp, win 2000) versus win9x... does anybody knows WHY? thank you.
the same thing if we have flash5 compiled movie.
Flash6 Detection
How do you detect the flash6 plugin with flash. Like
if you have flash6 go to that frame, if not go to another frame. Or open different browser windows.
Flash6 In VisualBasic6
Can anyone help me regarding how to disable/(make visible false) the menuitem "Settings..." in the flash menu which comes when RightClicked over the Flash.ocx by mouse. The Flash.ocx is over the Form.
Flash5/flash6
Can anyone tell me what I must change to get this code work with flashplayer 6 (with 5 it's works perfect)
i=0;
while(i<3){
eval("s"+i).gotoAndStop(symbols[(Number(_root.done) -i)+1]);
i++;
}
Thanks
Easy Flash6 Detection ?
Hi I'm looking for an easy to use flash 6 detection that should not use javascript.
Before I used the normal flash detection in dreamweaver and put the with_root command in my movie so that the flash 4 Plugin would not work, since with_root was not compatible in Flash 4.
Is there some similar solution in Flash 6 ?
TIA
Flash6, AOL And Dynamic Images
I have two sites http://www.memphismusicsource.com and http://www.bpacc.org that use dynamic links to JPG's. On MMS the images are in the band section and on BPACC are in the three series sections. The sites work fine on all types of connections (56k dial-up, ISDN, Cable, etc.) with almost all providers. The one that is causing problems is AOL. We've got people who can never get the images to show up, for some it works on and off. Has anyone else run into this with AOL? I know it has nothing to do with the AS because all loading is done on a single frame (it's not calling a file and moving on before it can load) plus the fact that it is running fine in other dial-up services like MSN and Earthlink. Any suggestions would be appreciated.
Flash6 Detection Plugin
Hi people,
Someone can tell me if the save function in the publisch settings.Html>templates > flash 6 only detection is good detection.
How does this detection work.
Or u use other methodes for detection.Tell me how you do this.
Btw my splashpage is made in flash.
Big thx in avdvance on the comment
Grtz,
Modulater
Flash5 Script > Flash6
i've got a problem that a script from flash5 isn't supported in flash6 anymore, which can happen.
this error message appears:
Symbol=Menu, Layer=Controller, Frame=12: Line 30: Left side of assignment operator must be variable or property.
eval("pos" add i) = eval("pos" add (i-1));
-
what can i do to fix it working again? - i attached you the fla so you can have a look. if you set the publishing-settings to flash5 it works (the sorting). but if you set the publish settings to flash6 the output error message appears and the sorting doesnt work anymore.
it would be very kind if someone could help me out. thanks in advance
[flash6] Print After Dragging
Hello
I made something where you drag a few movieclips around (to recreate a painting). i added a button that prints the frame.
But before it prints, it flips all the mc's back to the starting point. So it doesnt print what you just dragged around (it doesnt save their location). it prints what it is before you drag.
is there any way to print exactly what you see on the screen after dragging?
site: http://www2.hku.nl/~lotte2/humhum/print.html
then if you click on "do it yourself" you will see what the page is like
the little house button there has the print action that doesnt function
Numeric Sort In Flash6?
I wanted to sort an array by its numeric value but cant make it work. I always get a string-order instead:
-111.621366801195
-118.595917758174
-85.4975083278225
40.7332060082127
am using this code:
Code:
FOrder.sortOn([0], 16);
Can anyone tell me how to make it work or if it does work at all in Flash 6?
[F8] Flash6 > Flash8 Code
I got very cool flash effect today - Spring Effect.
http://www.lionbichstudios.com/flash...ringeffect.htm
Description:
When pulled, springs back to it's original position.
Here's the code that works fine in Flash6 when you change Publish Settings:
1) Movie Clip Code:
Code:
onClipEvent (load) {
tx = 109.5;
ty = 153.5;
k = .2;
damp = .9;
}
onClipEvent (enterFrame) {
if (!drag) {
ax = (tx-_x)*k;
ay = (ty-_y)*k;
vx += ax;
vy += ay;
vx *= damp;
vy *= damp;
_x += vx;
_y += vy;
}
}
2) Button inside of that MovieClip:
Code:
on (press) {
startDrag();
drag = true;
}
on (release, releaseOutside) {
stopDrag();
drag = false;
}
Just need someone to update the code to Flash8.
Thanks, really appreciate.
Convert <as1/flash6> To <as2/flash8>
Hi Guys!
Here is a great tutorial
but when I set the publish mode into Flash 8, the movie goes crazy
Does anybody know how to overwrite this code so it works in Flash8 ???
heres the code:
Code:
this._visible = false;
var numrotos = 10;
for (n = 0; n < numrotos; n++){
newroto = "roto" + String(n);
this.attachMovie("roto", newroto, n + 1);
this[newroto].theta = n * 360 / numrotos;
this[newroto].panel = 31;
this[newroto].radius = 300;
this[newroto].contents.gotoAndStop(n + 1);
} // end of for
this.title.swapDepths(100);
_____________________________________________
if (_root._ymouse < 120 || _root._ymouse > 280) {
speed = speed * 0.950000;
} else {
speed = -_xmouse / 100;
}
this._visible = true;
gotoAndPlay(_currentframe - 1);
______________________________________________
if (pressv != 0)
{
this.panel = this.panel + pressv;
pressv = pressv * 0.875000;
if (pressv < 0.200000 && pressv > -0.200000)
{
pressv = 0;
} // end if
} // end if
theta = theta + _parent.speed;
xbit = Math.sin(0.017453 * theta);
ybit = Math.cos(0.017453 * theta);
this._xscale = ybit * this.panel;
this._x = xbit * this.radius;
this._alpha = 30 + (ybit + 1) * 50;
this._yscale = this.panel - 3 + (ybit + 1) * 3;
stack = Math.round((ybit + 1) * radius * 2);
if (stack == 100)
{
stack = 101;
} // end if
this.swapDepths(stack);
What is Flash8 having problems with?
Flash6 Player... Why The Restart?
Hi,
I am currently developing a total falsh site using Flash5. Having searched through some of the previous posts.. i found that if a user does not have a flash player installed they are prompted to download Flash6 player..... this however requires a 'restart' of windows before the flash site can be viewed. Highly undesireable for any website im sure you will agree.
So i pose the question...
"How can a user view a Flash 5 site, without having to restart their machine?"
Any help would be greatly appreciated!!
Why Does This Work In Flash6 But Not Flash9?
Link1.onRelease = function() {
getURL("javascript:setFlashHeight('flashid', 500);");
};
When I publish this code in the Flash 6 player this code works perfect and the javascript launches but when I publish it in Flash 9 it doesnt do anything. Any help?
Unloadmovie - Flash6 To Flash8
g'day
i searched the forums but coulnd't find the answer:
i have .swfs loaded externally - the .swfs have a close button that closes the swf and loads another swf ( this is what we expect him to do ) - works fine when published in flash 6 / as2 - it doesn't when published in flash 8 / as2
code on the button:
Code:
on (release) {
unloadMovie(target_mc);
loadMovie("imagestack.swf", target_mc);
}
i checked for case sensitivity and pathes and...and...and..
please enlight me / thank you in advance
Flash6 Player - What's Changed/wrong?
I've just loaded Flash6 player, thinking I'll see what all the fuss is about with these new fangled MX programmes, and one of my FLASH5's doesn't work well at all!
http://www.btinternet.com/~fsjms/fla...culerotate.swf
Anyone, want to try viewing on one or both platforms to see if its just me - is there a problem with "depths" between 5 and 6? Bit of a problem if there is - any solutions?
Does anyone else have this problem?
swills
Two Questions On Detecting The Flash6 Player
First...if they have flash 5 and I'm using an MX component in my movie, then, they won't be able to see it, right?
SO...I need for them to get the flash6 player.
How is this done? What is the code>? Where do I put it? How do I structure this? Could you walk me through it?
Thanks.
Problems Installing Flash6 Plugin
I have a XP machine that will not install the Flash6 plugin. I have gone through the uninstall process recommended by Macromedia but the uninstaller could not find the win32.dll (it is one folder deeper than the uninstaller is looking). Help, this is driving me crazy.
Tricky ActionScript Problem [Flash6]
Hi there everyone, this is my first post and I'll give you a pretty tricky problem hoping for a solution. I'm exporting the movie in Flash 6 format and using Flash MX to make the movie.
The objetive is to have a simple sound control bar (play and stop buttons only) on a small frame that's loaded at the first moment the user gets in the website and stays there until he leaves it. Everything works perfect in that part - the sound starts and stops with a fade as planned, and everything is running smooth.
Things start to get tricky when one of my pages, loaded on the other frame, needs to send a message to that bar ordering it so stop the sound. That is necessary because this page has a video of its own (loaded inside another flash movie) and the sound of the bar would get mixed with the video sound. The way I found to do that was passing a variable from one flash movie to the other using javascript and the swLiveConnect features of flash. When this variable was set to false, the bar would stop playing the movie. This also works - when I reach that page, it sends the message to the top-frame flash and it stops the music.
After the video is done, it sends another message to the top bar, telling it that it can start playing its sound again. That's when things go wrong. Although the variable IS passed from the video-frame flash to the top-frame flash, it doesn't start playing the sound again.
Now that you know what I'm trying to achieve and when the problem happens, let me tell you a bit more about the system I've been using for that.
Inside the top-frame flash, there's a movie clip with only one frame that loops forever. This movie clip has nothing in it but ActionScript. It's purpose is to check the condition of the variables I used and handle them correctly. There are three variables important here, all of them being of the boolean type. The first one, which I'll call "music", stores the user preference about playing or not the music on that bar. This variable is the one who changes when he presses the "play" or "stop" button on the bar itself. The second variable is called "isPlaying" and defaults to TRUE. This is the variable that changes when the video starts playing - it sets isPlaying to false. The third variable I mentioned above is called isDone and is used to keep the movie clip from issuing the sound.start and sound.stop commands more than once
The movie clips loops forever checking the state of these three variables. If both music and isPlaying are true, and isDone is false, the sound plays (sound.start). Right after that, isDone is set to true so that the sound is started only once. If music or isPlaying are false, and isDone is false, the sound stops (sound.stop). Right after that, isDone is set to true so that the sound is stopped only once.
This should work smooth, and in fact it DOES work. However, after the video plays and isPlaying is set to true and isDone is set to false (it should start playing the sound again), what really happens is a call to the OTHER function - sound.stop. It's just like even though I have music = true, isPlaying = true and isDone = false (what would trigger sound.start in a normal situation), it triggers the function for when music or isPlaying = false and isDone = false.
I know this is REALLY something complicated to explain and that I might have been very unclear about what my problem is, but if any of you guys feel like you could help me out with this one, please give your opinions and suggestions. They will be unvaluable to me.
Thanks and best regards,
skeptikal
Actionscript Only Working When Publishing For Flash6?
I'm working on a script to make a dynamic portfolio section for my new website using XML and actionscript. I basically have it working pretty well right now, but when making it I didn't realize that the publish settings were set to Flash 6 instead of 8 or 9 like I would like it to be. When I try to publish it for flash 8 or 9 the script stops working completely, and I can't figure out why.
Im working in Flash CS3 which I just got a few days ago, so if anyone knows what is going on it would help.
Here is the actionscript for it, and I will attach the XML and FLA's for it so you can test it if you would like:
Code:
var nameArray = new Array();
var categoryArray = new Array();
var thumbArray = new Array();
var fullArray = new Array();
contentXML = new XML();
contentXML.ignoreWhite = true;
contentXML.load("content.xml");
contentXML.onLoad = function(success){
if(success){
dataXML(contentXML);
}
}
function dataXML(xmldata){
itemtotal = xmldata.firstChild.childNodes.length
for(i=0;i<itemtotal;i++){
categoryArray.push(xmldata.firstChild.childNodes[i].childNodes[0].childNodes[0])
nameArray.push(xmldata.firstChild.childNodes[i].childNodes[1].childNodes[0])
thumbArray.push(xmldata.firstChild.childNodes[i].childNodes[2].childNodes[0])
fullArray.push(xmldata.firstChild.childNodes[i].childNodes[3].childNodes[0])
}
buildPort()
}
function buildPort(){
rows = 3
columns = 5
itemwidth = 120
itemheight = 110
k = 0
for(i=1;i<rows+1;i++){
currenty = (itemheight * i) - itemheight/2
for(n=1;n<columns+1; n++){
k++
j = k-1
currentx = (itemwidth * n) - itemwidth/2
currentmovie = this.createEmptyMovieClip("port"+k,k,{_x:currentX, _y:currentY});
currentmovie._x = currentX
currentmovie._y = currentY
currentmovie.attachMovie("box", "box" + k, 0)
currentmovie["box" + k].nametxt.htmlText = nameArray[j]
loadMovie(thumbArray[j], currentmovie["box" + k].imageMC)
}
}
}
Error Loading Flash6 Swf Into Flash8
We have developed a system whereby we have a one flash component load other previously created flash files. The loaded flash files have been generated over the past 7 years using flash5 and flash6. (we have about 30,000 files created)
We have just added functionality to allow FLVs to be loaded, and therefore upgraded the primary component to flash8. Some PCs have a problem loading the older flash5/6 components under some conditions:
WORKS - Running from web server
DOESNT - Running locally using HTML
DOESNT - Running from Projector exe
WORKS - Running from a browser without HTML
I see no pattern to which machines have problems. (Operating system, other software loaded/installed, CPU, etc.) Identical machines may or may not work. Most machines have no problems (testing about 20 PCs, 2 have the problem).
In testing, the clip into which the component is loaded ceases to exist as a recognizable entity.
Rebuilding the older components to flash8 fixes the problem, but we have such a large quantity of older files and many are not under our control, that this becomes untenable (as well as the fact that many components need to still work with older flash6 primary components).
Anyone have thought to were to start looking.
|