Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Scrollpane Loading Movie Isnt Working



Hey, i'm loading an external .swf into a scrollpane. The scroll pane is called (photoscroll) and is inside a MC called photo. the code i'm using right now is

OnClipEvent(load){
loadMovie("test1.swf, _level0.photo.photoscroll)
}

It loads and displays fine, the problem is it loads "on top" of the scrollpane instead of inside it. So instead of being able to scroll this movie, it just shows up in the general area of the scroll pane and exceeds the perimiter of the scroll pane as well. I'm thinking it's something in my coding, I thought, maybe i should define the target before i give the load movie comand, but that didnt work either. Can someone help me? I'll upload my file if anyone needs me to.

Thanks!



FlashKit > Flash Help > Flash MX
Posted on: 03-16-2005, 12:33 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

[F8] Okay Loading Html Frames From Flash Isnt Working
on (release) {
getURL("contact.htm", "yes");
}


it works for a sec when i publish it in flash 6...
but thats only localy...what the hell is going on?

i tried changing the frame name and that doent work either

i know there are other threads on this but i have yet to find a solution....help me obe one kinobi ur my only hope lol

Why Isnt This Movie Working?
Hi can anyone tell me why the second movie wont appear in my flash file when I rollover the box ?
any help appreciated....

Loadmovie Isnt Loading Movie
ok i have a flash movie(gradientteal.swf) which is supposed to load another movie(movingbars.swf) into it but when the file is previewed in a browser, NOTHING happens. the initial movie is loaded but the second movie doesnt show up at all-
heres exactly what i did-
created both files in flash mx
exported them for flash 5
every code besides the actionscript is being done in cold fusion
ill be waiting for ur replys-

Loading Text Variable From Another Server Movie Isnt On.
im trying to load text into a target but the text file is on a different server that the movie. It is working when i run the SWF off of my hard drive for some reason, but online its not working and i need some help. heres my code that im using



Code:
loadVariables("http://spire.web1000.com/text.txt?r=", "/box/updates");

ScrollPane Component Not Working... But Does In New Movie
Hi all,

I'm a fairly experienced flash developer and have recently gotten back into it with MX 2004. I'm trying to use the ScrollPane component in an application I've been building, but when I set it up as per Macromedia's directions, the movie clip that should show up in the scroller does not, and there are no scrollbars, just an outline.

When I open a new document and create a graphic MC and put it into a ScrollPane component, it works exactly as expected. Does anyone know if there's something in my work-in-progress that could be causing the ScrollPane component to fail? This is my first time trying to implement a component.

Thanks for your help

Why Isnt This Working?
Ok i made a grapic inside photoshop i was going to use as a menu in my flash page. well when i imported the file into flash and converted it to a movie clip i proceeded to breaking it up and selecting just the parts i wanted as buttons.. well the buttons work fine but when i assigned scripts to them they wont work... just to see if they would work i wanted them to goto another frame in the same scene. i have 5 buttons inside a movie clip that i need to access other scenes and frames inside my page... is this possible i know its kind of confussing but any help would be appriciated.. thanks


jonathan

Why Isnt This Working?
Ok i made a grapic inside photoshop i was going to use as a menu in my flash page. well when i imported the file into flash and converted it to a movie clip i proceeded to breaking it up and selecting just the parts i wanted as buttons.. well the buttons work fine but when i assigned scripts to them they wont work... just to see if they would work i wanted them to goto another frame in the same scene. i have 5 buttons inside a movie clip that i need to access other scenes and frames inside my page... is this possible i know its kind of confussing but any help would be appriciated.. thanks


jonathan

Why Isnt This Working?
after much tinkering...

ok. i set up a movie clip called 'kik' with 4 layers, a transparent button, an 'on' state button image, an 'off state'button image and an action layer. the action layer has a small init bit where the on state is hidden. the on and off buttons are on top of each other. the button has this code (kikon and kikoff are the on and off button graphics)


on(release){
if ("kikoff1"._visible=true){
setProperty("kikon1", _visible, true);
setProperty("kikoff1", _visible, false);
}else{
setProperty("kikoff1", _visible, true);
setProperty("kikon1", _visible, false);
}
}

the button will change to the on state, but not back again. what have i done wrong?

Anyone Know Why This Isnt Working?
hi guys, right let me fill you in, the attached file contains a movie clip, contained in the movie clip are little images. these images are buttons. i have put code ont he first button only, what is supposed to hapen is , when someone clicks on it, a swf file is loaded to an emtpy movie clip, called holder.

the clip with all the buttons in has a mask, to give a scrolling effect, hence the bar. all files are in the same folder...but when the button is pressed....othing happes, anyone know why please, this is driving me insane!!!!!!

Why Isnt This Working
Shouldnt this work

on (release) {
gotoAndStop("scene1",2);

}

This Script is coming from MovieClip2 with a button inside it.

It should dam well go back to Scene1 and then play frame2. But no dice, it goes to frame1 every freaking time. Why?? I tried frame labels and qoutes and stuff but it will ether play the frame from MC2 or play frame1 of MC2. why cant i get it to go to frame2. I know this is stupid but please humor me.

PS: help with this Question 2 if you can?
Thx

Any 1 Know Y This Isnt Working?
Hi all, Im currently working on http://www.dewi.org.uk

Its a flash template that Im customising.

I re made the buttons (the original 1s were gash) and they're loading .swf's containing the text boxes (did that so the client can update without messin up the main site)

anyway...

The guestbook .swf works fine http://www.dewi.org.uk/guest.swf

but not when it loads from the main site, its not calling up the .txt file

any1 know y?

Not Sure Why This Isnt Working
hi

i have an email form within my flash movie. here the code on my send button:

on (release) {
if (name eq "" or email eq "" or message eq "") {
gotoAndPlay("error");

} else {
loadVariablesNum("form.php", "0", "POST");
gotoAndPlay("thanks");
}
}

and here is the code in the form.php page:

<?

$to = "jools105@hotmail.com";
$subject = "Website Enquiry";
$msg = "$name
";
$msg .= "$email
";
$msg .= "$message
";

mail($to, $subject, $msg, "From: $name
Reply-To: $email
");

?>

What is happening, is that if any of the fields is left blank flash will go to the error frame. If all the fields have been filled in flash will play the 'thanks' frame.

But when i check my inbox, i dont see the email.

Is there something i have missed out ?

any help very much appreciated

btw im using flash mx pro 2004 exporting with player 6 and actionscript 1.0

julian

Why Isnt This Working
After a big loss of out-pulled hair here is the code:

setInterval() calls getNewMess function but it happens nothing with onNewMess function.
Instead, if i click refresh-button, it gives me result correctly.











Attach Code

function getNewMess(evt:Object) {
var pc:PendingCall = evt.target._parent.service.GetNyaMedd();
pc.responder = new RelayResponder(evt.target._parent, "onNewMess", "onFault");
}


function onFault(f:FaultEvent) {
Alert.show(f.fault.faultstring,"Error",Alert.OK,this);
}

function onNewMess(r:ResultEvent) {
Alert.show(r.result,"Ehh",Alert.OK,this);
}

this.refresh_btn.addEventListener("click",getNewMess);
var intervalID:Number = setInterval(getNewMess, 3000);

This Isnt Working Right...
I found some code and altered it a little... But it never worked correctly in the first place.

I'm trying to convert seconds into minutes. I need to find a way to insert a zero when seconds are under 10?

But it still acts weird after ten seconds... LOL!


Code:
function getTime(seconds) {
part = String(seconds/60);
part2 = part.split(".");
time = part2[0]+":"+(part2[1]*6);
return time.substring(0, 4);
}

Why Isnt This Working?
ok so im stuck here with the magnet thing again if you read my last post, but i cant even get a block to move...can someone tell me what i am doing wrong? here is the AS

PHP Code:



onClipEvent (enterFrame) {    if (_root.car.x == 505) {        _root.car.x = 165    }}onClipEvent (enterFrame) {    _x += xspeed     _y += yspeed    }onClipEvent (enterFrame) {    xspeed += 4    yspeed += 0} 

Why Isnt This Working?
stop();
shipX = 20;
speed = 10;
function update() {
ship_mc._x = shipX;
}
function checkKeys() {
if (Key.isDown(Key.RIGHT)) {
shipX += speed;
ship_mc.gotoAndStop(1);
}
else if (Key.isDown(Key.LEFT)){
shipX -= speed;
ship_mc.gotoAndStop(2);
}
else if (Key.isDown(Key.SPACE));{
speed = 1
}
}
onEnterFrame = function () {
checkKeys();
update();
};

but speed is now always 1.
WHY?

Why Isnt This Working?
On the main timeline


//Creating Empty MovieClip
this.createEmptyMovieClip("holder_mc", this.getNextHighestDepth());
//Create Listener
var mclListener:Object = new Object();
//Create MovieClip Loader
var holder_mcl:MovieClipLoader = new MovieClipLoader();
//Add Listener
this.addListener(mclListener);

holder_mc._x = 0;
holder_mc._y = 0;

frame 68 of main timeline

this.holder_mcl.loadClip("step1.swf", holder_mc);

In the step1. swf I have two buttons here is the script

_parent.mcwireless.btnno.onRelease = function():Void {
_parent.addListener(mclListener);
_parent.holder_mcl.loadClip("step1-1.swf",holder_mc);


Step1.swf loads just fine on the main timeline. However I can not load 'step1-1.swf' (with a button) to save my life. I thought maybe the scope was wrong but it doesn't appear to be. Any suggestions?

Why Isnt This Working?
Hi i have a windows and i want it to close it with this script:on (release) {
_root.Clicked = false;
_parent.removeMovieClip();
}

Var Update - Why Isnt This Working?
Ok, this is getting very frustrating. I have a variable on frame one of my main timeline set as follows:

_global.score = 0;

I then have a dynamic textbox which loads in score. This works no problem. I have a clip w/instance name questions on the main timeline which has a button on it. The button has the following action

on (press) {
_global.score = 5;
}

When I press it, however, the textbox does not update. What is wrong?

P.S. I just put the 5 in for testing purposes. I really need _global.score to increment, but _global.score++ and the longhand version don't work either.

Help This Tutorial Isnt Working
http://www.flashkit.com/tutorials/Ga...-825/index.php

I'm having trouble using this tutorial, is it me? or is the tutorial wrong? can you please try it (it only takes a few seconds) because im trying to create a very similar game.

Thanks.

Preloader Isnt Working
Ok, the problem i'm having is that, I'm putting my preloader before a 1mb movie. I'm testing the movie out on my friends site...but when i open the link to view it, it doesnt show anything for a while...when it finally does, the preloader is already at 99%...what is going on??? The fla is attached. Thanks for any help at all!

Preloader Working, Now It Isnt.
hey,

could really do with someone who knows much more than me to check this code for me:


Code:
loader._visible = false;
function preLoader() {
_root.onEnterFrame = function() {
_root.loader._visible = true;
lBytes = link.getBytesLoaded();
tBytes = link.getBytesTotal();
percentLoaded = Math.floor((lBytes/tBytes)*100);
_root.loader._xscale = percentLoaded;
if (lBytes>=tBytes && tBytes>4) {
link._width = 800;
link._height = 600;
loader._visible = false;
}
};
}
_root.onEnterFrame = function() {
for (var v = 0; v<=i; ++v) {
var clip:MovieClip = _root["newleaf"+v];
if (fadingOut == true) {
clip._alpha -= 1;
} else {
clip._alpha += 1;
}
if (v == i && clip._alpha == 20) {
delete _root.onEnterFrame;
}
}
};
link.d = 1;
leaf2.onPress = function() {
link.d++;
var h = link.createEmptyMovieClip("holder"+d, d);
h.loadMovie("IMG01.jpg", "_root.holder");
preLoader();
};
leaf3.onPress = function() {
picLoad = loadMovie("IMG02.jpg", "_root.link");
fadingOut = true;
preLoader();
};
ive got 2 problems:

1) why does the preloader "loader" show and work on leaf3 button but not on leaf2 button???
2) fading scrpt doesnt work, needs to be called on button, works if i put this before the enterframe: var fadingOut:Boolean = true; otherwise nope.

ideas anybody?

cheers.

Why Isnt This Function Working?
Okay I got my enemy creator, and enemyAI function done, but when i test it out, it isnt working.. It will attach the enemies, but it wont assign them to their X and Y that i have assigned, and the enemy AI function wont work for them.. Can anyone help me? Here is my enemy AI function:

function enemyAI(enemy,num) {
for(b=0;b<num;++b) {
_root["enemyHealth"+b] = 100;
}
diff = Math.ceil(hero._x-enemy._x);
if (diff > -350 && diff < 370) {
if(!Stop) {
moving = true;
if (hero._x> enemy._x) {
enemy._xscale = -100;
enemy._x += enemySpeed;
enemy.gotoAndStop("enemyRun");
}
if (hero._x< enemy._x) {
enemy._xscale = 100;
enemy._x-= enemySpeed;
enemy.gotoAndStop("enemyRun");
}
}
}else {
enemy.gotoAndStop("enemyStand");
}
/////////////////////////////
if (enemy.hitTest(hero) && attacking == false) {
thisTime = getTimer()/1000;
if (thisTime>nextStab) {
Stop = true;
nextStab = thisTime+delay2
enemy.gotoAndStop("enemyStab");
hp -= 2;
}
}else {
Stop = false;
}
if(alive == true) {
if(enemy.hitTest(hero) && attacking == true) {
_root["enemyHealth"+b] -= str*level;
if(level <= 3) {
strExp++;
}else if(level >= 4 && level <= 7) {
strExp += 2;
}else if(level >= 9 && level <= 12) {
strExp += 4;
}
}
}
if(_root["enemyHealth"+b] <= 0) {
enemy._y = enemy._x = -100;
_root["enemyHealth"+b] = 0;
alive = false;
enemy._visible = false;
}
if(enemy.hitTest(hero._x,hero._y,true) && hero._x > enemy._x) {
hero._x += moveSpeed;
}else if(enemy.hitTest(hero._x,hero._y,true) && hero._x < enemy._x) {
_hero._x -= moveSpeed;
}

}

and here is my enemy creator function:

function createEnemies(guys, xArray, yArray){
for(a=1; a<=guys; ++a){
_root.attachMovie("enemy","enemy"+a,a+99)
_root["enemy"+a].x = xArray[a-1];
_root["enemy"+a].y = yArray[a-1];
_root["enemy"+a].onEnterFrame = function() {
enemyAi(_root["enemy"+a],guys);
trace(_root["enemy"+a]);
}
}
}

and here is how im trying to do it:

createEnemies(2,[100,300],[350,350]);

Why Isnt This Code Working?
Code:
onClipEvent(enterFrame) {
if (this.hitTest(_root.guy)) {
_root.gotoAndPlay("tutorial", 2);
}
}

At first My game just had a tutorial, but then I put in an intro and menu. So I put the "tutorial" in there so it would know which sence to go to. But now it doesn't do any thing when guy runs into it.

Song Isnt Working
i have this song in the .wav format. but when i try to put it into flash it says unexped file format

can n e one help me


thanks

Please Help Preloader 1-100 Isnt Working
I found this link and remember doing something similair two years ago but i did it on a mac and cant access file.

Anyways, i have maed 1-100 in keyframes and remember something about creating a scene called preloader but thats all i can remember!

can anyone help? its much appreciated. Our flash developer has left us so we're a bit stuck at the moment.

Thanks

Michael

Mico Design

Can Anyone Explain Why This Isnt Working?
http://uk.geocities.com/calvinharris.../play1edit.fla

Can anyone explain why this wont work, the first menu works fine, but gallery1, although sharing the same code as the main scene, wont work? I cant work out whats going wrong? But to carry on with the site im trying to make i need to know how to do this.

oh and this is the code I got back after the first time when it went wrong

Thanks people!

ps. gallery2 and contact are not done properly, i figure once gallery1 and main make sense, sorting as many scenes as i want should be easy, or at least thats the idea! cheers

For Loop. Why Isnt This Working
tried to be clever and set the alpha on a bunch of clips witha for loop instead of writting each one out individually.

didnt work


Code:
i=0
for (i; i<9; i++) {
clip_[i]._alpha = 10;
trace(clip_[i])
trace(i)
}


can anyone point out why?

Why Isnt This Code Working?
onClipEvent(enterFrame) {
for(var i=1; i <= 5 ;i++){
if (Key.isDown(49)) {
this.attachMovie("hurricane","hurricane"+i, i);
}
}
}

it is supposed to create another hurricane everytime i click "1" but instead it just creates 1 and doesnt make anymore.

Please Help. Im stumped.

Cannot Think Why This Code Isnt Working
Hi, im just loading a simple one line of xml into a dynamic textbox(nested in a movieclip).
but nothing appears there however:
1. if i put the textbox on the stage it works
2. i have adopted code from an already working dyunamic text box which is nested inside 2 movieclips.
3. i have applied a trace and that gives me the right result

so i am at a loss...

here is my code i am using:

PHP Code:



var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();

//askPage.nameA.condenseWhite = true;
btn1.addEventListener(MouseEvent.CLICK, beginXML);

function beginXML(event:MouseEvent):void {
xmlLoader.load(new URLRequest("askStudent.xml"));
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
}


function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);
ParseBooks(xmlData);
//mapContainer.insideMap.library.removeEventListener(MouseEvent.CLICK, test);
}

