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








GET/SET Headache


Hi.
Here's the code and a question after it... I'm just lost and can not figure why does this happens =(

Code:
class Foo {
private var f:String = "";
function Foo(){
f = "old value";
}
public function set _f(s:String):Void {
trace("Was it really changed?");
//No, this trace will never get to the output... wonder why :confused:
f = s;
}
public function get _f():String {
return f;
}
}

Code:
var __foo:Foo = new Foo();
function __func(v){
trace("trying to change value");
trace(_arr[0].a);
trace(v);
_arr[0].a = v;
}
var _arr:Array = [{a:__foo._f, b:__func, c:__foo}];
_arr[0].b.apply(_arr[0].c, ["value changed"]);
So, here's an explanation:
I need to define some of the properties of my class in this way. I.e. to store the linkage to the properties, and than to call upon the function to redefine those properties. But, in fact, it doesn't do it, even though where's nothing to prevent it from doing it... just
Any suggestion welcomed




ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 07-18-2007, 04:33 PM


View Complete Forum Thread with Replies

Sponsored Links:

A Recursion Headache Is Worse Than An Ice Cream Headache Because There's No Ice Cream
Can you spot how to prevent a self hitTest? I'm trying to check if there is room to extend the width of a rectangular block. My recursive function 'roomToRight" returns true if there is empty space to the right. If there is another block in the way, it calls itself to see if there is empty space to ITS right. If there is, it moves that block right, creating space for the previous block, and returning true.

It creates a temporary test area on the right to see if there's empty space. One problem is that I can't think how to prevent it from a hitTest on itself which of course returns true. Think I have to create a variable & add subtract somewhere but not bright enough to figure out where... Please also let me know if you see any redundant checking - this is just an isolated instance of a check that'd run multiple times for multiple blocks in 4 directions, so efficiency will become important. For now I just want to figure out this smaller problem:

code: numBlocks = 2; //only blocks "b0" & "b1" for now
GROWSIZE = 20;
XBOUNDS = 550;//right wall position
function roomToRight(blockName) {
for (i=0;i<numBlocks;i++){//BROKEN HERE MAYBE-> should this not be set to zero?
if (blockName.hitTest((XBOUNDS-GROWSIZE), blockName._y+1, false)){ //block would hit wall, so false;
return(false);
}else{
var answer = true;//will be true if nothinig is hit
blockName.attachMovie("testArea", "testArea1", this.getNextHighestDepth(),{_x:blockName._width, _width:GROWSIZE, _height:blockName._height});
for (j=0;j<numBlocks;j++){
if ((i!=j)&&(blockName.testArea1.hitTest(this["b"+j]))){ //HERE it shouldn't check against itself
if (roomToRight(this["b"+j])){//if THIS one has room to the right
["b"+j]_x +=GROWSIZE; //move it right
}else{
answer = false;//if no space, return false
}
}
}
blockName.testArea1.removeMovieClip();
return(answer);
}
}
}
if(roomToRight(b0)){//room to grow so grow
b0._width+=GROWSIZE;
};


Thanks!

View Replies !    View Related
.JPG HEADACHE...
Hi all

I desperatly need some help with dynamically loading .jpg files into my .swf, it works fine on my local system but not from my server, here is the code i have used...


//frame 1//


_root.createEmptyMovieClip("holder", 1000);
setProperty("holder",_x,405);
setProperty("holder",_y,220);

//button on frame 6//

on (press) {
holder.loadMovie("1a.jpg");}

the html.swf & mypic.jpg files are all located in the same file on my server at docspriory...

Why is this not loading in my .jpg file any help would be thankfully recieved!

View Replies !    View Related
XML Headache #2
Okay, so now I need to take specific XML nodes & turn them into an array, & after 4 hours of trying, I'm totally clueless.

here's the Idea:

index
node name="red"/
node name="blue"/
node name="green"/
/index

So how do I take red, blue, & green and place them into an array?, I want the final product comes out like this:

obj1 = red
obj2 = blue
obj3 = green

My problem is that I don't know how to iterate through "node name" & have my code apply a number to each "name" attribute.
Help.

View Replies !    View Related
XML Headache #3
Ho-kay,
So now, let's say I've got an XML set up like this:

index

images id="1"
pic src ="img1.jpg
pic src ="img2.jpg
/images

images id="2"
pic src ="img1.jpg
pic src ="img2.jpg
/images

/index

I'm having trouble trying to create a main array that cycles first through the "images" tags & then every time it hits one, it starts a sub-loop that pulls out the "pic" tags that it contains and stores them in a personal mini-array, so that when an item from the main array gets called, it will automatically call up only the "pic" names contained within it's mini-array.

I know how to do the first part, but I've only been able to set up an array that calls ALL the "pic" tags & stores them in one long single array.

I'm dyin' heah.

Can anyone help?

View Replies !    View Related
Headache
ok,i created a flash movie consisting of 5 seperate .swf files linked together through buttons (semi-interactive). everything works fine through the flash player. the problem is getting it to work on the web (using dreamweaver). i inserted the .swf file and the first movie plays fine, but when the button is clicked to go to the next movie, nothing happens. (using flash 5) pwease help

View Replies !    View Related
Headache
I have a question from all of you.....I am sure i will get some good responses from this site.


Can we grab dynamic data from other websites....
For Example
http://bluepages.com.sa/DirectoryEn....toryEn&DirID=2
search for A and Search in Comapny Name

This webpage is showing company records and when we click on company name ..... the next page is showing details of that company in a pop up window .....

So, can we grab data dynamically from popup windows without clicking or opening them ..... and save it in a database .... I mean to say any software or script through which we can grab data automatically....

waiting for some good solutions.......

thanx

View Replies !    View Related
[F8] Headache With AS... Pls Help.
Yeap...
After 15 aspirines, i still have a headache cause of this stupid code.
I am trying to send values between swf.
But something weird is happening... in one of the swf, the code seem to not work, but looks ok...
The idea is that after clicking on the red square, it will send a new value to the OTHER flash movie that is inside of a html.
I will upload both of them so u guys can give me a hand, pls...
Just change the actuall addresses of the files...
Thanks.
Leo.

View Replies !    View Related
Xml Headache
hi,
im new to xml. i am using a template and wondering how i put a text link to another website to show up in flash. below is the code. id like the link to show up in the caption tag

<pic>
<image>images/1.jpg</image>
<caption>August 2008. designed a website</caption>
</pic>

View Replies !    View Related
XML Headache
Hi All

I am trying to store values in an Array called titles. While inside the onLoad function I can store attributes from the XML tree to the Array 'titles'. My problem is, when I access the titles Array from outside the onLoad function the array is empty. The ActionScript and and the stripped down XML is below, if anybody could please help!

regards

John
www.javono.com

// ACTIONSCRIPT
var jbx:XML = new XML();
jbx.ignoreWhite = true;
jbx.load("../XML/glossary.xml");

var termArray:Array = new Array();
var titles:Array = new Array();
var p:Number = new Number();
var names:Array = new Array();

// Listener that retrieves data from XML file
jbx.onLoad = function(success)
{
if (success)
{
termArray = jbx.firstChild.childNodes;
for (p=0;p<termArray.length;p++)
{
titles.push(termArray[p].attributes.name);
}
}
else
{
title_txt.text = "OOP's not working! Try again later.";
}
}

// XML
<?xml version="1.0" encoding="ISO-8859-1"?>
<glossary>
<term name="amplitude" ref="" content="The amplitude is the magnitude of sound pressure change within a waveform(volume), or basically, the maximum amount of pressure at any point in a sound wave. Amplitude is often referred to as sound pressure level and measured in decibels."/>
<term name="automation" ref="" content="Automation is when the methods of editing are pre-programmed by a user. An example would be changing the volume or pan settings or certain devices are activated according to when a user wishes to deploy them."/>
<term name="attack" ref="" content="Attack is the moment the sample starts, changing the attack settings will determine where in the sample a device will start to play the sample."/>
</glossary>

View Replies !    View Related
Xml Headache..
Please let there be someone out there that can help me .. I'm trying to set up a html formatted xml document that is called into flash. I'll give you my code so you can see what I have done. Each slide represents a different content page - each will be called from a corresponding swf movie.

<?xml version="1.0" encoding="UTF-8"?>
<slides>
<slide>
<title>Introduction </title>
<content>
<![CDATA[<b>BOLD</b>]]>content page 1
</content>
</slide>

<slide>
<title>Introduction 2</title>
<content>content page 2
</content>
</slide>
</slides>

Here's whats on the first frame of the flash movie (content page 1)

function loadXML(loaded) {
if (loaded) {
_root.title = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.content = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
title_txt.text = _root.title;
content_txt.text = _root.content;
} else {
trace("file not loaded!");
}
}
var xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = parseIt;
xmlData.onLoad = loadXML;
xmlData.load("module1.xml");
xmlDoc.onLoad = function(success){
if(success) parseIt(this);
else trace("****XML Document failed to load properly****");
};
parseIt = functions(doc);{
_root.content_txt.html = true;
_root.content_txt.htmlText = xmlData;
//here's where you parse out your XML document.
};

The content is loading into the flash movie, but I can't figure out how to get words bold .. I tried some CDATA as you can see but all that displays in the flash movie is <b>BOLD</b> and the rest of the content after it is just gone ...I need to be able to place the html text straight into the xml file and have it display the formatted text in the flash movie .. no clue how to achieve this .. I'm using Flash MX

Please help me and thanks!

View Replies !    View Related
Xml Headache..
Please let there be someone out there that can help me .. I'm trying to set up a html formatted xml document that is called into flash. I'll give you my code so you can see what I have done. Each slide represents a different content page - each will be called from a corresponding swf movie.

<?xml version="1.0" encoding="UTF-8"?>
<slides>
<slide>
<title>Introduction </title>
<content>
<![CDATA[<b>BOLD</b>]]>content page 1
</content>
</slide>

<slide>
<title>Introduction 2</title>
<content>content page 2
</content>
</slide>
</slides>

Here's whats on the first frame of the flash movie (content page 1)

function loadXML(loaded) {
if (loaded) {
_root.title = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.content = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
title_txt.text = _root.title;
content_txt.text = _root.content;
} else {
trace("file not loaded!");
}
}
var xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = parseIt;
xmlData.onLoad = loadXML;
xmlData.load("module1.xml");
xmlDoc.onLoad = function(success){
if(success) parseIt(this);
else trace("****XML Document failed to load properly****");
};
parseIt = functions(doc);{
_root.content_txt.html = true;
_root.content_txt.htmlText = xmlData;
//here's where you parse out your XML document.
};

The content is loading into the flash movie, but I can't figure out how to get words bold .. I tried some CDATA as you can see but all that displays in the flash movie is <b>BOLD</b> and the rest of the content after it is just gone ...I need to be able to place the html text straight into the xml file and have it display the formatted text in the flash movie .. no clue how to achieve this .. I'm using Flash MX

Please help me and thanks!

View Replies !    View Related
New Window Headache
Hi there and help,

I am have a new window that opens from the index page. The window opens perfectly when pressing the "enter" button. However once the window opens the flash movie does not play. It works when I try to open the from off of the desktop, it works when I open the window by itself from IE. It just doesn't work when I upload it onto the domain. The window displays white space where the movie is supposed to be, it even says the movie title across the banner. What am I not doing?(It also works when I link to the swf. version of the flash file but not the html version)

all assistance is welcome...

View Replies !    View Related
Variables Headache
I put this script onto a button to set a variable. ( I want the button to allow the user to modify a movie clip as part of a game).

on (release) {
cursor = "brush";
}
on (rollOver) {
tellTarget ("brushbtn") {
gotoAndPlay (2);
}
}

and this script goes onto another button controlling the movie clip which the user must click on to play the game:

on (press) {
if (cursor="brush") {
tellTarget ("earthbottom") {
nextFrame ();
}
}
}

I've never tried using variables in flash before, and I'm making a basic error in here somewhere, if anyone could shed any light on why this isn't working It'd be well appreciated.

Thanks

View Replies !    View Related
Refresh Headache
Dear all,

I have created a button with the script:

on (press){
loadVariablesNum ( "machine.asp", 0, "GET");
_root.msgbox = _root.temp;
}

_root.msgbox is the name of a dynamic text box while temp is a variable outputted from the ASP page. The ASP page contains code to generate a random number which would place it in the temp variable. It will then Response.write the temp variable.

Thus what i am trying to do is, evrytime i press the button, the textbox would be updated with the temp variable. (each press will change the value in the textbox)

However, i face a refresh problem. I need to press at least twice before a new number would appear, or else it would always return me the previous values.

Any help is appreciated. Thankz

View Replies !    View Related
LoadVariablesNum, What A Headache
Hi!

I'm having a problem with my guestbook. this is the code I'm using:

on (release) {
if (Comment eq "" or Comment eq "Please Input Data") {
Comment = "Please Input Data";
} else {
loadVariablesNum ("http://www.response-o-matic.com/cgi-bin/rom.pl", 0, "POST");
s = "Message Has Been Sent";
}
}

It works in HTML with <FORM action="http://www.response-o-matic.com/cgi-bin/rom.pl" method="POST">.

is there a way to get it to work in action script? I've looked around a bit and can't seem to find anything on it. Maybe it's just me. I would really appreciate some help.

thanks a lot,

View Replies !    View Related
Alpha Headache
So basically, I've got what I thought was a simple idea, I want to make a series of MCs whose ._alpha levels increase incrementally over a few seconds, but it doesn't work.
Instead, I have a series of clips whose ._alpha is static.

Help? anyone?
Thanks.

clips = ["clip0","clip1","clip3"];
alphaText(clips);
function alphaText(mc) {
alphClip =mc
a =-1;
incr = 2;
while(a++ < indNum.length) {
trace(alphClip[a])
if(_root[alphClip[a]]._alpha < 99) {
_root[alphClip[a]]._alpha += incr
}
}
}

View Replies !    View Related
Menu Headache
I am trying to create an online gallery/portfolio for a friend and have run into a real snag with the menu.

The menu is as such:

when you mouse over the buttons, a new window appears with an image that pops up. When the mouse is off the button it disappears. I need it to stay and to have a close function because, here is the next issue, I want to be able to flip images (eg. click an arrow on the picture and have the next image slide in). I have no clue how to do this. The URL is below. Any help would be greatly appreciated.

http://www.flawlessdesign.com/michellenew1.html

This file is modified from a Flashkit opensource file, as I am just getting into design and learning with these files.

Thank you,

Andrew

View Replies !    View Related
Levels - What A Headache
Movie_1 plays on the main timeline with a load movie action on the last key frame loading in the interface level_20. I presume the main movie is automatically loaded into level 0. On the interface there are 5 options with all buttons loading in their relevant swf's into level 10. The problem is with the home.swf. It is identical to the original movie_1 but loads into level_10. What happens is that prior to the home.swf loading, movie_1 becomes visible. This does not happen with any of the other swf's. What is going on.

View Replies !    View Related
JavaScript Headache Boo
High,

So I have this problem. Generally, I am able to work these things out given a few days - but it's been a week now, and I submit my problem to the fine Flash community.

So, I have this Flash site. And within Flash, I use javascript to open a window with a certain size and certain dimensions. This, I can do flawlessly...

However, here's the twist: From my site's registrar I am using "stealth forwarding" to redirect the URL to my Flash site. Now the way this stealth forwarding works is it puts my site in to a FRAME that IT creates so that it is able to retain the original URL in the address box, while still sending me to another site. (For instance: www.mysite.com is actually www.isp.com/~username however www.mysite.com remains in the address bar :: since the entire site is pretty much just a Flash file, this is a perfect solution) Now, I did a little FAQ reading and I think that the frame refers to my site as "MYTOPFRAME". However, this thing is not picking up the javascript by the traditional: getURL(javascript:window.open()); jazz... It's simply give me a "This Page Cannot Be Displayed" webpage.

I have messed around with the JavaScript within Flash, and I have messed around with creating Javascript functions within the HTML, but this Frame seems to be throwing it off to the point that it's not even recognizing that it's suppose to be executing a script. I considered that there might be a javascript that can make it target the correct frame, or even the "relative" frame, but I suppose I dun know enought about it and cannot find the resources to check. Heck, I dunno - I have been at this for a while. I almost considered using a different design for the site and just work around it - but it's not for a paying customer or anything, and I can't let the Flash demons beat me!

Anyway, thanks a lot in advance for any tips/solutions. If you can figure this one out, you are certainly a better man/woman than, me....

Keep it real, amigos and happy Flashin'...
-r

View Replies !    View Related
Preloader Headache
this should be simple! but it's driving me crazy. when launching my main flash swf movie from my server, the preloader isn't appearing as the main content loads! it's flashes breifly prior to the main movie appearing. It is the only thing in frame 1 w/the stop action. and the only other things loading are a couple substantial images and an audio file. It just seems like it's loading all the other stuff first, then starting the preloader MC.
any ideas?

View Replies !    View Related
Please Help Newbie With A Headache
Hi everyone!

I'm attaching a file which has caused me a lot of grief.
I'd like this to first have an ordinary preloader bar, then have a second preloader bar to show the progress made on some variables I want to load into my movie. The second one is the problem, because I keep getting an "error opening URL file vars.asp", when I test it in flash and even when I test it on IIS!

I think the first bar works fine though, although it's tricky to test.

PLEEEAASE help me!

View Replies !    View Related
Masking Headache
Can anyone help, i have been working on the following http://orangeocean.net/tat/
all has been going well but when i checked it on the web, in the bottom right hand corner you can faintly see the animation even though it is masked, any solutions to this problem would be greatly appreiciated.

View Replies !    View Related
Actionscripting Headache
Counter V. Volume Slider

I was wondering if someone could help me out with a small problem. I think this is my final hurdle as I can get both commands to work individually but just not at the same time. More or less my volume control won't work when I enter my code for my song track counter and vise versa.I think the problem is my onEnterFrame command possibly bumping heads with an onLoad command. If you look at the .fla and click on the teleconference link you will see 2 interfaces to play the audio. As it is now I have my counter working and not my volume drag control (If I remove my counter text the slider works).I am stuck and have to get this out the door so any help would be greatly appreciated. Audio is tough.

Thanks for your time.
You can click here to download the .fla http://www.pointnorthds.com/audioproblem.zip

View Replies !    View Related
I've Got A Throbbing Headache
I need help with the embedding of my flash into and html file and the sizing of the wondow to fit the flash movie perfectly. and turning off all the resizing things. spent the entire day trying things and I just can't figure it out. PLEASE HELP SOMEONE

I am still trying and I am getting frustrated. this is the coding I am trying but for some reason I keep getting an error.

I am begging any one to help I am going crazy


this site is based at home for now so I am just tryingto get the links to work, I've looked at all the anwsers to the other ones like this but it doesn't seem to be helping.

heres the code

on release{get url("javascript:window.open(C:WINDOWSDesktopWeb Site Stuffmoviesaxe murdering.html','_top','height=400,width=450,toolb ar=0,menubar=0,location=0,scrollbars=0,resizable=0 ');void(0)");}

View Replies !    View Related
Headache Time....help
Hi,


I have a main movie that calls several clips. All of these clips contain embedded video. My main movie is an exe and everything works great. I now have a problem, the guy Im doing the presentation for is saying that if his clients dont have flash installed (mmmm) the swf clips with the embedded video will not be viewed.

If I made the clips exe files so they could be viewed regardless, is there any way i can access them in the same way i would just calling extermal swf's into a movie clip?

I guess not but fingers crossed........

View Replies !    View Related
Navigation Headache
Hello all,

Now I'm getting a headache while programming my navigation in mx 2004...here's what I want to do :

I want to make navigation like an elevator with 4 floors... got a menu system with four buttons. when i press the buttons, it makes the movie clip with the elevator go up and the mc with the doors opening and closing (door1, door2, door3, and door4) move up and down to the corresponding floor: the door corresponding to the "last floor clicked" closes (function closeDoor), the elevator moves down (set_pos) and the door corresponding to the new floor clicked opens ( door1.gotoAndPlay(2)). How can I make flash WAIT until the movieclip of the last door closing is finished (last door is closed) before making the elevator go down and open the new door ??? Now it's working but as soon as I click a button, the elevator moves down without waiting for the door to close.


here's the main code :



PHP Code:



// highlite the first sections door.
door1.gotoAndPlay(2);
// tell the system which are the first button and door
current_button = "a";
current_door = "door1";
// function to move elevator to correct position when user rolls over buttons.
function set_pos() {
____with (locator) {
________bx = x;
________by = y;
________gotoAndPlay(2);
____}
}
// function to close door
function closeDoor() {
____with (eval(current_door)) {
________gotoAndPlay("out");
____}
}
//
stop();





here's the code assigned to the navigation button 1 :


PHP Code:



on (release) {
____// sets variables x & y, then runs set_pos function which will move the elevator to the correct position.
____x = 40;
____y = 92;
____set_pos();
____//runs function common to close last door
closeDoor();
____//opens new door
____door1.gotoAndPlay(2);
____//tell the system which section is currently selected.
____current_button = "a";
____current_door = "door1";
____//
}





mmm this is quite complicated. sorry for my bad english, anyone can help ?
thanks !
vuadoux

View Replies !    View Related
Please Cure My Headache
Hi,

how do I make an 'if' statement apply to more than one object...

I want to say something like:

if (Btn_1, Btn_2, Btn_3, etc. == _visible) {
gotoAndPlay ("whatever");
} else {
gotoAndStop ("something");
}


I don't think this is the right way... how do i do it?
How do I refer to multiple Btns in the same condition statement??

Please, I have a huge headache
Thanks.

View Replies !    View Related
Easiest ? For U, Headache For Me
I'm brand spank'n new to flash, and I'm trying to launch and load a video file using wmv from a button. I'm using flash 4. I can't seem to get the correct action to make it work. Can you PLEASE help me?

View Replies !    View Related
Listbox Headache
I am trying to parse multiple selections from one list box to another via an apply button and for some reason my brain is dead as to how to do it. someone please HELP!

View Replies !    View Related
Arrays And Headache
I am trying to assign to the buttons of duplicated movie clips values based on a variable, inthis case:i. "i" starts with a initial value of -1, and it is increase to ++i. Then the movie clips are duplicated and a line o six movie clips is ccreated. Each movie clip has an instance of a button (linksButton)inside themselves.

The problem is here (at the end of the script). My text field tells me that pictureName[i] has an undefined value. Why my script is not assigning the right value to each button everytime the loop completes one cicle?

root[name].linksButton_btn.onRelease = function(){
loadMovie(pictureName[i], "pics_mc");
field_txt.text = pictureName[i];
}

----------------------------------------------
Here is the whole sscript:

var pictureName:Array = new Array("pic1.jpg","pic2.jpg","pic3.jpg","pic4.jpg", "pic5.jpg","pic6.jpg");
var n:Number = pictureName.length;
function itemClicked(){
var pictureID:Number=1;
var picDuplicate:String = "picture" + pictureID + "_mc";
var xSpacing:Number = 20;
var ySpacing:Number = 10;
var xStart:Number = 140;
var yStart:Number = 215;
var v:Number = 0;
var i:Number = -1;
while (++i<n) {//inicio do loop
++v
var j:Number = 0;
var name:String = "picture" + v;
_root[picDuplicate].duplicateMovieClip(name, v);
_root[name]._x = xStart + i*xSpacing;
_root[name]._y = yStart + j*ySpacing;
_root[name].linksButton_btn.onRelease = function(){
loadMovie(pictureName[i], "pics_mc");
field_txt.text = pictureName[i];
}
}

View Replies !    View Related
Array, What A Headache
Hi,

i have a drag and drop menu.. evey time an item is dropped it is added to an array. so with three items dropped the arrray looks something like this:


PHP Code:




_level0.hit1_mc.mc1,_level0.hit1_mc.mc2,_level0.hit1_mc.mc3







so how do i remove the correct item from the array? e.g if i click on _level0.hit1_mc.mc1 it is removed for the array.

cheers,
G

View Replies !    View Related
ComboBox Headache
Hi all,

I have a combobox called cbCountry which has a list of countries.
I have a few other form elements some of which become redundant if the user is not from the UK. Can anyone tell me how to set the _visible of these fields to false if the user selects any country other than United Kingdom from the menu? I've tried the help, tried being 'creative' and I've got a headache.

Thanks in advance
Tony

View Replies !    View Related
Changing The FPS... HEADACHE
OK, I need to do something VERY simple but after 2 days I could not do it!

I have a document that only contains moving images set at 1 frame per second and I need to make an interval of that frame move at 12fps. Simply enough?

The quicker the help the faster this headache will go away.

Thanks

View Replies !    View Related
GetObjectsUnderPoint Headache
Hey all,

I've been on this problem for about a week now and it's making me angry. I'm making this game where lots of bullets and lots of enemies are involved. I'm testing [bullet]-[enemy] and [bullet]-[environment object] collision using getObjectsUnderPoint(). All environment objects and enemies get spawned on the same parent movieclip object called Theatre. Enemies are irregularly-shaped and rotate depending on movement direction.

Okay, first, I created the bullet logic. Flies everywhere just fine, and I programmed it to destroy itself when it hits anything. I create environment objects. Bullets that collide on the environment objects disappear as instructed (here I tested that Theatre.getObjectsUnderPoint() returns the environment movieclip object ONLY... great!)

Here's where it becomes messed up. I add an enemy that runs around. Bullets that hit him only disappear sometimes... and during troubleshooting, I noticed that Theatre.getObjectsUnderPoint() returned the Shape object within the enemy movieclip ONLY, not the enemy movieclip itself as I expected. What's with the inconsistency? Also, why does Theatre.getObjectsUnderPoint() return nothing (MC object or otherwise) when the bullet so obviously overlaps the enemy movieclip? Something's got to return because something's obviously at that Point at that particular time right?

Common mistakes people tend to overlook that I took care not to:I made sure that I passed the xy coordinate relative to the stage object to getObjectsUnderPoint()
Thanks for any help guys, I'd almost give my soul to have this thing solved. (can you tell I'm desperate? :P)

Jay.

View Replies !    View Related
XML: 'for' Loop Headache
Hey guys

I'm working with a large XML file, each node of which has a date node, as follows:


Code:
<xmldoc>
<section>
<entry>
<type>TYPE1</type><name>NAME1</name><content>CONTENT1</content><date><![CDATA[<p>6/2006</p>]]><date><source>Internet</source>
</entry>
<entry>
<type>TYPE2</type><name>NAME2</name><content>CONTENT2</content><date><![CDATA[<p>5/2006</p>]]><date><source>Local Papers</source>
</entry>
<entry>
<type>TYPE3</type><name>NAME3</name><content>CONTENT3</content><date>1/2006</date><source>Doesn't matter</source>
</entry>
<entry>
<type>TYPE4</type><name>NAME4</name><content>CONTENT4</content><date>6/2006</date><source>Somewhere else</source>
</entry>

</section>
</xmldoc>
I want to search some of the nodes to display the nodes with a date within the last two months.

I'm using a 'for' loop, as follows:



Code:
function showRecent(nodes){
var today:Date = new Date();
var thisMonth:String = ("<p>"+(today.getMonth())+"/"+(today.getFullYear())+"</p>");
var lastMonth:String = ("<p>"+(today.getMonth()-1)+"/"+(today.getFullYear())+"</p>");
var entry;
for (var i=0; i<nodes.length; i++){
var xName = nodes[i].childNodes[1].firstChild.nodeValue;
var xDate = nodes[i].childNodes[3].firstChild.nodeValue;
var twoMonths = ((xDate == thisMonth)||(xDate == lastMonth));
if(twoMonths==true){
entry = attachMovie("result_mc", "result_mc"+i, i);
entry._x = 0;
entry._y = 18*i;
entry.xName = xName;
entry.xDate = xDate;
}
}
}
Now, this works fine, it pulls the nodes with a date from within the last two months. Trouble is, if those nodes aren't right next to each other in the XML file, there is a space between the attached instances of "result_mc" - because the "_y" property of "result_mc" is multiplied by "i".

What I mean is, the above example would produce instances of "result_mc" as follows:

NAME1 6/2006
NAME2 5/2006

NAME4 6/2006


What I want to do is count the number of nodes where the node has a date within the last two months, and multiply the "_y" property of the attached instances of "result_mc" by that number - thereby removing the gap between NAME2 and NAME4.

Now that that's all clear as mud, can anyone please help?!

View Replies !    View Related
ActionScript 3.0 Headache...
hi im trying to change my program from actionscript 2.0 to 3.0
and Im having some difficulties with the netconnection


ActionScript Code:
var my_nc:NetConnection = new NetConnection();
my_nc.connect("rtmp://localhost/test");

this script works on actionscript 2.0 but on 3.0 I get connection failed... why?

View Replies !    View Related
Loadmovie() Headache
Here's the problem, I want to load a movie from an external source into many different movies that appear at different times over a five minute timeline. If I would like to avoid the .swf been loaded in more than once is there any way to load the swf in the first frame (_visible = false) and copy it to the target movieclips? duplicate only works within the same timeline and attachMovie will only take from the library not the stage. Is there a workaround that anyone knows?

Thanks,
Scott

View Replies !    View Related
Preloader Headache
Could somebody please show me what's wrong with this darn preloader of mine before I go totaly bezerk. It loops and generally shows proof of bad behaviour.

Here's the code:

Scene 1

Script

frame 1
actions for frame 1
total_bytes = _parent.getBytesTotal();
loaded_bytes = _parent.getBytesLoaded();
percent_done = int((loaded_bytes/total_bytes)*100);;
bar.gotoAndStop(percent_done);
ifFrameLoaded ("Scene 2", 1) {
gotoAndPlay ("Scene 2", 1);
}

frame 2
actions for frame 2
gotoAndPlay (1);

Visuall
frame 1
laddar..., (_sans, 11 pts)
(empty), (percent_done)
%, (_sans, 11 pts)

Symbol Definition(s)
bar
Ram
frame 1
actions for frame 1
bar.stop();
Layer 5
frame 1
frame 100
Underlaget
frame 1
actions for frame 1
bar.stop();
Symbol 37
Layer 1
frame 1


Thank's in advance.


PS
What's up with the attachments. When I try to attach a file all I get is: "Document contains no data"

View Replies !    View Related
Buttons....such A Headache
Hi,

Ok im trying to create some simple buttons, and they seemed easy enough: roll over and they fade to black, roll out and they fade back to white. Only problem is that the Up state (what im using as the roll out) loads when the buttons appear on the timeline but id rather they didnt as theres too much happening than i hoped for. basically i want them to appear white, roll over and they fade to black, click and they stay black (not fade back to white like a disco if you keep clicking them

Here's an idea of what im doing

Oh and while im here, i duplicated a button in my library to save time and renamed it, altered the text in the button face but it changed the original, is there a way round this one, i guessed instances but it didn't seem to work.

Would really appreciate the help - Thank you

View Replies !    View Related
Progress Bar Headache
Hello all,

Ive made several flash movies (Flash 8 Pro) with my very rudimentary knowledge. I went to apply the progress bar component (never used components before) thinking, naively, that I could just drop it into frame one and add some basic script so it would stay in frame one showing the progress of the loading of the entire movie and, when all frames were downloaded, move on to frame 2. I've done a more static preloader message before with:

if (_framesloaded >= _totalframes) {
gotoAndPlay ("next");
}

But I now need the progress bar. Well, I'm completely confused by the help file and how involved using the component seems to be. Can't it be a simple as I describe above? Am I not seeing the forest for the trees?

Any help or direction would be much appreciated.

Scott

View Replies !    View Related
Headache With Button
Hi,

here is a link to FLA files www.fulek.com/bug/BUG_report.rar (This is another X-file’s example, FLA’s are actually empty but they have 2MB each when extracted).

Short description of problem:

StartFile.swf has one big button which is instance of Button (content is in UP state). Context menu options are added trough action script.

InvisibleButton.swf has on MC (invisibleMC) with invisible button in (content is in HIT state). You add context menu options to invisibleMC trough optionsMC component which is on InvisibleButton.swf Scene.

StartFile.swf loads InvisibleButton.swf.
So, invisible button is above big button in StartFile.swf.

If you start SWF inside Flash it all works fine, each button has its own context menu, but if you start it in Internet Explorer, invisible button is not recognized, you see big button context menu on place of invisible button.

Now if you modify invisible button so it has something in UP state it works fine in IE, you can place transparent object to simulate invisible button.

This problem appears only in IE with FlashPlayer 9 AtiveX control.
Please if someone can take a look on this two FLA files.

Thanks

View Replies !    View Related
Preloader Headache
Hello Community,

Any ideas as to why my preloaders (created similar to the myriad of tutorials out there and triggered when loading various SWFs into my main timeline via "Loader") work as expected when I test my movie in Flash and use "Simulate Download" but when I publish them on a server and view it through either the latest FireFox or IE they do not work as expected.

The behaviour for the not expected scenario is as such: the preloader appears as usual, but there is a significant pause before the bar starts to show the progress. Almost like the SWF is nearly completely loaded then, suddenly, the preloader suddenly does its thing (from 0 to 100%) in a time that is impossibly short.

Any known problems with the ProgressEvent misfiring in certain server/browser configurations? Alternatively, can anyone point me to a tuorial that provides a bombproof preloader?

Frustrating, since it works like a charm within the "Simulate Download" environment.

Any input is greatly appreciated.

Regards,

-john

View Replies !    View Related
Menu Headache
hi


I've posted a .swf...does anyone know how i can achieve this?

Heres what I after in a real site..click here

Basically theres a line that raises/falls and pivots depending on which button you're over.

Any ideas?

View Replies !    View Related
The Morning Headache
Here's what I'm trying to do...

Take this:

http://www.iparigrafika.hu/pageflip.html

and convert it to an effect instead...

To explain better, I don't care that it loads a page graphic, I'd just like one page that I could flip back and forth, and depending on what side you click, it'd change a variable. That's it.

If that's not possible, then can anybody point me to a decent looking page flip animation?

If you're serious about helping, I'll post what I've already cobbled together...it works, sort of.

View Replies !    View Related
Array Headache
Im pretty much new to arrays and its killing me to figure some stuff out. I have the following script on the main timeline in my movie

ActionScript Code:
Array.prototype.shuffle=function(){   for(i=0;i<this.length;i++){      var tmp=this[i];      var randomNum=random(this.length);      this[i]=this[randomNum];      this[randomNum]=tmp;   }}// USAGE:arr1=["a","b","c","d","e"];arr1.shuffle();trace(arr1);

much thanks to sephiroth for it. Anyways, i created a movie clip with a dynamic textbox in it which i was hoping could pull one of the values from the array. How do i do this?

I uploaded the fla so hopefully one of you guys could tell me where im going wrong

View Replies !    View Related
Loadmovie Headache. Aye
i have some script in a movieclip in my main movie that creates an emptymovieclip and uses the loadmovie function to load a swf into it.

Code:
on (release) {
gotoAndStop ("blank");
_root.pyr.gotoAndPlay ("home");
}
It works fine for most imported swfs but one in particular doesnt function completely. When you press a certain button with the following script on it

Code:
on (release) {
gotoAndStop ("blank");
_root.pyr.gotoAndPlay ("home");
}
it doesnt execute the last line. I figured that this is because the "_root" wouldnt be the same since its actually imported into another movie. I've messing around with the absolute path but nothing.

HELP!!

View Replies !    View Related
Preloader Headache
I'm sure this is a very simple problem, but I'm not terribly well-versed in preloaders.

The preloader I have on my site right now works perfectly on the main page, but not on my portfolio page. I broke down my site into 2 parts because the portfolio is large.

Basically, on the first site, it loads 100% before moving on. On the portfolio, it loads about 45kb and then bounces you right into the following frames.

The preloader is a one-frame movie clip in frame 1 of my first scene. I looked at the actions on the 3 layers inside it - text, bar, background. On the preloader's "background":

onClipEvent (enterFrame) {
if (_parent.doneLoading == 760) {
total = _parent._parent.getBytesTotal();
isloaded = _parent._parent.getBytesLoaded();
p = 100*(isLoaded/total);
_parent.bytes = int(isloaded/1000) add " KB of " add int(total/1000) add " KB";
_parent.percent = int(p) add "% LOADED";
_parent.bar._xscale = p;
if (Number(p)>Number(95)) {
_parent._parent.gotoAndPlay(Number(2));
_parent.gotoAndStop("off")
_parent.doneLoading = 1;
} else {
_parent._parent.gotoAndPlay(Number(1));
}
}
}

On the preloader's "text":

doneLoading = 0
stop()

To see it in perfect action, check out:
http://www.daramoss.com

To see it #*$& up every time it preloads, check out:
http://www.daramoss.com/portfolio.html

THANKS SO MUCH!

View Replies !    View Related
Flash 8 XML Headache
Hey peep,

this is my first post, but not my first time using Kirupa...

Need the help of an experienced AS'er regarding a headache with an anoying image gallery in FLA8 & XML...

The XML determines the number of Menu buttons in the main menu & scrolling thumbnails menu, which are attached dynamically...

The problem is loading the second gallery XML into the scrolling menu when the main menu button is pressed... The XML is loading, bu not into the scrolling menu... HEEELLLLPPP!!!!

Plz... The code is messy I know... I am a designer not a coder & thus will appreciate you patiences & attention as I make steps to understanding AS...

Appreciate the help...

MY CODE:::::::

_quality= "best";
fscommand("fullscreen", "false");
fscommand("allowscale", "false");

stop();

function loadXML(loaded) {
if (loaded) {
xmlNoda = this.firstChild;
xmlNode = this.firstChild.firstChild.firstChild;

firstImage();
}
gotoAndStop(2);
}

xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("Build/swfs/XMLMenu/menua.xml");
//////////////////////////////////////////////////////////////////////////

//Preload this movie...
preload = function(mc) {
this.onEnterFrame = function() {
filesize = lrgHolder.getBytesTotal();
loaded = lrgHolder.getBytesLoaded();
preload._visible = true;
if (loaded != filesize) {
preload.pre_bar._xscale = 100*loaded/filesize;
} else {
preload._visible = false;
if (lrgHolder._alpha<100) {
lrgHolder._alpha += 10;
}
}
}
}
preload();


/////////////////////////////////////////////////////////////////////////////////////////////////////
Get the XML thingies...

var XMLlinks = [];
var XMLlinkz = [];

var catergories = [];
var header = [];

var captions = [];
var image = [];
var largeImg = [];

XMLLoader = function() {

total = xmlNoda.childNodes.length;
totally = xmlNode.childNodes.length;

for (a=0; a<total; a++) {

XMLlinkz[a] = xmlNoda.childNodes[a].childNodes[0];
XMLlinks[a] = xmlNoda.childNodes[a].childNodes[0].childNodes;

catergories[a] = xmlNoda.childNodes[a].childNodes[0].attributes.names;
header[a] = xmlNoda.childNodes[a].childNodes[0].attributes.names;

captions[a] = xmlNode.childNodes[a].childNodes[0].childNodes[0];
image[a] = xmlNode.childNodes[a].childNodes[1].childNodes;
largeImg[a] = xmlNode.childNodes[a].childNodes[2].childNodes;


var catHeader = eval ("caterHdr_mc.ca");
var imgName = eval ("imgNme_mc.iNme");

catHeader.text = catergories[0]+":";
imgName.text = captions[0];

var catHeaderRf = eval ("caterHdrRf_mc.ca");
var imgNameRf = eval ("imgNmeRf_mc.iNme");

catHeaderRf.text = catergories[0]+":";
imgNameRf.text = captions[0];
}
}
XMLLoader();

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

var contentBox = setUpConBox();
function setUpConBox() {
var cb = this.createEmptyMovieClip("cbc", this.getNextHighestDepth());
var w = 300;
var h = 24;

cb._x = 0;
cb._y = 0;
//cb._visible = false;
//cb.beginFill(0x6699CC,10);
//cb.lineStyle(1,0x6699CC,60)
cb.lineTo(w, 0);
cb.lineTo(w, h);
cb.lineTo(0, h);
cb.lineTo(0, 0);
cb.endFill();
return cb;
}

//////////////////////////////////////////////////////////////////////////////////////////////////Calling content holders function...

catMenu00(1 , 80, 5 , cbc._width , 5 , 0 , 5 , cbc._height , contentBox , cbc);

var w = 287;
var h = 190;
cbc_1._x = 86.5;
cbc_1._y = 80;

//////////////////////////////////////////////////////////////////////////////////////////////////duplicate 'cbc_1' movie to hold larger images...

cbc_1.createEmptyMovieClip("cbc_1a", this.getNextHighestDepth());
var lrgHolder = eval("cbc_1.cbc_1a");
var w = 2;
var h = 2;
lrgHolder._x = 2;
lrgHolder._y = 2;

//////////////////////////////////////////////////////////////////////////////////////////////////Load the first image randomly...

firstImage = function (min, max):Number {
var randomNum = Math.floor(Math.random() * (max - min + 1)) + min;
return randomNum;
}
for (var i = 0; i < total; i++) {
var loaded = firstImage(0, totally)

lrgHolder.loadMovie(largeImg[loaded], 0);
lrgHolder._alpha = 0;
}

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

var w = 300;
var h = 24;
cbc_2._x = 80;
cbc_2._y = 280;

cbc_2.createEmptyMovieClip("cbc_2a", this.getNextHighestDepth());

var w = 80;
var h = 24;
cbc_2a._x = 80;
cbc_2a._y = 280;


var holder = eval("cbc_2"+".cbc_2a");
holder._x = 0;
holder._y = 0;

var w = 300;
var h = 24;
cbc_3._x = 80;
cbc_3._y = 320;

var w = 100;
var h = 24;
cbc_4._x =-100;
cbc_4._y = 365;

var clipper = cbc_4.attachMovie("smo", "smoo", this.getNextHighestDepth());

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

catMenu01(3 ,145 ,5 ,clipper._width ,4 ,0 ,40 ,clipper._height , clipper, cbc);

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

for (g = 0; g <total; g++) {
var smoBtn = eval(clipper+"_"+g);
smoBtn.onRollOver = function() {
if(this.sts == 0) {
this.gotoAndPlay("r1");
}
}
smoBtn.onRollOut = function() {
if(this.sts == 0) {
this.gotoAndPlay("r2");
}
}

var fmtc = eval(clipper+"_"+g+".txtBox02.tc");
var fmtd = eval(clipper+"_"+g+".txtBox02.td");
fmtc.text = catergories[g];
fmtd.text = catergories[g];


////////////////////////////////////////////////////////////////////////////////////////
//Activating the catergory headers & buttons...
smoBtn.XMLlinks = XMLlinks[g];
smoBtn.XMLlinkz = XMLlinkz[g];

smoBtn.onPress = function() {
for (k = 0; k <total; k++) {

var smoBtnz = eval(clipper+"_"+k);
if(smoBtnz.sts != 1){
this.gotoAndStop(19);
} else if (smoBtnz.sts != 0){
smoBtnz.gotoAndPlay(19);
} else if (smoBtnz.sts != 1){
this.gotoAndStop("r2");
}



catergory = this.XMLlinkz.attributes.names;
header = catergory;

captions[k] = this.XMLlinks[k].childNodes[0].childNodes;
fmta.text = captions[k];
fmtb.text = captions[k];

image = this.XMLlinks[k].childNodes[1].childNodes;
but.loadMovie = image;

largeImg = this.XMLlinks[k].childNodes[2].childNodes;
butt.loadMovie = largeImg;
}
}
}

///////////////////////////////////////////////////////////////////////////////////////////////////
//Calll Images & attch from XML file
attachPic = function (img,container,pos) {
var but = eval (container + ".hold");
but.loadMovie(image[pos], 0);
}

largePic = function (img,container,pos) {
var butt = eval ("lrgHolder");
butt.loadMovie(largeImg[pos], 1);
lrgHolder._alpha = 0;
}

///////////////////////////////////////////////////////////////////////////////////////////////////
//Attaching scrolling menu buttons...

var sma = new Array(totally);
var max = _root.sma.length;
var p = 0;

var itemDepth = 0;

for (p = 0; p <max; p++) {
_root.holder.attachMovie("sma", "sma_"+p, itemDepth, {_x:2, _y:2});
curItem = holder["sma_"+p];

_root.sma[p] = curItem;
if (p == 0) {
curItem._x = 2;
} else {
curItem._x = holder._width+ 10;
}
itemDepth++;

var fmta = eval("holder.sma_"+p+".scrollTxt.ta");
fmta.text = captions[p];

var fmtb = eval("holder.sma_"+p+".scrollTxt.tb");
fmtb.text = captions[p];

///////////////////////////////////////////////////////////////////////////////////////////////////
//Getting scroll menu buttons into the game...

var smaBtn = eval("curItem");
smaBtn.name = p;

smaBtn.onRollOver = function(){
if(this.sts == 0){
this.gotoAndPlay("r1");
attachPic(image[p],this,this.name);
}
}

smaBtn.onRollOut = function(){
if(this.sts == 0){
this.gotoAndPlay("r2");
}
}

smaBtn.onPress = function () {

var smaBtnz = eval("curItem");
if(smaBtnz.sts != 1){
this.gotoAndStop(18);
largePic(largeImg[p],this,this.name, 0);
//trace(this);
} else if (smaBtnz.sts != 0){
smaBtnz.gotoAndPlay("r2");

} else if (smaBtnz.sts != this.name){
this.gotoAndStop(18);
}
}
}

//////////////////////////////////////////////////////////////////////////////////////////////////
Scrolling the a content...

scrolling = function () {
var smcDrag = eval (cbc_3.attachMovie("sme","sme_", this.getNextHighestDepth(), {_x:0, _y:2}));

//Load text into scrollbutton...
var fmtc = eval("cbc_3.sme_"+".scrollTxt.ta");
fmtc.text = names;

var scrCont = eval ("cbc_2.cbc_2a");

var scrollwidth:Number = cbc_0._width;
var contentwidth:Number = scrCont._width;
var smcDragwidth:Number = smcDrag._width;

var maskwidth:Number = cbc_0._width;
var initPosition:Number = smcDrag._x = cbc_0._x = 0;
var initContentPos:Number = scrCont._x;

var finalContentPos:Number = maskwidth - contentwidth + initContentPos;

var left:Number = cbc_0._x = 0;
var top:Number = cbc_0._y = 2;
var right:Number = cbc_0._width - smcDragwidth + cbc_0._x ;//trace("right "+cbc_0._x);
var bottom:Number = cbc_0._y;

var dx:Number = 0;
var speed:Number = 15;
var moveVal:Number = (contentwidth - maskwidth) / (scrollwidth - smcDragwidth);

smcDrag.onPress = function () {
var currPos:Number = this._x;
var currPos:Number = this._y;

startDrag (this, false, left, top, right, bottom);
this.onMouseMove = function () {
dx = Math.abs (initPosition - this._x);
scrCont._x = Math.round (dx * -1 * moveVal + initContentPos);
}
}

smcDrag.onMouseUp = function() {
stopDrag();
delete this.onMouseMove;
}

btnLeft.onPress = function () {
this.onEnterFrame = function () {
if (scrCont._x + speed < cbc._x) {
if (smcDrag._x <= left) {
smcDrag._x = left;
} else {
smcDrag._x -= speed / moveVal;
}
scrCont._x += speed;
} else {
smcDrag._x = left;
scrCont._x = cbc._x;
delete this.onEnterFrame;
}
}
}

btnLeft.onDragOut = function () {
delete this.onEnterFrame;
}
btnLeft.onMouseOut = function () {
delete this.onEnterFrame;
}

btnRight.onPress = function () {
this.onEnterFrame = function () {
if (scrCont._x - speed > finalContentPos) {
if (smcDrag._x >= right) {
smcDrag._x = right;
} else {
smcDrag._x += speed / moveVal;
}
scrCont._x -= speed;
} else {
smcDrag._x = right;
scrCont._x = finalContentPos;
delete this.onEnterFrame;
}
}

btnLeff.onPress = function () {
this.onEnterFrame = function () {
if (scrCont._x + initContentPos < speed) {
if (smcDrag._x <= left) {
smcDrag._x = left;
} else {
smcDrag._x -= speed / moveVal;
}
scrCont._x += speed;
} else {
smcDrag._x = left;
scrCont._x = initContentPos;
delete this.onEnterFrame;
}
}
}


btnRight.onRelease = function () {
delete this.onEnterFrame;
}

btnRight.onDragOut = function () {
delete this.onEnterFrame;
}
if (contentwidth < maskwidth) {
smcDrag._visible = false;
btnLeft.enabled = false;
btnRight.enabled = false;
btnLeff.enabled = false;
} else {
smcDrag._visible = true;
btnLeft.enabled = true;
btnRight.enabled = true;
btnLeff.enabled = true;
}
}

btnLeff.onRelease = function () {
delete this.onEnterFrame;
}

btnLeff.onDragOut = function () {
delete this.onEnterFrame;
}
if (contentwidth < maskwidth) {
smcDrag._visible = false;
btnLeft.enabled = false;
btnRight.enabled = false;
btnLeff.enabled = false;
} else {
smcDrag._visible = true;
btnLeft.enabled = true;
btnRight.enabled = true;
btnLeff.enabled = true;
}
}

scrolling();


var fmtc = eval("cbc_3.sme_"+".scrollTxt.ta");
var fmtd = eval("cbc_3.sme_"+".scrollTxt.tb");
for (h =0; h <total; h++) {
fmtc.text = header[0];
fmtd.text = header[0];
}

///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
//Building content boxes function...

function catMenu00(clms, xpos, vspace, wclip, rws, ypos, hspace, hclip, mc, mcAlias) {

var wclip = wclip;
var hclip = hclip;


var lastDepth = mc.getDepth();
var mcLevel = lastDepth*0;

for (var a = 0; a<clms; a++) {
for (var b = 0; b<rws; b++) {

var newMc = mc+"_"+mcLevel++;
var newMc_ = newMc.substring(8);

var aliasEV = eval("mc");
var alias = mc+"_"+mcLevel;
var mcAlias = alias.substring(8);

var mcDone = mc.duplicateMovieClip(newMc_, lastDepth+1);

mcDone._x = xpos+((wclip+hspace)*a);
mcDone._y = ypos+((hclip+vspace)*b);

lastDepth++;
}
}
return;
}



function catMenu01(clms, xpos, vspace, wclip, rws, ypos, hspace, hclip, mc, mcAlias) {

var wclip = wclip;
var hclip = hclip;

var lastDepth = mc.getDepth();
var mcLevel = lastDepth*0;

for (var a = 0; a<clms; a++) {
for (var b = 0; b<rws; b++) {

var newMc = mc+"_"+mcLevel++;
var newMc_ = newMc.substring(8);

var aliasEV = eval("mc");
var alias = mc+"_"+mcLevel;
var mcAlias = alias.substring(8);

var mcDone = mc.duplicateMovieClip(newMc_.substring(6), lastDepth+1);

mcDone._x = xpos+((wclip+hspace)*a);
mcDone._y = ypos+((hclip+vspace)*b);

lastDepth++;
}
}
return;
}
:::::::::::

Also XML attached...
Tenafly...

View Replies !    View Related
Scope Headache...
Simple bit of code, a loop that attaches a movie clip, which in turn contains a button. Now, when the button triggers an onRollOver, I need to be able to move the clip which the button resides in. I can't get it to work, and I think it's a scope thing;

(where ident_btn is the instance name of the button in the dynamically attached mc):


ActionScript Code:
for (var i=0; i <= 15; i++) {        identID = "ident" + i;        var tempgrid = grid_mc.attachMovie("ident_proto", identID, grid_mc.getNextHighestDepth());        tempgrid.ident_btn.onRollOver = function() {// MOVE THE CLIP THIS BUTTON BELONGS TO        }                tempgrid.ident_btn.onRollOut = function() {// UN MOVE THE CLIP THIS BUTTON BELONGS TO        }


Any suggestions?

View Replies !    View Related
Progess Bar Headache
Hello all,

Ive made several flash movies (Flash 8 Pro) with my very rudimentary knowledge. I went to apply the progress bar component (never used components before) thinking, naively, that I could just drop it into frame one and add some basic script so it would stay in frame one showing the progress of the loading of the entire movie and, when all frames were downloaded, move on to frame 2. I've done a more static preloader message before with:

if (_framesloaded >= _totalframes) {
gotoAndPlay ("next");
}

But I now need the progress bar. Well, I'm completely confused by the help file and how involved using the component seems to be. Can't it be a simple as I describe above? Am I not seeing the forest for the trees?

Any help or direction would be much appreciated.

Scott

View Replies !    View Related
Headache With Button
Hi,
Yesterday I post a message with problems that I have but without example.

Here is a link to FLA files www.fulek.com/bug/BUG_report.rar (This is another X-file’s example, FLA’s are actually empty but they have 2MB each when extracted).

Short description of problem:

StartFile.swf has one big button which is instance of Button (content is in UP state). Context menu options are added trough action script.

InvisibleButton.swf has on MC (invisibleMC) with invisible button in (content is in HIT state). You add context menu options to invisibleMC trough optionsMC component which is on InvisibleButton.swf Scene.

StartFile.swf loads InvisibleButton.swf.
So, invisible button is above big button in StartFile.swf.

If you start SWF inside Flash it all works fine, each button has its own context menu, but if you start it in Internet Explorer, invisible button is not recognized, you see big button context menu on place of invisible button.

Now if you modify invisible button so it has something in UP state it works fine in IE, you can place transparent object to simulate invisible button.

This problem appears only in IE with FlashPlayer 9 AtiveX control.
Please if someone can take a look on this two FLA files.

Thanks

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved