Actionscript Problem? Or Am I Just Nuts?
Ok this one is a going to be a little hard to explain. Basically here is what I have. I am loading an swf into an intance of a blank movie clip on the stage. Now this loaded swf has 2 sections. It is supposed to load to the different section depending on which button you click. It works if you go one way, because you can go from one section to the other. But if I try to go straight to the other section it doesn't work. It's almost as if it's not loading a variable or something, but it doesn't need to load anything.
Here is what happens. You click section 1. The main movie goes to a new frame and loads the swf You go through that section to the other one You go back to the other section
You click section 2 The main movie goes to a new frame loads the swf and another MC checks to see if it loaded and kicks the swf to the second section Now you cant get to the other section
check out this link: http://www.opensezme.net/2ndglobe
click FLASH, then click work, and the embrace and defy buttons take you to the different sections. if you go through each you will see the problem I am having.
Thanks a bunch for any help.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Actionscript Gone Nuts?
Last edited by Achalon : 2004-06-18 at 07:13.
Ok, check this out...
I need to recreate an array while at the same time modifying an object element of the new array.
The problem is that when I modify the new array 'tempArray' the change seems to happen in the old array 'myInsPicArray'. --How's that work?
You can see the first and last lines in the following code are both traces. They should be identicle right? Wrong. The line that changes the new array makes the last trace unequal to the first trace line.
I don't understand how this is even possible?
Code:
trace(i + ": PicName before:" + myInsPicArray[i].PicName);
trace(i + ": " + myInsPicArray[i].Page);
trace(i + ": " + myInsPicArray[i].RealPicName);
trace(i + ": " + myInsPicArray[i].Pic);
trace("tripCounter: " + tripCounter);
if (myInsPicArray[i].PicName ne undefined){
var temp = "";
temp = myInsPicArray[i];
tempArray[tripCounter] = temp;
tempArray[tripCounter].PicName = "Picture-" + tripCounter;
tripCounter++;
}
trace(i + ": PicName after:" + myInsPicArray[i].PicName);
Thanks
EDIT: It should be noted that I'm useing similar setups in other areas of my program with no ill effect. The only differenct is that these arrays contain objects.
Actionscript Drivin Me Nuts
what happened to the old "Normal" mode for AS? lol, i hate this no help thing... How do i just tell a button to tell a target to play? i can't even get it to do that!
Flash Mx 2004 Actionscript - Help Me Before I Go Nuts
As some of you who have read my previous posts will know, i am designing a website in flash, as all of you will know - links are important in websites. so WHY, oh WHY - does flash not let me link - heres the code, ive assigned it to one of my own buttons (and it worked yesterday!)
on (release) {
gotoAndPlay(2);
}
it keeps on complaining about "needing an on event handler" and sometimes it will complain about wanting a "scene" as well :S HELP
Flash Actionscript Driving Me Nuts
i am amking a flash site and i want have made an intro for the site. there is a certain button that i want to be click to go to the intro.but it is not a url. see i do not want to publish it just yet. i want to know if there is a specific actionscript for flash 5 that can link movies together. i know how to string frames and movie clips together but not seperate movies.
i have tried putting the destination file into the geturl and all other possible ways (goto ect.) please tell me how i can do this!
Please Help Before I Go Nuts
I am trying, to no avail, to pull data from an Access datatbase into Flash. I am ready to punch someone out.
I have tried every tutorial or example I could find. I know I am doing something wrong, I just can't figure out what.
All I am trying to do is pull one record ( for now) from the database using this code in an ASP page:
<%
'opens connection to database
set conn=Server.CreateObject("ADODB.Connection")
myDSN="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=d:------------------/databases/layouts.mdb"
conn.open myDSN
sql2 = "select * from programs where ID = 13"
set sql2 = conn.execute(sql2)
Response.write "prog1=" & Server.URLEncode(sql2("prog"))
%>
The ASP page works, and out puts the correct result, I just can't get my Flash file to grab it.
I am attaching the .fla as well.
Please help before I hurt someone.
Thanks!!
I Am Going Nuts With This One
Howdy all;
Well here is one for you all to laugh at me for. I know I am doing something wrong but I haven't found out what.
I downloaded a movie from FK here a few days ago so I could learn about dynamic text scrolling.
http://www.flashkit.com/movies/Inter...1802/index.php
As I viewed and read the information embedded in the FLA I learned I was allowed to use and modify the FLA as I seen fit.
Here is the problem using MX:
1), The part of this movie I want to use is the text scroller. When I bring it onto a blank stage and create a dynamic text box and link it to an external text file for the loading of text and do a test movie all I get is the text box ful of text but no scrollbars. It doesn't get load or it gets turned invisible.
I have search through movie explorer for hidden code but I found none.
This one is driving me nuts.
2), What I have done is load the widget FLA that I downloaded and did a test movie and it works correctly so it is Flash version dependant.
Sure could use some help on this one.
Thanks
Toby
I Am Going Nuts Help Me Please
I am a flash guy who has very little experience with Dreamweaver or the web in general. I put together a nice cd for a client of mine and after he seen how it worked he wanted it up on his web site. The only problem is, how do I get Dreamweaver to or maybe even flash, to set up the swf file so that when it is opened it will resize to the size screen it is opened in??
Other words: I created this on a 21 inch screen for a CD now when I place it in Dreamweaver and post it to the web and open it on a 17 or 15 inch screen you have to scroll left and right. How can I fix this !!
Am I Going Nuts?
Ok this maybe a stupid question:
When I decompile an swf file and look at lets say a simple fade motion tween when I click on either the beginning frame or the end frame and choose color > alpha from the properties box it resets the alpha to what even I had it set previously, how can I see all the settings used in the tween without reseting them as I click on the color options in the property box?
Driving Me Nuts
I have a problem.
In my movie I have another movie loaded into _level1. In _level1 I have a menu that I want to pop-up when someone "hits" a certain spot in that same level. I had previously tried an invisible button, but for some reason couldn't get it to work. So then I tried to use hitTest. Still didn't work. This is what I have...
In an AS layer on a frame...
startDrag(_level1.drag,true);
stop();
On my MC instance "drag"...
onClipEvent(enterFrame){
if(_level1.hit.htiTest(_level1.drag._x,_level1.dra g._y,true)==true){
_level1.tab1.play();
}else{
stop();
}
}
What I believe should happen is that when the _level1 AS frame is entered, my MC instance "drag" should start being dragged. When my MC instance "drag" hits with a rectangle MC instance "hit", that should cause my MC instance "tab1" to play from frame 1. Unfortunately nothing happens!
Can anyone tell me what I am doing wrong?
Thanks
dalara-rian
This Is Driving Me Nuts
centred pop ups
when i put this action on my buttons in my flash intro page to open a new window
on (release) {
getURL ("javascriptpenNewWindow('http://www.essextails.com/text_documents/home.html','Home','height=400,width=650,top='+((sc reen.height/2)-(" 400 "))+',left='+((screen.width/2)-(" 650"))+'toolbar=no,scrollbars=yes')");
}
it dont work and the debugger comes back with this error
movie, Layer=homebutton, Frame=78: Line 2: ')' or ',' expected
getURL ("javascriptpenNewWindow('http://www.essextails.com/text_documents/home.html','Home','height=400,width=650,top='+((sc reen.height/2)-(" 400 "))+',left='+((screen.width/2)-(" 650"))+'toolbar=no,scrollbars=yes')");
i am not that hot with actionscript and i am not sure if i have filled in the parameters right but most of all i cant see where the errors are
heeeelp
Get Url Problems Going Nuts Here
I'm using flash 5 with Dreamweaver 2 and 3 as an editor on both a pc and a mac. When I assign the get url action to a button on a page it calls the window up fine, the width, height are also fine. But I can't get the code to give me scrollbars, I've tried this on I/E 5.5 and Netscape 4.76 both for the Mac and a PC. Since I have the problem on both platforms I'm lost. I even tried to make a new page in Flash, assign the get url action to a button to link the macromedia page in a new window, made the height and width bigger than my monitor so it would force the scrollbars by default and still, it wont give me scrollbars.Below is the code I used cut and pasted exactly from the Macromedia technote 14192.
(Code assigned to button)
javascript:openNewWindow('http://www.macromedia.com','thewin',
'height=400,width=400,toolbar=no,scrollbars=yes')
(code embedded in page)
<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName,
windowFeatures) {
newWindow=window.open(URLtoOpen, windowName,
windowFeatures); }
</script>
help please!!
This Is Totally Nuts
I cannot understand what is going on here. I have a site that has nine possible soundtracks. With the first soundtrack, the computer has to load it every time, instead of caching it in its memory. Why?
This is most frustrating as I have start and stop buttons that should enable immediate play once the movie has been loaded once.
Could it be to do with the name? - soundtrack0.swf
All the other soundtracks work ok. - soundtrack1.swf, etc.
If you can help, please do cos I'm totally stumped!!
Thank you
Graeme
Help This Is Driving Me Nuts....
any help greatly appreciated!
When surfing my site, a strange thing seems to happen. After a short while (a couple of minutes) the site starts playing from the beginning of my timeline as if it is being refreshed or something. It can happen from anywhere in my site (my site is all pretty much on one timeline).
weird!
any ideas?????
if you want to check it out....
lupavision.net
This Is Driving Me Nuts
I keep running into this problem when embedding movies with functions inside container movies. What I have is a straightforward form to mail setup [FK tutorial] with basic validation on submission. The whole thing works fine when viewed on its own from the server [and locally] but breaks down completely once viewed from the container movie. I have tried addressing the paths to the functions absolutely and relatively, commenting out code etc yet it still refuses to run correctly.. I realise the problem could be anywhere, but any pointers on how to start troubleshooting would be helpful.
This Is Driving Me Nuts
Hey everyone,
I'm still kind of a newbie; getting used to Flash has been a wild experience. Trying to get my first project finished but can't seem to get around this "bug". (Of course, it's probably not!)
What I'm trying to do is very simple: create a motion tween based on text involving position, rotation, and skewing.
I've created a simple test file (attached) to recreate the problem I'm having. When I play it on the stage (by pressing enter), the animation looks fine. When I publish it, or try to preview publish (ctrl + enter) I get junk.
Any ideas? I can't move forward until I get past this! Pls!
Thanks,
Shahid
Drving Me Nuts - Please Help
This should be something simple.
Frame 1:
mydate = new Date();
code = mydate.getSeconds();
Frame 2:
if (mydate.getSeconds() == 59) {
gotoAndPlay("Scene 1", 1);
}
What am I doing wrong? I have tried everything I can think of.
My Alpha Went Nuts ><
Hey guys,
I'm making a text effect with AS and here's the code that i just don't get:
if(i<n){
duplicateMovieClip(animator, "a"+i, i);
this["a"+i].tween.output.text = inputstore.charAt(i);
setProperty(this["a"+i],_x, (i*15));
setProperty(this["a"+i],_alpha, i);
_global.i++;
}
I am having problems with the setProperty(this["a"+i],_alpha, i); statement.
Does flash MX have problems with having dynamic text movie clips and setting their alphas? I've tried this 10000 times n it doesn't work! help would be appreciated thx!
This Is Driving Me Nuts...
I have what I thought is a simple enough bit of code. I do a loadVar to a remote site and its hangs on me. One piece of code will work, another piece will lock up. AND they are the same code!
Is there something unique about timing I need to understand with loadVar if loadVar is calling on another server?
Thanks
Christopher
Flash MX - That's A Lot Of Nuts
Yes... it's true I'm new to flash and going nuts trying to figure a few things out.
I have a flash animation and I am interested in creating some 'mouse release' commands. To be more specific, when a user clicks on the 'hotspot' it will go to frame 29 and when they click on it again it will go to frame 58, and repeat this process. I also would like to create an email link once the first part of the movie has played, but one thing at a time i suppose.
I am very new to flash and trying hard to learn, with the help from some of you vets hopefully I can get this thing working. i've attached the animation. TIA.
Driving Me Nuts
Any help gratefully appreciated on this as the deadline is 8am tomorrow GMT
FlashMX 2004
I have a movie developed and it works fine when on its own. http://www.spoiltchild.com/new/davis.swf
However when loaded into another movie at level10 as it will be, it doesnt work. http://www.spoiltchild.com/new/holder.swf
Any ideas?
.fla is here: http://www.spoiltchild.com/new/davis.fla
I realy appreciate any help on this.
Please Help, This Is Driving Me Nuts
Hello, I am new to programming in flash, if you get as far as viewing my code then you will probably agree Any how, I am having difficulty getting my drag and drop application to operate correctly. When I select a new piece from the drop down menu a previousley placed piece will vanish. I have a feeling that it is connected to the duplicateMovieClip function. I am also very sure that the hide piece on load procedure isn't the cause as this bug was ocurring before I implemented it.
Anyhows, the app(in its current early build) and the source is available here :-
http://fs1080.tripod.com/snowparkdesigner/
Any help would be very greatly accepted.
Driving Me Nuts
ok, back again, just posted something similar to this, and i thought had sorted it, but its not working again
same as before, i'm using this to try to load some data into my loadVars objects
receiveVars.load(Directory+"read.php?file="+Data+n umber+".txt");
and sometimes it works and sometimes it don't, even though i'm not changing anything!
I'm using onload for success etc, i thought it was a security issue, so i went to my global settings and put in the local folder, went back to flash, ran debug and great it loaded the data.....ran it again, and this time nothing happened, no data loaded!
any ideas?? I think it still might be a security issue, but not sure how.
AS Is Driving Me Nuts
Ok i am in a transition phase , i am trying to move from AS2 to AS#
so far it has smooth sailing but now i see a storm building up ahead
unless some can help me stear away
ok here is the problem
I have this code
function question() {
for (var i:int=0; i<questList.length(); i++) {
var ansList :TextField = new TextField;
ansList.type =TextFieldType.INPUT;
ansList.border = true;
ansList.x =(mytxt2.width+mytxt2.x)+10;
ansList.y=mytxt2.y;
questHolder.addChild(ansList);
}
}
my question is how do i retrieve the data entered into those text fields by users and store it for later use
any ideas??
Going Nuts Over Date.UTC
So I've used this particular script many times before, and for some unknown reason now it's going crazy.
Code:
eventDate = new Date(Date.UTC(thisYear, 08, 22, 8, 01, 00, 000));
I'm using this for a countdown timer. Here is the error I'm receiving:
Code:
**Error** Scene=Scene 1, layer=Layer 23, frame=1:Line 14: ')' or ',' expected
eventDate = new Date(Date.UTC(thisYear, 08, 22, 8, 01, 00, 000));
And now my countdown timer is going all crazy! As I said I've used this many times before with no problems, event multiple countdowns with different dates in the same flash movie and it worked fine. I tried putting ) and , in multiple places, even varying numbers of them, and nothing is fixing it. What the heck changed about flash!?
AS2 It's Driving Me Nuts
This has probably been discussed in other threads, but because I'm fed up trying to unravel the workings of AS2 and getting nowhere and confused I decided to post my query...I've got this code, the problem is in capitals within the code and of course the URL is my server
Code:
/*here I load the thumbs images into mc's*/
loadMovie("http://URL/thumbs/image1.jpg", thumb1.thumbImage1);
loadMovie("http://URL/thumbs/image2.jpg", thumb2.thumbImage1);
loadMovie("http://URL/thumbs/image3.jpg", thumb3.thumbImage1);
/*here I turn the thumbs into buttons*/
thumb1.onPress = function() {
loadMovie("URL/photos/image1.jpg", emptyContainer);
/*HERE IS WERE THE PROBLEM IS
IF THUMB CLICKED ONCE IT TRACES
HEIGHT AND WIDTH AS ZERO, BUT
IF CLICKED AGAIN IT DISPLAYS CORRECT MEASURMENTS*/
trace("height is "+ emptyContainer._height);
trace("width is "+ emptyContainer._width);
};
thumb2.onPress = function() {
loadMovie("URL/photos/image2.jpg", emptyContainer);
/*SAME AS ABOVE BUT IT DISPLAYS FIRST THE PREVIOUS
MEASURMENTS AND WHEN CLICKED AGAIN IT CHANGES
TO CORRECT MEASURMENTS*/
trace("height is "+ emptyContainer._height);
trace("width is "+ emptyContainer._width);
};
thumb3.onPress = function() {
loadMovie("URL/photos/image3.jpg", emptyContainer);
/*SAME AS ABOVE BUT IT DISPLAYS FIRST THE PREVIOUS
MEASURMENTS AND WHEN CLICKED AGAIN IT CHANGES
TO CORRECT MEASURMENTS*/
trace("height is "+ emptyContainer._height);
trace("width is "+ emptyContainer._width);
};
I don't know where I'm going wrong...what I'm trying to achieve is that it detects whe sort of image loaded...portrait or landscape via _height > _width......Heeeeeellllllllppppppppppp
This Is Driving Me Nuts Please Help
I created an animation of scrollwork (from a png file) that looks like it is being drawn realtime by using the erase a bit at a time and then reverse the frames method, however at the end of this animation I want the completed drawing to fade out. However whenever I create a motion tween and set the image alpha to 0% at the end frame it makes the png's previously transparent parts turn solid white.
I did this:
Imported the png (which has transprent parts so my custom background on the stage shows) to the stage-> Converted the png to a symbol -> Erased a bit, inserted new keyframe, erased a bit, inserted new keyframe..... till the whole thing was erased -> Reversed the frames -> inserted new key frame and end frame, put in motion tween -> changed scrollwork symbol alpha to 0% -> play animation: Works perfectly until it gets to the motion tween at which point the transparent parts go white but the visible parts fade out like it should leaving the stage white.
Can somebody please tell me how I can get it to not go white and stay transparent while fading out! Any help is much appreciated!! :)
Help It's Driving Me Nuts T_T
I did this stopmation movie worth of 322 pictures of 640x480. However since my computer is really bad when I try to publish it it says "not enough memory".
So I saved it onto a flash drive and brought it to a school computer and try to compile the flash movie into a .swf on the school computer. However, all the images in the movie are not showing up. When I check the frame it says it IS a keyframe and that means there IS something on the frame but it is either currupt or hidden.
When I check the library, double clicking to see what went wrong with all the images not showing up, when I click the image the flash editor freezes and shuts down.
It seems when the computer fails to compile the file due to not enough memory, all the image files in the movie become corrupt? GAH! What am I suppose to do! T_T
DRIVING ME NUTS I TELL YA
Let me first say that the people in this forum ROCK!
Okay, now that I kissed some butt, please help me with this one...
If you go to www.knotwear.com and click "Contact Us", you go to the proper Contact Us page. Now go to the Privacy Policy, scroll down and click one of the Contact Us links within the Privacy Policy. Why does it take you to a version of the Contact Us page with a scroll bar? My code for these buttons is the same code for when you click the main "Contact Us" button, which is:
on (release) (
gotoAndPlay("Scene Contact Us", 1);
)
P.S. If it matters, the copy for the Privacy Policy was done as a MC
If Statement In AS - Going Nuts
Why does this not work in flash? It makes it through the first if statement where if done==1 and changes "done" to "2", but once it moves left one increment it moves right again and continues to loop back and forth, and done remains "2". Its like its ignoring "if done==2".
Code:
box.onEnterFrame = function(){
//set a variable to switch between right & left movement
var done = "1";
if(done == "1"){
//Move right
if(this._x < 530){
this._x += 10;
}
//Threshold for right movement, set variable to move left
if(this._x > 530){
var done = "2";
}
trace(this._x);
trace(done);
}
if(done == "2"){
//Move left
if(this._x > 24){
this._x -= 10;
}
//Threshold for left movement
if(this._x < 24.15){
var done="3";
}
trace(this._x);
trace(done);
}
if(done == "3"){
// Do nothing, we're done.
trace("Done!");
}
}
XML Problems. Im Going Nuts Help.
Why wont the variable (this.link) from the xml get passed as nextSwf and go to the preloader? It traces fine And nextSwf is defined at the beginning and it loads.
Please help!
ActionScript Code:
var speed = 2;var easeMe = mx.transitions.easing.Strong.easeOut;var nextSwf = "home.swf";function tweenBox() {var easeType = easeMe;var beginboxY = box_mc._y;var endboxY = ybox;var time = speed;var mc = box_mc;var boxListener:Object = new Object();boxListener.onMotionFinished = function() {var mcListener:Object = new Object();mcListener.onLoadInit = function(mtClip:MovieClip) {mtClip.play();};mcListener.onLoadProgress = function(w, t) {trace('progress: '+w+", "+t);var w = mtClip.getBytesLoaded();var t = mtClip.getBytesTotal();percent_txt.text = Math.round((w/t)*100);};mcListener.onLoadError = function(mtClip:MovieClip, errorCode:String) {trace('wtf');};var mcLoader:MovieClipLoader = new MovieClipLoader();mcLoader.addListener(mcListener);mcLoader.loadClip(nextSwf, mtClip);};boxTween = new mx.transitions.Tween(mc, "_y", easeType, beginboxY, endboxY, time, true);boxTween.addListener(boxListener);}ybox = 0;tweenBox();galleriesXML = new XML();galleriesXML.ignoreWhite = true;galleriesXML.onLoad = function(ok) {if (ok) {galleriesData = this.firstChild.childNodes;for (i=0; i<galleriesData.length; i++) {galleryBut = galleriesMenu.attachMovie('button', 'butgallery'+i, i);numOfBtns[i] = "butgallery"+i;galleryBut._y = (i*16)+18;galleryBut.but_txt.text = galleriesData[i].attributes.text;galleryBut.link = galleriesData[i].firstChild.firstChild;galleryBut.onRelease = function() {mtClip.unloadMovie();ybox = 200;nextSwf = (this.link);trace(nextSwf);tweenBox();};}} else {trace('error loading xml');}};galleriesXML.load('menu.xml');
This Is Driving Me Nuts HELP
Hi there...
I am trying to make a marquee that will display quite a big text, breaking this same text each 51 characters and continue untill all the text from the file is displayed. THE fuc....g problem is that it doesnt loop, it doesnt start again to display the bloody text from begining. Here is the actual code:
Code:
var i = 0;
texteffect = "";
var pos=0;
var times=0;
function textwritter()
{
texteffect = txt.slice(pos, i);
// if ((texteffect.length % txt.length) ==0) <--Repeats, but doesnt display all.
if ((texteffect.length % 51) == 0)
{
pos = texteffect.length;
i=texteffect.length;
pos = pos*times;
i = i * times;
times++;
}
i++;
}
var intervalID = setInterval(textwritter, speed);
stop();
PLEASE HELP!
Thanks a lot.
Cheers.
Leo75.
The files are attached.
DRIVING ME NUTS I TELL YA
Let me first say that the people in this forum ROCK!
Okay, now that I kissed some butt, please help me with this one...
If you go to www.knotwear.com and click "Contact Us", you go to the proper Contact Us page. Now go to the Privacy Policy, scroll down and click one of the Contact Us links within the Privacy Policy. Why does it take you to a version of the Contact Us page with a scroll bar? My code for these buttons is the same code for when you click the main "Contact Us" button, which is:
on (release) (
gotoAndPlay("Scene Contact Us", 1);
)
P.S. If it matters, the copy for the Privacy Policy was done as a MC
If Statement In AS - Going Nuts
Why does this not work in flash? It makes it through the first if statement where if done==1 and changes "done" to "2", but once it moves left one increment it moves right again and continues to loop back and forth, and done remains "2". Its like its ignoring "if done==2".
Code:
box.onEnterFrame = function(){
//set a variable to switch between right & left movement
var done = "1";
if(done == "1"){
//Move right
if(this._x < 530){
this._x += 10;
}
//Threshold for right movement, set variable to move left
if(this._x > 530){
var done = "2";
}
trace(this._x);
trace(done);
}
if(done == "2"){
//Move left
if(this._x > 24){
this._x -= 10;
}
//Threshold for left movement
if(this._x < 24.15){
var done="3";
}
trace(this._x);
trace(done);
}
if(done == "3"){
// Do nothing, we're done.
trace("Done!");
}
}
XML Problems. Im Going Nuts Help.
Why wont the variable (this.link) from the xml get passed as nextSwf and go to the preloader? It traces fine And nextSwf is defined at the beginning and it loads.
Please help!
ActionScript Code:
var speed = 2;var easeMe = mx.transitions.easing.Strong.easeOut;var nextSwf = "home.swf";function tweenBox() {var easeType = easeMe;var beginboxY = box_mc._y;var endboxY = ybox;var time = speed;var mc = box_mc;var boxListener:Object = new Object();boxListener.onMotionFinished = function() {var mcListener:Object = new Object();mcListener.onLoadInit = function(mtClip:MovieClip) {mtClip.play();};mcListener.onLoadProgress = function(w, t) {trace('progress: '+w+", "+t);var w = mtClip.getBytesLoaded();var t = mtClip.getBytesTotal();percent_txt.text = Math.round((w/t)*100);};mcListener.onLoadError = function(mtClip:MovieClip, errorCode:String) {trace('wtf');};var mcLoader:MovieClipLoader = new MovieClipLoader();mcLoader.addListener(mcListener);mcLoader.loadClip(nextSwf, mtClip);};boxTween = new mx.transitions.Tween(mc, "_y", easeType, beginboxY, endboxY, time, true);boxTween.addListener(boxListener);}ybox = 0;tweenBox();galleriesXML = new XML();galleriesXML.ignoreWhite = true;galleriesXML.onLoad = function(ok) {if (ok) {galleriesData = this.firstChild.childNodes;for (i=0; i<galleriesData.length; i++) {galleryBut = galleriesMenu.attachMovie('button', 'butgallery'+i, i);numOfBtns[i] = "butgallery"+i;galleryBut._y = (i*16)+18;galleryBut.but_txt.text = galleriesData[i].attributes.text;galleryBut.link = galleriesData[i].firstChild.firstChild;galleryBut.onRelease = function() {mtClip.unloadMovie();ybox = 200;nextSwf = (this.link);trace(nextSwf);tweenBox();};}} else {trace('error loading xml');}};galleriesXML.load('menu.xml');
FLV Drives Me NUTS
Hi, I was trying to review my FLV,
is there any easy way to do it without those streaming code,
I made a new video object in library, drag it to the stage,
and import my FLV into it, then hit ctrl+enter, BAM!!! it crashes, KEEP CRASHING....please help
[AS] Driving Me *Nuts*
Hell, this is really driving me nuts. No clue why my swf behaves like this... Well, here's what happens:
In the site I'm working on I have two sections.
First one: a gallery.
ActionScript Code:
stop();
nav.button11_mc._visible = false;
delete pics;
delete loadPic;
delete init;
delete ns;
delete nc;
delete snd;
delete audio;
delete showFs;
delete autoStart;
delete bw;
// picture data bank
var pics:Array = new Array();
pics.push("gallery/frank01.jpg");
pics.push("gallery/frank02.jpg");
pics.push("gallery/frank03.jpg");
pics.push("gallery/frank04.jpg");
pics.push("gallery/frank05.jpg");
pics.push("gallery/frank06.jpg");
pics.push("gallery/frank07.jpg");
pics.push("gallery/frank08.jpg");
pics.push("gallery/frank09.jpg");
pics.push("gallery/frank10.jpg");
pics.push("gallery/frank11.jpg");
pics.push("gallery/frank12.jpg");
pics.push("gallery/frank13.jpg");
pics.push("gallery/frank14.jpg");
var loadPic:Function = function(index:Number) {
this.hidePreloader = function() {
delete timeline.onEnterFrame;
timeline.removeMovieClip();
function rem() {
preloader.removeMovieClip();
}
preloader.alphaTo(0, 0.5, "easeOutQuad", 0, rem);
picture.alphaTo(100, 1, "easeOutQuad", 0, func);
};
this.showPreloader = function() {
picture.alphaTo(0, 1, "easeOutQuad", 0, func);
var timeline:MovieClip = this.createEmptyMovieClip("timeline", 1);
var preloader:MovieClip = this.attachMovie("picPreloader", "preloader", 2);
var holder:MovieClip = this.picture.holder;
preloader._x = 271;
preloader._y = 355;
preloader._alpha = 0;
preloader.progress_txt.text = "0";
function rem() {
holder.loadMovie(pics[index]);
timeline.onEnterFrame = function() {
var total:Number = holder.getBytesTotal();
var loaded:Number = holder.getBytesLoaded();
var perc:Number = Math.round(loaded/total*100);
if (perc<100) {
preloader.progress_txt.text = perc+"%";
} else {
preloader.progress_txt.text = "100%";
hidePreloader();
}
};
}
preloader.alphaTo(100, 0.5, "easeOutQuad", 0, rem);
};
showPreloader();
};
this.init = function() {
picture._alpha = 0;
picture.alphaTo(100,1,"easeOutQuad",0);
}
init();
And the other one: a video player
ActionScript Code:
stop();
nav.button11_mc._visible = false;
showFs=false;
autoStart=true;
bw = 0;
// Create netstream:
nc = new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
ns.setBufferTime(5);
// function to set the right size for the controlbar items
function resizeIt(w, h) {
// put videodisplay dimensions in vars
myX = videoDisplay._x;
myY = videoDisplay._y+videoDisplay._height;
myW = videoDisplay._width;
// the items on the left ..
leftBg._x = myX-2;
leftBg._y = 412.5;
playBut._x = pauseBut._x=myX+10;
playBut._y = 420.5;
// the items in the middle ..
centerBg._x = percentBar._x=progressBar._x=backBar._x=myX+19;
centerBg._y = 412.5;
percentBar._y = progressBar._y=420.5;
bw = centerBg._width=percentBar._width=progressBar._width=myW-39;
// and the ones on the right ..
rightBg._x = myX+myW-20;
rightBg._y = 412.5;
muteBut._x = unmuteBut._x=myX+myW-10;
muteBut._y = unmuteBut._y=422.5;
}
ns.onMetaData = function(obj) {
// Retrieve duration meta data
this.totalTime = obj.duration;
// set the right size for the videodisplay if metadata is found
if (obj.width != 0) {
resizeIt(obj.width, obj.height);
}
};
ns.onStatus = function(object) {
if (object.code == "NetStream.Play.Start") {
// set the right size for the videodisplay if playing starts
if (videoDisplay.width != 0) {
resizeIt(videoDisplay.width, videoDisplay.height);
}
} else if (object.code == "NetStream.Buffer.Full") {
// set the right size for the videodisplay if buffer is filled
if (videoDisplay.width != 0 && fs != true) {
resizeIt(videoDisplay.width, videoDisplay.height);
}
} else if (object.code == "NetStream.Play.Stop") {
// rewind and pause on stop
ns.seek(0);
// ns.pause(); <--- make it loop
// playBut._visible = true;
// pauseBut._visible = false;
} else {
trace (object.code);
}
};
//attach videodisplay
this.loadVideo = function(vFile) {
videoDisplay.attachVideo(ns);
ns.play("videos/" + vFile);
//load progress display
percentBar.onEnterFrame = function() {
loaded = this._parent.ns.bytesLoaded;
total = this._parent.ns.bytesTotal;
if (loaded == total && loaded>1000) {
percentBar._width = bw;
delete this.onEnterFrame;
} else {
percentBar._width = int(bw*loaded/total);
}
};
};
loadVideo("forward.flv");
// build sound object
snd.attachAudio(ns);
audio = new Sound(snd);
audio.setVolume(0);
unmuteBut._visible = false;
muteBut._visible = false;
// mute button action
muteBut.onPress = function() {
audio.setVolume(0);
unmuteBut._visible = true;
this._visible = false;
};
// unmute button action
unmuteBut.onPress = function() {
audio.setVolume(100);
muteBut._visible = true;
this._visible = false;
};
// hide play or pause button
if (autoStart == true) {
playBut._visible = false;
} else {
ns.pause();
pauseBut._visible = false;
}
// pause button action
pauseBut.onPress = function() {
ns.pause();
playBut._visible = true;
this._visible = false;
};
// play button action
playBut.onPress = function() {
ns.pause();
pauseBut._visible = true;
this._visible = false;
};
// play progress
progressBar.onEnterFrame = function() {
this._width = bw*ns.time/ns.totalTime;
};
// start playhead scrubbing
centerBg.onPress = function() {
this.onEnterFrame = function() {
scl = this._xmouse*this._xscale/bw/100;
ns.seek(scl*ns.totalTime);
};
};
// stop playhead scrubbing
centerBg.onRelease = centerBg.onReleaseOutside=function () {
delete this.onEnterFrame;
pauseBut._visible == false ? videoDisplay.pause() : null;
};
However after visiting the video section, the gallery does no longer work. Just in case, I've set up a row of delete's, to be sure that no var off the video section might "disturb" the gallery section. This is not working either...
I'd thank for any advice given.
TIA
_ Chris
This Is Driving Me Nuts
I cannot seem to make a nice plastic looking bar, button, or pretty much anything. I wanted to make something like the FOX sports bar (during games) for my site, but no matter how hard I try it never looks that good. Can somebody please help me on creating this?
Thanks,
Andrew
Flash Forms On AOL = Me Going Nuts (Please Help Me Or Just Let Me Die)
For reasons that are to long to explain I'm forced to use AOL's CGI. So let me brief you on it a little bit..
You can find everything you NEVER wanted to know about it here:
http://hometown.aol.com/wwwadmin/email/email.htm
So to use AOL's CGI on and HTML page it would look like this:
<form action="/cgi-bin/email/freqfest/freqfest.eml" method="POST">
<input type="text" name="email" size="35" maxlength="45">
<INPUT TYPE="hidden" NAME="subject" VALUE="web site feedback">
<textarea rows="5" cols="62" name="comments"></textarea>
<input type="submit" value="Submit">
</form>
I've tried about a zillion different things and I JUST CAN'T seem to figure out how to make this work? So I'm reduced to begging.. will some one Pleeeeeeeeeeeeeeeease help me out?!!? Pleeeeeeeeeeeeease!??!
Frequent-C
http://www.freq-fest.com
Help My Text Is Goin' Nuts
When I convert (or export) my swish files to flash files (.swf) and preview it on a browser, my swish file turns to black and white and the text is ruined! I read this at the troubleshooting section:
Due to a bug in Adobe Type Manager for Windows NT Swish may not function correctly when you attempt to play (or export) movies that contain PostScript fonts.
This bug also affects Macromedia Flash. Read this technote from Macromedia.
When you click the Show PostScript Fonts option on the Text Tab Swish will display the warning below if you are running Windows NT4.
To workaround this problem you should use the Windows NT control panel to convert Adobe Type 1 fonts to TrueType fonts. To do this, follow these steps:
1. Select Settings | Control Panel from the Windows Start Menu
2. Double click on the Fonts Folder.
3. Select File | Install New Font... and choose the Type 1 font you wish to use in Swish.
4. Make sure "Convert Type 1 Font to TrueType" is checked and click Yes.
This procedure will convert the Type 1 font to True Type and avoid any problems with Adobe Type Manager. You may want to remove the Type 1 version of the font to prevent duplication.
Note: This bug only affects Windows NT4. You can use Adobe Type Manager without problems on Windows 95, 98 and 2000.
But the thing is, I'm using windows ME and not NT and still, the text is going insane everytime i export it. Is there a solution for this??? (i even followed the number 4 procedure up there, and it still didn't work.)
Please help...
ARGH (why Me) This Is Driving Me Nuts
Ok...
Right now I have a Flash movie with a logo being revealed from left to right using a mask, a few buttons tween from behind an object to become visable, & some random graphic effects happen somewhere else on the stage.
Right now all of this happens at once. I'd like to break these up in the timeline so they happen one after the other.
The problem is this...
Let's say I have 3 buttons. Each tweening from behind and object, revealing themselves. Each tween takes 5 frames to complete. I have button #1 going from frame 1 to 5, button #2 going from frame 6 to 10, & button #3 going from frame 11 to 15.
When I test my movie, the first button loads just fine....then the 2nd loads only half way....and the 3rd doesn't show up at all!!
I have no idea why this is happening and I have things like this in a previous flash movie I made and that one works fine. (and yes I checked the older movie to see if something was noticably different and I couldn't see anything!)
Here's a 2nd problem which is pretty much the same. I had my logo under a mask. The mask was on the stage and the logo was off the stage to the right, with a motion tween making it "fly" in from right to left.
For whatever reason the damn thing flys in 75% of the way and then stops!
I left the logo on the stage and tweened the mask instead...moving the mask to the left and having it come over the logo from left-to-right. The mask is still on the stage and when I test this version, everything works.
It just doesn't make any sense and right now at 5:30am my brain is to damn fried to deal with this anymore.
By the way, everything works when I test the movie in the editing mode. The problems pop up once I Publish or use the Test Movie option.
You can see a screen capture of part of my timeline here if it'll help:
http://www.geocities.com/dukeofcrydee/flash.jpg
Hit Testing - Driving Me Nuts
i have two movieclips, the first is following the mouse and i want the second to play when the first is over it. it seems simple but i can't get it to work. if anyone could tell me what script to use (and where to put it) it would be very much apreciated.
SetProperty Driving Me Nuts
okay, can anyone tell me why this isnt working?
I am trying to make a menu of dynamic buttons and place them centered on the stage.
I calculated the center and the offset and managed to place the borders down but hwen i go into the loop to try and place the actual menu items they all appear at the 0 _x coordinate and i can't set the property to make them center.
I've tried instancename._x=coordinate and set(_root.instancename._x,coordinate) and eerything else i can think of but i just don't know what i'm doing wrong...
whenever i do a getUrl to return the _x coordinates they come back blank
HELP!
PLEASE!
Code Below:
// values set for testing
numBut = 1;
b1 = "cc";
b2 = "ce";
b3 = "cl";
b4 = "cr";
b5 = "mc";
b6 = "mp";
b7 = "sc";
// values set for testing
// initialize variables
theDepth = 1;
distBut = numBut*35;
nextPos = 250-distBut;
// initialize variables
// create first edge
attachMovie("edge", "leftEdge", theDepth);
leftEdge._x = nextPos-5;
theDepth = theDepth+1;
// create first edge
// loop though array and place buttons
for (i=1; i<=numBut; i++) {
thisButton = eval('b'+i);
thisInstance= '_root.realButton' + i;
_root.attachMovie(thisButton, thisInstance, theDepth);
set (thisInstance + '._x', nextPos);
getURL ('javascript: alert("' + thisInstance + 'x'+ getProperty(thisInstance,_x) +'x'+ nextPos + '")');
theDepth = theDepth+1;
nextPos = nextPos+70;
}
// loop through array and place buttons
// create last edge
_root.attachMovie("edge", "rightEdge", theDepth);
rightEdge._xscale = -100;
rightEdge._x = nextPos+5;
// create last edge
Going Nuts: Delay And Setinterval
Hello,
all i want it to do this:
create a function which i can use to create a pause between 2 commands in flash.
for example, a delay between the 2 fadein commands i give:
MC1.fadein(100, 5);
delay(1000); <<<<
MC2.fadein(100,5);
Does anyone has a good working function for it?
Thank You,
Miguel Moura
LoadMovie JPG... Driving Me Nuts
I've been trying and trying and TRYING to load external .jpg's in Flash MX but somehow, it STILL doesn't work. Can anyone please look this file up and tell me where I'm going wrong.
Thanks!
This Is Driving Me Nuts Buttons
Hi
I'm trying to link to a certain frame within another swf and have used this code
on (release) {
tellTarget (_level0) {
loadMovieNum("hc1.swf", 0);
gotoAndPlay(200);
}
}
it goes to the correct swf but not the frame, please could someone help????
Please Help, This Is Driveing Me NUTS Objects
I'm trying to call a function that is outside an object from within an object.
this is my code.
stop;
//this is my object "ball"
function ball() {
this.test = "testing";
}
// this is a funtion within my object "ball" Note that it calls a funtion "callfuntion" at the end.
ball.prototype.jump = function() {
this.test = "changed to jumped";
msg = "varable passed";
this.callfuntion(msg);
};
// says bb is a new ball object
bb = new ball();
// calls the jumb function within my ball object
bb.jump();
// this is where I'm haveing problems. the following should work but it does not.
// I'm trying to "catch" the bb.callfuntion and tell it to exacute the "calledfromball" function
bb.callfuntion = calledfromball;
// this is the funtion in the end that i'm trying to exacute from within a ball object
// but it never get exacuted.
function calledfromball(msg) {
trace("got to called from ball");
trace(bb.test);
trace(msg);
}
I know this can be done. ElectroServerAS from Eelectrotank does it.
Any Ideas?
Mike.
Menu Driving Me Nuts
Hi
take a look at this file it's driving me nuts ..basically wat i want is :
1) change the buttons cairo - luxor etc to goto a scene or a frame in the movie instead of opening a url (sounds easy? give it a try !)
2) optimize the animation a bit .. im not so good at actionscripting animations
Thanks in advance !
Preloader Driving Me Nuts Help
Hey all :-) This preloader is driving me craaazy! It loads 23-24 percent and continues onto the movie before it is fully loaded. Hence causing problems because if you click on certain links.. the frames arent loaded yet...
I have the preloader loaded into the 1st frame.. its set as a movie
this is the preloader code:
Frame 1
ifFrameLoaded (52) {
gotoAndPlay(2);
}
Frame 2
total = int(_root.getBytesTotal()/1024);
download = int(_root.getBytesLoaded()/1024);
if (total == download) {
tellTarget ("../") {
play ();
}
} else {
play ();
}
Frame 3
gotoAndPlay(2);
Thanks in advnace!!
Animated Buttons...going Nuts.
Okay...I'm new at this flash business...and I have a project due after spring break. The project is..."make a map of your day"...i stayed in all day the day that I mapped...so...what my project looks like is...a floorplan of my apartment with a few icons on it...they're colored circles with black outlines with black icons inside them...like...there's one for the bed, one for the toilet, one for the fridge, etc. a black circle..with a fill color...with an icon that looks like the object it's referring to. these were made in illustrator and imported into flash.
So...so far, I have my map (my apartment floorplan)...with the icons placed on it in their respective positions in the flash stage.
my intentions...are....to have the icons "flash"...when the user is supposed to click on them. like---the Bed will flash first, cuz the first thing i did was wake up. when the user clicks on the flashing bed, a note will pop up that says 12:05pm--woke up...then the next icon (the toilet)...will start flashing so that the user can go to it and click on it...
this will carry the user through my whole day...some icons being used for more than one thing (is that possible?)...anyways....
I've created identical icons (to create the animation)...the colors are the same, but everything that's drawn or outlined in black is done in WHITE...so that way, once animated...thhe icon flashes from black to white.
anyways....I do NOT know how to make the buttons animate like this....on the up state i guess...and i don't want them all going at the same time...just one at a time....
does this make sense to ANYONE? I'm really struggling here. been looking up tutorials and such...but I'm outta luck...cuz I don't know how to look up what I'm trying to do.
Oh Lordy..any help would be greatly appreciated.
|