function ParseBooks(askStudent:XML):void {
var Student1:XMLList = askStudent.student.(@studentName == "Dave");  
trace(Student1.name)
askPage.nameA.htmlText = Student1.name;
}




thanks

My Code Isnt Working.
Im trying to make it so that if the main mc has a collision with the other mc(floor), and if the UP is pressed down then gotoAndPlay(2).

Here is the code that wont work.

if (this.hitTest(_root.door)==true) &&
if (Key.isDown(Key.UP)==true)
{gotoAndPlay(2);}

The output window says that there is an unexpected &&. What am I doing wrong?

My AI Isnt Working Properly...
Right,
So im making this platform game and everything is set up apary from enemys.

This is what im trying to do.
When enemy spawns, moves left or right.
Affected by gravity.
When it hits a wall it turns around.


This is what i have so far...
When it hits a wall it turns around.
Gravity works.
The floor hiTest sometimes works.

Here is my code (which is in the enemys frame).

ActionScript Code:
stop();
var health:Number = 25;
var give:Number = 5;
var speed:Number = 4;
var dir:String = "";
var l:Number = Math.ceil(Math.random() * 2)
var falling:Boolean = true;
var canmove = false;

onEnterFrame = function() {
    if(l == 1) {
        dir = "left";
    } else if(l == 2) {
        dir = "right";
    }
    if(dir == "left" && canmove == true) {
        this._x -= speed;
    } else if(dir == "right" && canmove == true) {
        this._x += speed;
    }
   
    if(falling) {
        this._y += speed;
        canmove = false;
    }
   
    for (_root.i = 0; _root.i < _root.maxbox; _root.i++) {
        if((hit.hitTest(_root["platform"+_root.i])) && (hit._y <= (_root["platform"+_root.i]._y)))
            falling = false;
            canmove = true;
        }
    }

    for (_root.i = 0; _root.i < _root.maxbox; _root.i++) {
        if (this.hitTest(_root["wall"+_root.i])) {
            if(l == 1) {
                l = 2;
            } else if(l == 2) {
                l = 1;
            }
        }
}

