Memory Loss Please Help Controling Level
I dont know what drug's im on but this memory loss is really killing my time....i totally forgot the easy script of how to make a level that u load into ur main movie be controlled....i am trying to tell the level to gotoandplay from the main swf, that the level is being loaded into....can someone please ease my pain by dealing me the action script....thanx... i dearly appreciate it......take care......and sorry for the slow question....i guess it is tru....we r only humans.
Ultrashock Forums > Flash > ActionScript
Posted on: 2004-11-07
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Memory Loss
I used to do a lot in Flash, but have never considered myself to be an action script guru. However, the last time I did anything beyond creating motion tweens was in Flash MX, and right after it was released, so it's been a few years. Anyway, I have gotten to the point of not even knowing proper syntax in AS, but if I could find something basic (similar to WebMonkey's html cheat sheet) that would kick my brain back into gear I could catch up fast. Can anyone point me to some primers that would help my brain shake the rust off? I'd appreciate it.
RemoveMovieClip Memory Loss?
To learn flash, I'm creating a game.. Collapse.. SameGame.. Ya know, clicking on the like colored blocks makes them go away, object of the game is to make them all go away.
When the screen is created, I do:
code:
blocks[col][row] = _root.attachMovie(bt,bid,bid);
as often as needed, where bt is the blocktype, and bid is a unique number built off of the row and column..
When moving the blocks down, I do:
code:
for (var a=1; a <= dispwidth; a++) {
var t = new Array();
var tc = 1;
for (var i=1; i<= blocks[a].length; i++) {
if (blocks[a][i] != undefined) {
t[tc] = blocks[a][i];
t[tc]._y = fixY(tc);
t[tc].row = tc;
blocks[a][i] = undefined;
tc++;
}
}
blocks[a] = t;
}
This works as expected.. What I'm wondering..
Would flash still have memory allocated to the blocks[col][row] movie clip, although I didn't do a blocks[col][row].removeMovieClip(); ?
(Note: I have tried it with the removeMovieClip() but then, it doesnt act as it should. Acts as though t[] is just a pointer to blocks[] instead of a seperate array)
JavaScript Help Memory Loss :-(
I just found out the Chromeless window is dead with IE6 SP1... now I want a regular popup with javascript...just can't remember how to do it... what's the code I have to add to my <a href> tag ??
Thanks
Controling Movie Level 0 From A Higher Level
Hi,
I have a movie that loads various other .swf files into level 3.
How do i get the movie loaded into level 3 to tell the main movie in level 0 to go and play a certain frame?
Can this be done?
Cheers
Pete
Controling Tween In Level 2 With Button In Level 1
Hi all,
This may be a bit long and confussing, pls bear with me. thank you
imagine this:
i have a main.swf tht loads a swf 3 buttons in it (but.swf) onto level1.
There are 3 other differnet SWF files (1.swf, 2.swf, 3.swf). Each of then has a tween tht casues them to fade in from frame 1to 10, stops at frame 10(a stop actionscript is used), and fades out to from frame 11 to20 and stops there(a stop actionscript is used, casues its the end and no point to loop).
Here's the problem:
I want the first button to click and 1.swf will be loaded onto level2 (it fades in and stays)of the main.swf. And when click onto the second button, 1.swf will fade out, be unloaded from level2 and 3.swf will fade in onto level2.
And this will go on and on in no particluar order(e.g button 1 can be clicked onto first then button 3, or button 2then button 3,etc).
i have tried to use the script below for the buttons but it donest seem to be right
----------------------------------------------------------------
on (release) {
_level2.gotoAndPlay(11);
}
on (release) {
unloadMovieNum(2);
loadMovieNum("3.swf", 2);
}
--------------------------------------------------------------
Hope i have made my problem clear, if not pls let me know.
I think this should be a fairly simple problem to slove....So i hope someone can reply me soon
THX A Million!
Controling .swf Loaded Into Level 1
See if this makes sense, It's driving me insane...
Ok, Im loading a movie into level 1, using loadMovie action within the base movie.
The movie thats being loaded has a "stop" action on the first frame.
When the base movie "level 0" reaches a certain frame, I want it to tell the movie loaded in Level 1(with "stop" action in frame one) to goto and play frame 2.
The reason im doing this is because the movie thats being loaded is rather large, so im attempting to get it to load unbenounced to the person viewing while they are watching the base movie. So that when its time for level 1 to be displayed, it will already be loaded and the person viewing doesn't know any different and doesn't have to wait.
Perhaps there is a better way to make this happen. HELP!!!!
Thanx
Controling Level 4 From Level0
Hi
I have a movie clip called "Button1" in the first frame of a swf "TestMenu1.swf" that is loading on a level 4 of "TestMain.swf" file.
I'm trying to control "Button1" that is on level 4, from the main movie in level0.
this is the script I'm using but is not working.
_level4.Button1.onRollOver = function () {
this.Button1.gotoAndPlay("R_Over");
}
What I'm doing wrong?
I attached a small zip, if some one want to take a look at the file.
thanks
Alex
Controling Sound On A Level
I people,
My problem... I have MP3's on my site. I created a pop-up window that you can listen to these MP3's in and also crontrol the volume, stop and Play using buttons. The pop up window has a swf that contains a preloader for the Swf that contains the MP3. Thats the back door way to preloading an swf that uses the attachSound method.
Anyway, once the MP3 has loaded it starts to play... all is good. I can change the volume, I can Stop it but then it goes wonky. If i stop the sound I can't get it to start again when i hit the play button.
The Play button uses the following code:
on (release) {
_root.mySound();
}
One thing to know is that the SWF with the MP3 in it is loaded onto level 5.
Any suggestions.
You can check out the site for yourself at www.aaronsmyth.com ,go to the mp3 section and click on "holding from you".
Each Level Eats More Memory
I've got a frustrating problem where every time a level ends and begins again, it eats a little more memory. This means that after playing for 5mins or so, the game is beginning to noticeably slow down. I'll post my level class. If anyone's got the time to have a look at this, I'd be most grateful...
Code:
package
{
import canazza.DataListener;
import flash.display.*;
import flash.events.Event;
import flash.text.TextField;
import flash.text.TextFormat;
public class level extends Sprite
{
public static var anNumber:int;
public var cardNumber:int;
public var animalSpeed:int;
public var myBackground:background;
private var myHitTest:HitTest;
private static var myLasso:Net;
public static var aniArray:Array;
public var levelTimer:FloodTimer;
public var levelTime:int;
public var level1Speed:Number;
public var level2Speed:Number;
public var level3Speed:Number;
public var level4Speed:Number;
public var level5Speed:Number;
private var thisAnimal:animal;
public function level(levelNo:int)
{
trace("level instantiated");
myBackground = new background();
animalSpeed = 30;
level1Speed = 0;
level2Speed = animalSpeed*0.25;
level3Speed = animalSpeed*0.5;
level4Speed = animalSpeed*0.75;
level5Speed = animalSpeed;
setLevelVars(levelNo);
this.addChild(myBackground);
aniArray = new Array();
myLasso = new Net();
myHitTest = new HitTest();
animalSpawn();
wildCardSpawn();
DataListener.addDataListener("removeAnimalListeners",cleanUpLevel);
levelTimer = new FloodTimer(levelTime);
this.addChild(levelTimer);
myBackground.addChild(myLasso);
var levelFormat:TextFormat = new TextFormat();
levelFormat.size = 30;
levelFormat.font = "_Arial"
var levelBox:TextField = new TextField();
levelBox.selectable = false;
levelBox.embedFonts = true;
levelBox.width = 250;
levelBox.text = "level No: "+levelNo.toString();
levelBox.setTextFormat(levelFormat);
addChild(levelBox);
var visuals:VisualFX = new VisualFX();
addChild(visuals);
DataListener.setData("levelCreated","balls");
}
private function setLevelVars(levelNo):void {
if (levelNo==1) {
anNumber = 2;
animalSpeed += level1Speed;
cardNumber = 0
levelTime = anNumber*10;
}else if (levelNo==2) {
anNumber = 2;
animalSpeed +=level2Speed;
cardNumber = 0;
levelTime = anNumber*10;
}else if (levelNo==3) {
anNumber = 2;
animalSpeed +=level3Speed;
cardNumber = 0;
levelTime = anNumber*10;
}else if (levelNo==4) {
anNumber = 2;
animalSpeed += level4Speed;
cardNumber = 0;
levelTime = anNumber*10;
}else if (levelNo==5) {
anNumber = 2;
animalSpeed += level5Speed;
cardNumber = 0;
levelTime = anNumber*10;
}else if (levelNo==6) {
anNumber = 4;
animalSpeed += level1Speed;
cardNumber = 0;
levelTime = anNumber*9;
}else if (levelNo==7) {
anNumber = 4;
animalSpeed += level2Speed;
cardNumber = 0;
levelTime = anNumber*9;
}else if (levelNo==8) {
anNumber = 4;
animalSpeed += level3Speed;
cardNumber = 0;
levelTime = anNumber*9;
}else if (levelNo==9) {
anNumber = 4;
animalSpeed += level4Speed;
cardNumber = 0;
levelTime = anNumber*9;
}else if (levelNo==10) {
anNumber = 4;
animalSpeed += level5Speed;
cardNumber = 0;
levelTime = anNumber*9;
}else if (levelNo==11) {
anNumber = 4;
animalSpeed += level1Speed;
cardNumber = 1;
levelTime = anNumber*8;
}else if (levelNo==12) {
anNumber = 4;
animalSpeed +=level2Speed;
cardNumber = 1;
levelTime = anNumber*8;
}else if (levelNo==13) {
anNumber = 4;
animalSpeed += level3Speed;
cardNumber = 1;
levelTime = anNumber*8;
}else if (levelNo==14) {
anNumber = 4;
animalSpeed += level4Speed;
cardNumber = 1;
levelTime = anNumber*8;
}else if (levelNo==15) {
anNumber = 4;
animalSpeed += level5Speed;
cardNumber = 1;
levelTime = anNumber*8;
}else if (levelNo==16) {
anNumber = 6;
animalSpeed += level1Speed;
cardNumber = 1;
levelTime = anNumber*7;
}else if (levelNo==17) {
anNumber = 6;
animalSpeed += level2Speed;
cardNumber = 0;
levelTime = anNumber*7;
}else if (levelNo==18) {
anNumber = 6;
animalSpeed += level3Speed;
cardNumber = 0;
levelTime = anNumber*7;
}else if (levelNo==19) {
anNumber = 6;
animalSpeed += level4Speed;
cardNumber = 1;
levelTime = anNumber*7;
}else if (levelNo==20) {
anNumber = 6;
animalSpeed += level5Speed;
cardNumber = 1;
levelTime = anNumber*7;
}else if (levelNo==21) {
anNumber = 6;
animalSpeed += level1Speed;
cardNumber = 2;
levelTime = anNumber*6;
}else if (levelNo==22) {
anNumber = 6;
animalSpeed += level2Speed;
cardNumber = 2;
levelTime = anNumber*6;
}else if (levelNo==23) {
anNumber = 6;
animalSpeed += level3Speed;
cardNumber = 2;
levelTime = anNumber*6;
}else if (levelNo==24) {
anNumber = 6;
animalSpeed += level4Speed;
cardNumber = 2;
levelTime = anNumber*6;
}else if (levelNo==25) {
anNumber = 6;
animalSpeed += level1Speed;
cardNumber = 3;
levelTime = anNumber*6;
}
}
//create the animals
public function animalSpawn():void {
//Creates anNumber of animal objects and adds them to aniArray
//Sets animal type
for (var x:int = 0; x<anNumber; x++) {
var thisAnimal:animal = new animal(animalSpeed);
thisAnimal.type = floodGame.aniTypeArray[x];
thisAnimal.addEventListener(Event.ENTER_FRAME,myHitTest.animalCrash,false,0,true);
aniArray.push(thisAnimal);
addChild(thisAnimal);
trace(thisAnimal.type+" animal spawned");
}
}
public function wildCardSpawn():void {
//Creates cardNumber of wildcard animal objects and adds them to aniArray
//Sets animal type
for (var x:int = 0; x<cardNumber; x++) {
thisAnimal = new animal(animalSpeed);
thisAnimal.type = floodGame.cardTypeArray[x];
thisAnimal.addEventListener(Event.ENTER_FRAME,myHitTest.animalCrash,false,0,true);
aniArray.push(thisAnimal);
addChild(thisAnimal);
trace(thisAnimal.type+" animal spawned");
}
}
public static function netKill():void {
myLasso.netFadeOut();
}
private function cleanUpLevel(label,data:*):void {
data.removeEventListener(Event.ENTER_FRAME,myHitTest.animalCrash);
}
}
}
Level 0 Loads A Movie Into Level 1 - Buttons On Level 0 Still Appear To Be Active Underneath
I am working on an interactive cd. My main movie plays in level 0 and clicking on an option loads the relevant movie into level 1.
The problem I have is that the main movie's buttons are still active underneath and if you click on the wrong place in the movie on level 1 it jumps to a new movie because of the button below.
Is there a way to somehow deactivate these while there is a movie playing above?
Memory Leaks In Flash? Cus My Program Is Using Over 235,000kbs Of Memory
ANY HELP APPRECIATED as i've spent 2 days on this (started 2 days 3 hours ago)... please help me
I have only 16 images in my program, its a slideshow, all my images have a small image selection which on(rollOver) shows that image in a bigger screen, however when my program launches, I do ctrl + alt + del, and my memory usage for that swf file I made is at 235,000kb of memory, and my laptop can't handle it, (its 70mb) and the original .fla file is (70mb)
Is there anyway to fix this, I belive my scripts are leaking, I know for a fact, im not cleaning my locals... or globals...
if I declare a variable should I set it to null?
Question 1: Should I remove local variables? if so how do I do it?
Question 2: Should I remove global variables? if so how do I do it?
Question 3: Any other things I need to know?
this is my code for start up, which hides all images not in the first 4 places (which is suppost to be visible) the others are turned invisible...
Code:
_global.b = Array();
_global.end = 16;
_global.b[0] = btn_1;
_global.b[1] = btn_2;
_global.b[2] = btn_3;
_global.b[3] = btn_4;
_global.b[4] = btn_5;
_global.b[5] = btn_6;
_global.b[6] = btn_7;
_global.b[7] = btn_8;
_global.b[8] = btn_9;
_global.b[9] = btn_10;
_global.b[10] = btn_11;
_global.b[11] = btn_12;
_global.b[12] = btn_13;
_global.b[13] = btn_14;
_global.b[14] = btn_15;
_global.b[15] = btn_16;
_global.X = 40;
_global.Y = 30;
var t:Number = Array();
for (var i:Number = 0; i<4; i++)
{
t[i] = (i*100)+80;
}
for (var i:Number = 0; i<_global.end; i++)
{
var b = _global.b[i]._x;
_global.b[i]._x = (i*100)+t[0];
if (b != t[0] and b != t[1] and b != t[2] and b != t[3])
{
_global.b[i]._visible = false;
}
else
{
_global.b[i]._visible = true;
}
}
code for scrolling through my list of images (as it only shows 4 on the screen at one time)
basically, each image is 90 * 68 (width/height) the X position of the first image is 80, and it increments by 100 each time, until the 5th image, in which its 30, the start up code above, spaces them out by 100 (as I normally dont have enough room to fit 16+ images spaced out by 100) it also does other things
Basically, t gets the X position of last image... then
And basically hides and unhides images pending if they're X position is 80, 180, 280, 380...
Code:
on(release)
{
var t:Number = 0;
for (var i:Number = 0; i<_global.end; i++)
{
t = (i*100)+80;
}
for (var i:Number = 0; i<_global.end; i++)
{
if (_global.b[i]._x > 79)
{
if (_global.b[i]._x == 80)
{
_global.b[i]._visible = false;
_global.b[i]._x = t+100;
}
if (_global.b[i]._x > 579)
{
_global.b[i]._visible = false;
}
if (_global.b[i]._x == 480)
{
_global.b[i]._visible = true;
}
_global.b[i]._x -= 100;
}
}
}
The next code is for "enhancing" my images a little bit, it increases its Width & Height by 30 and 40... and decreases by that on rollOut / dragOut
(as you can dragOut and rollOut doesn't happen therefore I need it so you can't "increase" the image height & width without decreasing when your mouse moves off it)
Code:
on(rollOver)
{
gotoAndStop(2);
var b = btn_1
b._width = b._width + _global.X;
b._height = b._height + _global.Y;
b._x = b._x - X/2;
b._y = b._y - Y/2;
}
on(dragOut)
{
var b = btn_1;
b._width = b._width - _global.X;
b._height = b._height - _global.Y;
b._x = b._x + X/2;
b._y = b._y + Y/2;
}
on(rollOut)
{
var b = btn_1;
b._width = b._width - _global.X;
b._height = b._height - _global.Y;
b._x = b._x + X/2;
b._y = b._y + Y/2;
}
Thats it, they're basically 1 of each different thing I have... it basically stays the same, I have 32 images (large_1-16, and small_1-16)
They're exactly the same size, but I wasn't sure if I could use 1 image twice, for different things (they're size is 2500 * 1900 give or take a 100 or so)
On Mouse Press Load Movie To Level 5 And Unload Movies From Level 6.7.8.9 ?
on mouse press Load movie to level 5 and unload movies from level 6.7.8.9 ???
Ok here is the deal
I have 5 Music files I created 5 seperate flash movies for them
As it stands now I have
Track1 load to level 5
Track2 load to level 6
Track3 load to level 7
Track4 load to level 8
Track5 load to level 9
The problem is how I script that if I press track 1 to unload level 6,7,8,9 so only level 5 track playing
Or if I press Track 5 to unload movies level 5,6,7,8
This is what I done so far
http://eclipse.ebportal.com/bluenotejazz/index.html
If u press on track1 and after on track 2, Track 2 will just upload new flash file on top of track 1.
Now I am not good with this but, this is what I tried
This is as code stands
on (press) {
stopAllSounds();
loadMovieNum("flash/track1.swf", 5);
play();
}
This is what I was trying to do for TRACK 1
on (press) {
stopAllSounds();
loadMovieNum("flash/track1.swf", 5);
play();
}
on (release) {
unloadMovieNum(6,7,8,9);
}
---------------------------------
Of course for Track 2 this would be
on (press) {
stopAllSounds();
loadMovieNum("flash/track2.swf", 6);
play();
}
on (release) {
unloadMovieNum(5,7,8,9);
}
ETC
Pls some help need it here and its URGENT !!!
I'm At A Loss
i'd like to create a "jeopardy"-style quiz game for use in an educational setting, but i have practically zero expereince with flash. the game doesnt need to be complicated, just categories with 5 questions, when $ amount clicked on, question is shown full screen, another mouseclick, back to category view. if at all possible, i'd like to be able to load dift categories and questions from a text file. can anyone point me in the right direction to get started with this? or is it beyond my very limited abilites?
thanx!
At A Loss, Here Is My .fla, Please Help
Hey everyone, I posted a few days ago asking for help but the suggestions I got didnt seem to get me anywhere, I've tried alot of stuff with no success, I think I need a real flash wizard to help me. I have this one last thing to do but I cant get it to work and its keeping me from moving forward on this project. Here is my fla (3 mb) http://notos.bartolsfeet.com/hall2.fla
What I'm trying to do is make a scroller so that everything but a medium sized rectangle is masked, and so the user can scroll up, down, left, right to view the entire movie (basically I'd like for everything in that fla to scroll in unison). I was hoping for something similar to this http://www.flashkit.com/movies/Effec...6691/index.php
but at this point as long as everything in that fla will scroll in unison with a 'mouse over' and the animations and actions still work will be PERFECT lol, I'm desperate!! ;P
Thanks alot to anyone who helps
At A Loss...
I am trying to create a drop down menu and I thought I had done everything correctly. Apparently, I have not because when you mouseover the menu item, the hand appears but nothing drops down. I've spent the day pulling my hair out and going over everything and can't figure out where I've gone wrong. I've attached the file of my monstrosity if anyone cares to take a peek.
Thanks so much!
Bridget
Var Loss
I create a var in one frame:
Code:
stop ();
_root.onEnterFrame = function (){
var tempUsername:String = userInput_txt.text;
var tempPassword:String = passInput_txt.text;
trace(tempUsername);
}
next_btn.onRelease = function (){
if (userInput_txt.length >= 6 && passInput_txt.length >= 4 && passInput2_txt.length >= 4){
if (passInput_txt.text == passInput2_txt.text){
gotoAndStop ("NewUser2");
delete _root.onEnterFrame;
}else{
alert_mc.gotoAndStop ("CreateUserError2");
}
}else{
alert_mc.gotoAndStop ("CreateUserError1");
}
}
cancel_btn.onRelease = function (){
if (saver.data.existingUser){
gotoAndStop ("Login");
}else{
alert_mc.gotoAndStop ("CannotQuit");
}
}
In the second frame that var (tempUsername and all of them) become undefined. Why is this? (The second frame is in the same scene)
I'm At A Loss
Ok, so i've been trying to use the hitTest function, i've done alot of reading of it, but i just cannot get it to work >_<
This is the layout of the current Scene;
_____________________________/ -------Rollover#_MC
Scene 1 ----- Logo_MC ----- Text_MC
_____________________________ -------Play#_MC
Ok so thats the deal, now.
When i click on Rollover_MC, i want it to play - Play_MC.
I've been trying with hitTest, i cant get it to play when i click, the problem is, i can click anywhere and it will play. Instead of just on the Rollover_MC.
My current script is;
Code:
onClipEvent (mouseDown) {
if (this.hitTest(_root.CPL.TextLoop.Rolloverone._xmouse, _root.CPL.TextLoop.Rolloverone._ymouse,true)) {
_root.CPL.TextLoop.one.gotoAndPlay(2);
} else {
_root.CPL.TextLoop.gotoAndPlay(15);
}
}
I'm willing to use a onRollOver if i could get that to work. Any help would be appreciated. Its the only thing left to do!
Load A Movie To Another Level And The Buttons In Base Level Still Work..
Hello,
Ok Im loading movies into level 95. The problem is the movie at the base has buttons in it and they are still active through the movie that is loaded at lvl 95. So to fix this I made one large button and made the movie at lvl 95 dragable. The only issue with this method is now your cursor looks like it is always active. So has anyone figured out a way to block buttons that are at the base level if you load into a upper level?
Thanx
Robert
Why Are Buttons On A Lower Level Still Active In A Loaded Higher Level...?
hi, i'm very new to flash and am in the midst of trying to figure out the loadMovieNum feature. I have the one swf loading into a higher level (say 10) but the buttons on the level below it are still active (ie you get the little hand if you roll over them) even though they are no longer visible. I tried loading all levles into 0, but that means the page below goes away entirely and i like having the preloader of the next page pop up over the current page. I've tried just loadMovie into an empty MC but get the same result. Can anyone help?
thanks in advance!!
[F8] Quiz Template Not Computing Score When Loaded Into A Level Other Than Level 0...
I have created a 10 question multiple choice quiz from the quiz template, and it works perfectly as its own .swf. But when I use the moviecliploader object to load the quiz .swf into another .swf in level 5 (or any other layer other than 0) I am able to go through all of the questions and get the correct feedback, but when the results frame shows up, nothing gets computed. Does anyone know what I should do to allow this to work? Thanks.
Quiz Template Not Computing Score When Loaded Into A Level Other Than Level 0...
I have created a 10 question multiple choice quiz from the quiz template, and it works perfectly as its own .swf. But when I use the moviecliploader object to load the quiz .swf into another .swf in level 5 (or any other layer other than 0) I am able to go through all of the questions and get the correct feedback, but when the results frame shows up, nothing gets computed. Does anyone know what I should do to allow this to work? Thanks.
Loss Of Colour
When importing PSD files from Photoshop the colour output is different. What format can you use in Photoshop to ensure the same colour output in Flash? I am using Photoshop 6.
Possible Loss Of Quality
if i create a movie that is 100 pixels by 75 pixels, and i import a .jpg as a graphic... when i view this movie full screen, will the picture suffer from poor quality, or does the fact that flash uses vector graphics help maintain the picture quality?
PLEASE HELP.... PLEASE(Loss Of Ideas)
Hi guys..
I think i have tried everything here but this is not working.. I need help.. any help will be greatly appreciated..
I have 2 scenes in a movie a preloader and the main scene with 3 frame labels (1,2, and 3).. I also have a button called Navigate which when clicked opens a movie clip.. it shows a drop down Page 1, page 2 and page 3.. When one clicks on either of those 3 page numbers i want it to goto the appropriate frame label.. but it does not do so..
I am attaching the fla for your reference to see what is happening.
Thanks for your help
Uday
Jpg Quality Loss
I creating a simple photo site that dynamically loads jpg's through loadMovie and my problem is flash seems to be recompressing my jpgs and I'm getting some pretty unacceptable quality loss ( banding, artifacting).
I didn't notice this last night at home (using MX) but I noticed it today at work using MX 2004.
If I just load the jpg straight into the browser it is acceptable but if I load the same jpg with flash in a browser the quality degrades.
Is this normal? Can I make it so Flash doesn't recompress my files?
hers's he simple code I'm using:
Code:
this.createEmptyMovieClip("holder", 1);
holder.loadMovie("photos/"+(--num)+".jpg", 4);
Player quality settings are on high.
Site can be viewed here, the second bird shot or the plane shot are perfect examples
http://s89995399.onlinehome.us/
bird:
http://s89995399.onlinehome.us/photos/17.jpg
plane:
http://s89995399.onlinehome.us/photos/9.jpg
Var Loss In Scenes
Why is it whenever my flash movie enters a different scene all the variables from the other scene is erased? Is there any way to prevent this from happening?
Swf Byte Loss
i'm just wondering if anyone else has noticed problems when uncompressing swf files out of zip archives?
often i have swf files that are off by 2 - 6 bytes when they come out of the archives. we are currently using zip archives to transport media between servers. i'm wondering if it is a zip problem or if it is a compression problem. switching to a new archiving method (.tar) is possible, but a huge level of effort becuase a lot of the .zip's are created by applications so it will require code changes both in the applications that create them and the apps that read them. it would be much simpler to just add in a compression property to stop compressing the files.
has anyone else run into this problem before?
Loss Of Sound In MX
I am running a fairly large flash mx fruit machine simulation program as a windows application. Every spin of the reels I create a new Sound() object,
attach the spin sound and start it, then stop it when the reels stop.
There are also a feew other sounds for holds etc. which happen frequently.
I have tried for days to fix this problem, but after a number of spins the sound distorts and then disappears completely. Does anyone have any ideas how I can fix this. Your help would be most appreciated, thanks.
Sound Loss
For some reason when I embed a quicktime movie in a flash swf when I publish it I lose the audio track does anybody know why?
FLV TO 3 GP AUDIO LOSS
Please help me with this one:
Using RHEL4 running fms2. The .FLVs created by FMS play well (include audio as well as video), however, when they are converted to 3gp using ffmpeg, they retain the video but loose the audio.
Any one??? Please??
Loss Of Focus
Hi
Sorry to sound like a div head - but I have a .swf background and I use javascript to open a straight bowser window. This is fine, but when I click the mouse on the .swf (now the background) the browser window looses focus. Is there anyway of keeping the browser window in focus, while being able to interact with .swf file behind?
Here is the code I presently use
button_mc.onPress = function(){
getURL ("javascript:NewWindow=window.open('','newWin','wi dth=800,height=700,left=200,top=100,toolbar=Yes,lo cation=Yes,scrollbars=Yes,status=Yes,resizable=Yes ,fullscreen=No'); NewWindow.focus(); void(0);");
}
Thanks in advance
R
Totally At A Loss.
Been trying to figure out how I can make this little jetplane thingy I made not pass the sides of the screen...
This is my code on the jet.
Code:
onClipEvent(load){
speed = 20;
xb = 20;
yb = 20;
}
onClipEvent(enterFrame){
if(Key.isDown(Key.RIGHT)){
xb += speed;
}else if(Key.isDown(Key.LEFT)){
xb -= speed;
}
if(Key.isDown(Key.DOWN)){
yb += speed;
}else if(Key.isDown(Key.UP)){
yb -= speed;
}
this._x = _x + (xb - _x) / speed;
this._y = _y + (yb - _y) / speed;
}
Now I need to get my borders to stop the jet from moving. The borders are simple lines (line tool, 1px each) along the sides of the stage. Each are called (in instance name, they're each movieclips) bordertop_mc, borderbottom_mc, borderleft_mc, and borderright_mc.
Now, I cant figure out a way that will make the ship stop in its tracks without it going haywire... I understand how hittest works, but I just dont know how to try and make the jet_mc movieclip stop moving completely at collision with a border, and still be able to have it go back in another direction when I press the opposite (say its at borderleft_mc, hit the right key and it'll go right, without it staying stuck on the borderleft_mc)
byeah... I don't know.
Performance Loss
Hi,
I have a strange performance problem, the site I have done performs fast on my PC but when itīs uploaded it performs awfully (like a 60% performance loss). The site itīs uploaded on a free server of tripod.
If I have two browsers one with the local main page opened and one with the web main page opened at the same time, the local file performs great but the web donīt.
Could the banners that they add to the site and the code that they use to display the banners be the cause of that performance lost?
maybe this thread is not very related with AS but I didnīt know were to put it, and since my site uses AS to do almost anything I put it here.
the site url address is:
http://polacofede.tripod.com
thanks,
Polaco
HELP With LoadMovie: When I Load Level 1, Level 2 Disappears And Shouldn't
Hi I have a problem...
I have a movie on level 0 with menu buttons A, B and C. Every button loads a new movie (movie A, movie B and movie C) and they all load the movie in level 1. I have another movie containing the music (movie MUSIC).
When I load the site (level 0) I first load the music (movie MUSIC) in level 2 with a loadMovie(2) and later I let the user choose if he wants to see movie A, B or C by loading them with loadMovie(1). Unfortunately when the user clicks on a button to load any of the three movies A, B and C, the music MOVIE disappears and therefore the music stops. I need the movie MUSIC to be in the top-most level and to load before the other movies do, that's why I have it in level 2, so the controls (play, stop, volume) are always on top of all other movies loaded.
Can you please help me make the music play without the music MOVIE disappearing and stopping when a movie UNDER/BELOW is loaded in a level lower that the music movie's level?
Thanks a lot!
Return At Level 0 In A Specific MC Frame By Clicking In Other Level...
I have a movie that loads (by a button) others swf's in level 1, 2...
My problems are:
1 - These buttons functions, in level 0, being still working when I "loadMovieNum" and then I have another ones above in levels 1, 2...
How can I make the bellows buttons (level 0 - that are "invisible") to stop working?
2 - I used "tellTarget" function in level 0, inside a MC, that jumps to frame 100 to 150 and stop. And so it loads another swf's in levels 1, 2...Nice.
The code I used is:
on (release) {
tellTarget("/my_movie") {
gotoAndStop(150);
loadMovieNum("filetwo.swf",1);
loadMovieNum("filethree.swf",2);
}
}
Otherwise, when I "unloadMovieNum" 1, 2... and it returns at level 0, the playhead starts again in frame 1.
How can I return at frame 100 by the same click?
The code Iīve put in a button in filetwo.swf is:
on (release) {
unloadMovieNum(1);
unloadMovieNum(2);
loadMovieNum("fileone.swf",0);
_root.my_movie.gotoAndPlay(100);
}
What is wrong?
Whoa.. Sending A Variable From Level 1 To Level 0.. Hmmm...
I thought this would be easy but can't find the code anywhere.
I've loaded a .swf movie into level1 and want to click a button in that movie that changes a variable in the main timeline (level0).
Does anyone know the actionscript to do this?
Thanks dudes,
bossanova
Return At Level 0 In A Specific MC Frame By Clicking In Other Level...
I have a movie that loads (by a button) others swf's in level 1, 2...
My problems are:
1 - These buttons functions, in level 0, being still working when I "loadMovieNum" and then I have another ones above in levels 1, 2...
How can I make the bellows buttons (level 0 - "invisible") to stop working?
2 - I used "tellTarget" function in level 0, inside a MC, that jumps to frame 100 to 150 and stop. And so it loads another swf's in levels 1, 2...Nice.
Otherwise, when I "unloadMovieNum" 1, 2... and it returns at level 0, the playhead is on frame 150.
How can I return at frame 100 by the same click?
Loading Movie To Level 1, Cancelling Out Level 0 Buttons?
I have a movie (main.swf) and when you click one of the buttons, it loads section.swf on top of main.swf onto level 1
When section.swf appears on the screen, everything is fine BUT... the buttons on the main.swf work THROUGH the section.swf which is on level 1. Is there anyway to cancel out the buttons on level 0 when a movie is loaded ontop of it to level 1????
TIA
Return At Level 0 In A Specific MC Frame By Clicking In Other Level...
I have a movie that loads (by a button) others swf's in level 1, 2...
My problems are:
1 - These buttons functions, in level 0, being still working when I "loadMovieNum" and then I have another ones above in levels 1, 2...
How can I make the bellows buttons (level 0 - "invisible") to stop working?
2 - I used "tellTarget" function in level 0, inside a MC, that jumps to frame 100 to 150 and stop. And so it loads another swf's in levels 1, 2...Nice.
Otherwise, when I "unloadMovieNum" 1, 2... and it returns at level 0, the playhead is on frame 150.
How can I return at frame 100 by the same click?
Loss Of Fluidity On Release
I am trying to understand the scripting needed for movie commands. I have used buttons before (i.e. "on (release), "on (rollOver)") but what I want to do is know how it works with movie events. Here are my questions:
1) If on rollover I want the movie to play from frame 2 to frame 20 and stop what would I write for the scripting?
2) Same button, but what would I use for the rollout feature? (I have 21-40 as the same as 1-20 but reversed)
3) Also, how would you write out the scripting if I wanted the same animation as the rollout for the release of the button, without initiating the rollout animation again after I moved my mouse off of the movie?
Is it better to just use a button hit area for what I want? Or do the "onClipEvent" coding?
Thanks a lot
ZogDog
At A Loss, Could You Give Me An Idea?
thank you. i have a site that i am developing http://www.starband.com/sales, username moon, password landing. under the top tool bar, supporting documents, module 5...if you select any of the links to the right (using ie6) they replace my entire browser window with a blank page. i am using colin moocks getURL javascript pop up script. i have used it on other sites with perfect success. do any flash gurus or heavyweights have any idea why this is happening? i would really appreciate any insight.
Button Quality Loss
When I import a transparent image (both GIF and PNG) they look perfectly fine when I test them. However, when I make a button and place these together as a button (up, over down, hilt), the images suffer quality loss. I've explored all my options and I don't know how I can preserve the quality.
Loss Of Actionscript On Import
flash mx
I drag a movie clip from the library to the stage of a second fla, It does not bring any actions internal to the clip being imported , neither do the actions refer to levels in the second fla file to which its imported. Do I really have to recreate all the actions even stop(); or is there a neat way of preserving them?
any ideas out there?
thanks norciaman
Loss In Sound Quality
whenever i change the sound clips from event to stream, the quality just goes down the toilet.
is this normal? can anything be done about it?
Loss Of Layer Transparency
I am currently working on a Flash MX 2004 movie, which involves the staged assembly of a number of fireworks PNG images with transparent backgrounds. I have been able to place images on up to 10 layers at frame one of the timeline and these have successfully retained the transparency. However as soon as I add an image to the 11th layer the item in layer 1 becomes hidden. Adding subsequent layers appears to obscure layers 2, 3 and so on.
I have attempted to remove some of the layers from the main timeline and placed them in another graphic symbol thus only retaining a small number of layers within the main movie unfortunately I still end up losing graphics which should be visible.
Can anyone come up with a way of overcoming this problem?
Loss Of Layer Transparency
I am currently working on a Flash MX 2004 movie, which involves the staged assembly of a number of fireworks PNG images with transparent backgrounds. I have been able to place images on up to 10 layers at frame one of the timeline and these have successfully retained the transparency. However as soon as I add an image to the 11th layer the item in layer 1 becomes hidden. Adding subsequent layers appears to obscure layers 2, 3 and so on.
I have attempted to remove some of the layers from the main timeline and placed them in another graphic symbol thus only retaining a small number of layers within the main movie unfortunately I still end up losing graphics which should be visible.
Can anyone come up with a way of overcoming this problem?
|