Thanks in advance.

Why Isnt My Code Working?
Code:
MovieClip.prototype.fadeIn = function() {
if (this._alpha != 100) {
this._alpha+10;

} else {
delete this.onEnterFrame;
}
};
It works when i do this._alpha++ but Its not adding 10?

Why Isnt This XML/Array Working?
The problem I'm having is that the loopthroughs keep overwriting themselves so they all end up containing the same data. I'm trying to use the nodeNames to create the arrays and then have them contain their own data. Obviously its a multi-d array. The xml is flowing flawlessly to the clientlist.text flawlessly but I cant figure out wtf I'm doing wrong in creating the arrays. Ideally the final array should look something like:

clientArray[0
[clientname]="Client1"
[acronym]="ABC"
[description]="lorem ipsum"
]


thx!

/////////////////////////////////
CODE BEGINS HERE
/////////////////////////////////
//init the arraYS
var clientArray:Array = new Array();
//init the xml
XML.prototype.ignoreWhite = true;
my_xml = new XML();
//loAD THE XML
my_xml.load("testxml.xml");
my_xml.onLoad = function(success) {
if (success) {
trace("Success!");
trace(this + "
" + my_xml.firstChild.childNodes.length);
//
for (var n = 0; n < my_xml.firstChild.childNodes.length; n++) {
trace(my_xml.firstChild.childNodes[n].nodeName);
for (m = 0; m < 3; m++) {
clientlist.text += "<b>" + my_xml.firstChild.childNodes[n].childNodes[m].nodeName + ":</b> " + my_xml.firstChild.childNodes[n].childNodes[m].firstChild.nodeValue + "
";
_root.clientArray[n[m]] = my_xml.firstChild.childNodes[n].childNodes[m].firstChild.nodeValue;
trace(" n=" + n + " m=" + m + " " +my_xml.firstChild.childNodes[n].childNodes[m].firstChild.nodeValue+ "^&%");
}
clientlist.text += "----------------------------------
";
//trace("
!!" + clientArray[n[0]] + "!!" + "
%%" + clientArray[n[1]] + "%%" + "
**" + clientArray[n[2]] + "**");
}
} else {
trace("error alert!");
}
trace(clientArray[1[0]]+ "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
};

Preloader Isnt Working Until It Gets To 80%
Hiya, I have created a rather complex flash website. Therefore it is a rather large file size
I decided to implement a preloader into the site. This is located in a scene prior to my main site.
However, it seems that most of the site content is still trying to load upon the first frame, despite the fact that none of it appears until the following scene. Therefore nothing shows upon my site until about 80% has loaded - then the preloader is displayed working fine whilst the rest of the site loads.

The coding on my preloader timeline is:

FRAME1:

bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*300;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
gotoAndPlay("Website", 1);
}


FRAME 2:

this.gotoAndPlay("lbl_loadbar");



Is anyone able to tell me why this is happening, and how I can make it so that things load in the 2nd scene rather than the first?

Thanks for your help!

My First Class And It Isnt Working
i have a main document with two movie clips in and some code (see below)

and also a class file with some more code in, please suggest any fixes, when i test the movie it tells me that:

1180: Call to a possibly undefined method getDist.

please help, this is my first proper class and it wont work! thanks in advance for your help







Attach Code

//my timeline code
import com.benjamintattersley.utils.*;

var numby:Number = getDist(movie1, movie2);

trace(numby);

//my class code
package com.benjamintattersley.utils
{
import flash.display.*;

public class distance_between_points extends MovieClip
{

public function getDist(object1:MovieClip, object2:MovieClip):Number
{
private var x1:Number = object1.x;
private var y1:Number =object1.y;
private var x2:Number = object2.x;
private var y2:Number = object2.y;
private var prox:Number = Math.sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2));
return (prox);
}
}
}

Someone Please Check Why This Isnt Working
hello again guys n gals well i made a preloader that doesnt preload, ok this is what im experiencing, in the first frame of this fla theres a simple animated movie clip wich should play till all of the frames are loaded but the funny thing is it wont play at all and it wont even preload if you copy the movie clip from the first frame and paste it to a new document its less than 2 kbs now when i use it in cojunction with the movie the first frame is 16 kbs why is this??? this is very strange i cal out to all who can help me get through this because im goin nuts with it

Thanks guys
get the fla here www.bmv-interactive.com/about_us_final.fla

Grim

Why Isnt My Bubble Working?
Check out frame 3 of this .FLA it was working perfectly fine until I moved the bubble actions from frame 1 to frame 3

Here is the .FLA:

http://www.rigneygraphics.com/jesse/main04_help.zip

Code Isnt Working(f8)
renji.onEnterFrame = function() {
var moveSpeed = 5;
if(Key.isDown(Key.RIGHT)) {
this._x += moveSpeed;
dir = "right"
this.gotoAndStop(2);
this._xscale = 100;
}
else if(Key.isDown(Key.LEFT)) {
this._x -= moveSpeed;
dir = "left"
this.gotoAndStop(2);
this._xscale = -100;
}
else if((dir == "right") && Key.isDown(Key.CONTROL)) {
this.gotoAndStop(3);
this._xscale = 100;
}
else if((dir == "left") && Key.isDown(Key.CONTROL)) {
this.gotoAndStop(3);
this._xscale = -100;
}
while(_root.barrierdown1.hitTest(this)) {
this._y --;
}
}
naruto.onEnterFrame = function() {
var moveSpeed = 5;
if(Key.isDown(68)) {
this._x += moveSpeed;
dir = "right"
this.gotoAndStop(2);
this._xscale = 100;
}
else if(Key.isDown(65)) {
this._x -= moveSpeed;
dir = "left"
this.gotoAndStop(2);
this._xscale = -100;
}
else if((dir == "right") && Key.isDown(70)) {
this.gotoAndStop(3);
this._xscale = 100;
}
else if((dir == "left") && Key.isDown(70)) {
this.gotoAndStop(3);
this._xscale = -100;
}
else if(Key.isDown(83)) {
this.gotoAndStop(4);
}
}


var keyDet = new KeyDetection();
keyDet.addCombination("ctrl-dwn", Key.CONTROL, DOWN);
myObj = new Object();
myObj.onKeyCombination = function(name:String) {

switch (name) {

case "ctrl-dwn" :
_root.renji.gotoAndPlay(4)
break;

}

};
keyDet.addListener(myObj);


can any1 tell me what is wrong with that conde? it isnt doing the affect when i try to hold down control and down.it just does nothing.

Why Isnt My .onRollOver Working ?
Hello,

Another question for you gurus in Kirupa:

I wan to create a photoalbum using "attachmovie", "for loop" and "loadMovie", and with the help of fellow kirupa gurus, the result of my script is below:

////////////////////////////////////////////////////

var previewWidth:Number = 60;
var previewHeight:Number = 70;
var space:Number = 10;
var columns:Number = 5;
for (var i=0; i<25; i++) {
var x:Number = (i%columns)*(previewWidth+space);
var y:Number = Math.floor(i/columns)*(previewHeight+space)
this.attachMovie("thumb","thumb"+i,i,{_x, _y:y});
//////////// loading pictures into the attachmovie ///////////////////
this["thumb"+i].loadMovie("00"+i + ".jpg");
this["thumb"+i]._xscale = 10;
this["thumb"+i]._yscale =10;

this["thumb"+i].onRollOver = function(){
trace('its working!');
};

}
function traceName():Void {
trace(this._name);
}

/////////////////////////////////////////////////////

The above script is able to show all the thumbnails of my photos. However, the:

this["thumb"+i].onRollOver = function(){
trace('its working!');
};

is not working ... tried n tried, no avail.

Please Help!!!

Thanx !!!


- Joehann

Why Isnt My Bubble Working?
Check out frame 3 of this .FLA it was working perfectly fine until I moved the bubble actions from frame 1 to frame 3

Here is the .FLA:

http://www.rigneygraphics.com/jesse/main04_help.zip

Why Isnt This Code Working?
Im trying to load an external .swf into my base movie.
The .swf is named Menu.swf, and i have this code in the keyframe where
i want it to load:


//load Movie Behavior
if(level5000 == Number(level5000)){
loadMovieNum("Menu.swf",level5000);
} else {
level5000.loadMovie("Menu.swf");
}
//End Behavior

I Want it to be on a very high level, since i need the menu to be ontop of everything else.

What am i doing wrong?

Stupid Xml Isnt Working
Code:

var portXML:XML = new XML();
portXML.ignoreWhite = true;
portXML.onLoad = function(success:Boolean):Void {
   if(success){
      //processing Xml
      trace("XML: "+success);
      proAmmount = portXML.firstChild.childNodes.length
      //trace(proAmmount);
      
      //define project attributes and make array
      
      proName = [];
      proDescription = [];
      proCategory = [];
      proDate = [];
      proFeatured = [];
      proImage1 = [];
      proImage2 = [];
      proImage3 = [];
      proImage4 = [];
      proImage5 = [];
      proThumb = [];
      proUrl = [];
      
      var startX:Number = 40;
      var gridX:Number = 18;
      var category:String
       
      for(var i=0; i<proAmmount; i++) {
            var t = proBtn.duplicateMovieClip("proBtn"+i,i);
            t._y = gridX * i;
            t._y = startX +(gridX * i);
         
      
      _root["proBtn"+i].proName.text = portXML.firstChild.childNodes[i].attributes.proName;
      _root.proCategory[i] = portXML.firstChild.childNodes[i].attributes.category;
      _root.proDate[i] = portXML.firstChild.childNodes[i].attributes.date;
      _root.proFeatured[i] = portXML.firstChild.childNodes[i].attributes.featured;
            
      t.onPress = DisplayInfo(i);
   
      }
      proBtn._visible=0;
      
   }

}

ok got this and when i call inside the loop t.onPress = DisplayInfo(i); it dosent load on PRESS it loads it automaticaly and when i click on the different items it dosent change.. hmm... the displayinfo function all it does is
Code:

function DisplayInfo(i){
   _root.maintext.text  = _root.proDate[i];
}

Movieclip.gotoAndPlay(isnt Working)
I made a 2 simple menus for a website in flash. one is called 'menu'. on the other menu (called mainmenu on rollover it is supposed to have the menu called 'menu' gotoAndPlay another frame. But when i put my mouse over the button on the 'mainmenu' nothing happens to the menu called 'menu'. however when i put the code in the first frame of the whole movie it works and the menu called 'menu' will goto the frame that i specify. both menus are separate movie clips. so how come the menu called 'menu' wont goto the frame i want it to goto when i have another movie clip tell it too?

My Telltarget Gotoandplay Isnt Working
i have a mc, and i want a button on the main timeline to tell the timeline inside this mc to gotoandplay frame 30

it seems the code would just be

on (release) {
tellTarget (content) {
gotoAndPlay(2);
}
}

but that isnt working... anyone help?

Scroll Script Isnt Working
Hi, here is a .fla with 2 scrollbuttons. The scrollbutton's action:


Code:
on (rollOver) {
this.onEnterFrame = function() {
speed = 10;
_root.TextHome._y += speed;
if (_root.TextHome._y<=62) {
speed = 0;
}
};
}
on (rollOut) {
delete this.onEnterFrame;
}


The condition isnt doing his work

Does somebody know the right script?

Greetz
Bouga

I Have No Idea Why This Script Isnt Working...
code:
function makeGrid(d, s){
function box(x, y, s){
function draw(w, s, c){
with(w){
clear()
lineStyle(1, 0x000000, 100); beginFill(c, 100); moveTo(0, 0);
lineTo(s, 0); lineTo(s, s); lineTo(0, s); lineTo(0, 0); endFill() }}
function refresh(c, v, s){
_global.grid[c.ly][c.lx]=v
hex=(v) ? '0x000000' : '0xffffff'
draw(c, s, hex)
}
c=createEmptyMovieClip(x+'b'+y, k)
with(c){ _x=x*s; _y=y*s; lx=x; ly=y }
refresh(c, 0, s)
c.onRelease=function(){
if(_global.grid[this.ly][this.lx]==0){
refresh(this, 0, s)
}
else{ refresh(this, 1, s) }
}
k++
}
_global.grid=new Array()
for(y=0; y<d; y++){ _global.grid[y]=new Array(); for(x=0; x<d; x++){ box(x, y, s) }}
}
makeGrid(9, 9)


this script creates a 2d array and a corresponding grid. the array originally contains all 0's. when a box in the grid is pressed, its corresponding index in the array becomes one. when its pressed again, it becomes 0. to visualize these changes, when it is 1 its black, and white when it is 0. the problem is, when i press it for the second time t become white again, it does n ot. it stays black. can some one please tell me what swrong with the script

Flash Pluggin Isnt Working...
In internet explorer, all flash files are displayed as loading images.. not broken images, but the image frame and the little picture icon. I went to install flash, but it just sits there as well with the loading picture frame. How can I fix this??

myke

I Have No Idea Why This Isnt Working. Any Ideas?
ive had simmilar problems like this happen before, and its really starting to bug me. basically, a movie clip is supposed to play when a button is rolled over, but when i publish it, the button disappears when its rolled over. included is a fla file with the three items in the library i used to make a button that does this. any ideas or suggestions?

[im using a bought copy of flash mx educational version]

Copyright © 2005-08 www.BigResource.com, All rights reserved