Messing With Variables...
Ok, i'm using a matrix for a tic-tac-toe game, and I came up with the idea that maybe I could use the matrix indexes (ie 00 11) as variables. I made it to where like a duplicated Movie Clip X or O would have an x or o followed by the index number of where it is. However I'm having trouble having the program recognize the generated variables. Anyone know if I can actually do this?Or suggestions?
FlashKit > Flash Help > Flash ActionScript
Posted on: 03-20-2002, 10:56 AM
View Complete Forum Thread with Replies
Sponsored Links:
_x And _y Messing Up Please Help
here what I'm doing...
Button 1
Code:
on (press) {
mcy = _root.mc._y;
mcx = _root.mc._x;
}
on (release) {
mcysave = "mcysave=" + mcy + "&";
mcxsave = "mcxsave=" + mcx;
}
Button 2
Code:
on (press) {
fscommand ("exec", "command.com" add chr(9) add "/c" add chr(9) add "echo" add chr(9) add mcysave add mcxsave add ">c:-xy.txt");
}
Button 3
Code:
on (release) {
loadVariablesNum ("file:///c|/xy.txt", 0);
}
Button 4
Code:
on (press) {
setProperty ("mc", _y, mcysave);
setProperty ("mc", _x, mcxsave);
}
and One dragable movie clip named "MC"
Help please, Thanks
-Josh Svee
View Replies !
View Related
Messing With AS3
I'm having hard times with AS3... How can I tell sprites/movie clips new variables, created after slicing data from XML file? In AS2 I would go write this way, don't know if it's the right way but it always worked:
Code:
for(var i:Number=0;i<xmlFile.length();i++){
var someArray:Array=xmlFile.firstChild.childNode[i];
mc.someArray=someArray;
}
The selected movie clip stored a part of data and I could target it any time. How can I do something similar with AS3?
And how can I target objects that weren't created by code and cast actions? I have some buttons on the stage, already named them and can't target them by code...
View Replies !
View Related
---arg--- Is Flash Always Messing Up Jpg's?-----
hey,
when I use a jpg picture in my flash, and animate a mc over it, flash messes up the jpg in the swf file. It looks a bit like flash is pussing away a few pixels where the moviclip is, which makes it look like the whole picture is moving a litle bit. When the mc stops, the jpg looks normal again...
strangely flash exports the fla a few times as he should, and after that the problem starts. I noticed quite a lot swf files online have this problem, so it must be a common one, but I was wondering if there is a solution for it. I tryed, replacing, the jpg, importing it again and such...
any ideas?? (frustrated)
View Replies !
View Related
GetURL Messing Up
After some serious head scratching, I've had
to admit I'm baffled with this problem . . .
A routine getURL button has become a monster
problem; a simple popup window just won't
work in IE, but does in Netscape 6 and 7!?
To make this even more baffling, the same
script is working fine in all previous swf
movies . . . just not in this particular
excuse of an example:
http://www.smallwebthing.co.uk/test.zip
Trust me . . . it is weird. So, if anyone
can help me, it'd be really appreciated.
::bluemoth::
View Replies !
View Related
ASP Messing With Movie...
Hello People!
I'm having a huge problem that needs to be solved ASAP!!! Please Help!
I've made a movie that can be seen on either platforms here: www.geocities.com/runeriera/frame.html
Now the has finally been implemented to the "real" site, which is in ASP, and now my intro directs to the main page halfway through the movie instead of waiting till the movie is finished???Also, on MAC, the intro doesn't appear at all...WHAT'S GOING ON?!??
This is the adress of the "real" site www.unodomani.com
I've made other intromovies than this, and they've all worked fine. This one is the first to be implemented on a ASP site though.
Can anyone please tell me what I can do to fix this? Or is it perhaps the asp setup that is wrong. I haven't build the site myself and I know nothing of asp so I'm completely blank on this.
Thanks in advance for any help you can give me...
View Replies !
View Related
Php Messing Website
I made a website using flash 8 but as if it was 6, and I needed to make some content downloadable, so I used a movieclip as a button that sends a variable to a php file which then downloads a file. I don´t know php but I tweaked this and made it work:
<?
$filename = $_GET['file'];
// required for IE, otherwise Content-disposition is ignored
if(ini_get('zlib.output_compression'))
ini_set('zlib.output_compression', 'Off');
header("Pragma: public"); // required
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header("Content-Type: video/quicktime");
header("Content-Disposition: attachment; filename=".basename($filename).";" );
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($filename));
readfile("$filename");
exit();
?>
Everything works fine in Firefox but when you use it in Explorer you can download the file but when you return the entire site goes blank.
You can see what happens here (use Explorer): www.nicholashogan.com
Can anybody help me? I´m desperate
Thanks
View Replies !
View Related
Messing With Symbols
ok so the idea is: when a button is pressed, the according page slides on the stage by pushing the last one out.
Perhaps this http://distance.planet.ee/web/printwell/howboutnow.html gives you an idea what I'm trying to achieve.
thanks for any kind of help
View Replies !
View Related
IE7 Messing Up Content
Weird, weird, weird. When viewing Flash content in IE7 (and this happens only in IE7), a graphic (movieclip) that is embedded in the swf gets repositioned. Sometimes a text field (static text, filters applied) gets repositioned too. It then only shows the top part of the text field. The problem is not consistent but occurs frequently.
I've never seen anything like this before, so, anyone who has seen this and more importantly, is there a known fix for this issue?
View Replies !
View Related
Why Is My Drag Messing Up On The Ast Clip?
see
http://pfk.no-ip.org/clients/dc1/fla...stylerv11.html
use test/test to login.
My last style mc seems to lockup somehow. all the others work properly. Any ideas why? The code on all the clips are identicle. And it only happens on the last style on the bottom. I removed the last original last style to see if it was that and it happened to the new last style.
View Replies !
View Related
Datagrid Messing Up Checkboxes...
I put some checkboxes into a Flash movie before I put in the datagrid. When it asked me whether I would like to use the existing component or replace it, I said replace it. I was under the impression from the datagrid documentation that this was what I was supposed to do.
But, now anything I do with globalStyleFormat is only being applied to the datagrid! How do I make it so it's being applied to both?
View Replies !
View Related
Preloader Messing The Movie
why is it that a movieclip i use for navigation in 1st frame with this code
onClipEvent (enterFrame) {
_root.holder.navegacao._x += (xx - _root.holder.navegacao._x)/10;
}
doesn't work when i put a normal preloader in Scene 1?
thanks in advance.
View Replies !
View Related
Simple Thing Is Messing Up
Hi,
I have an object that is being dragged by the mouse. It's like a cursor. I also have an object at the bottom of my scene that I want to elastically follow the cursor. Not just always be under the cursor, here is the code that I have so far:
Mouse.hide();
_root.pitcher._x = _root._xmouse;
_root.pitcher._y = _root._ymouse;
xpitcher = _root.pitcher._x
xguy = _root.guy._x
xguyspeed = (xpitcher-xguy)/10
_root.guy._x = _root.guy._x + xguyspeed
then on the third frame I just have a gotoandPlay(2); It doesn't work and I have no idea why. Can someone please tell me what I'm doing wrong...
thanks
View Replies !
View Related
Movie Clips Messing Up
Hi, I have a bunch of movie clips that become activated and fade in when you rollover a button. There's also javascript on each button so that on release they pop up a seperate window.
You can get the .fla here:
www.riggedproductions.com/jervo
The Problem is:
Wwhen I rollover the "corporate" button the movie clip doesn’t show up. I have messed with it and it seems nothing will work.
All the movie clips in the .fla are on top of each other. However, for sanity’s purpose, I put the "corporate" movie clip over to the right in between the text, so we can ISOLATE it.
Hope someone can help,
Bobby@riggedproductions.com
View Replies !
View Related
Flash Is Messing Up My Graphics. Help
I'm working on some graphics for a game. After spending lots of time on the sprites, Flash does weird things to them when imported in.
Just as an example, here is my original art:
And here is what happens when I put the graphic in Flash:
walking example
See how the character has a "black eye"? What can I do to fix this?
View Replies !
View Related
Dynamic Text Messing Up
If you go to www.foxtrotnovember.com please look at the static text (contact/links for example) and the scrolling text (bio). Thay are all the SAME font, but look differently and unreadable when it can be scrolled (also depends on the computer). Can someone tell me how to fix this?
View Replies !
View Related
Components Again - Messing Up My Preload
Hi all - I know that streaming down components screws up your preloader because they are kb heavy and try to go out on the first KF. I've unchecked the 'Export on first KF' and have set my classes to load on frame 2.
I have three scenes, a preloader, a component scene (just a dumping ground for my components) and the main movie. This seperates them all out so that the components don't come down before the loader; the components scene is never called but still counts towards the getTotalBytes() amount and the main movie loads in some xml to make use of the components.
In flash, doing a streaming test at say 56k or at a DSL level, this works fine. The preloader works out everything fine and then the movie loads.
In a live server environment, the preloader loads and the main movie appears, but the components are not there - well sort of semi there, not activated properly. I'm pulling my hair out over this as it's doing my nut. How can it work in flash but not online, either they both do or both don't.
Has anyone come up with a way of loading components properly ie after the preloader? Please don't say, no, don't use components or something like that as I have to.
any help would be great
thanks
frank
View Replies !
View Related
LoadMovie Messing Up Functions
The preloader and the page I want to load are both in the same .fla. Loader on frame 1 and page being loaded on frame 2. Now this .swf file loads and functions properly. Here is the code I use in frame 1 of the preloader:
preloadtext.onEnterFrame = function () {
loaded = this._parent.getBytesLoaded ();
total = this._parent.getBytesTotal ();
percent = ((loaded / total) * 100);
trace ("Percent: " + percent);
percentage = (int (percent) + "%");
preloadtext.percent_txt.text = percentage;
mxbox.gotoAndPlay((20*(percent/100)));
if (percent == 100) {
gotoAndPlay (2);
}
}
However, I have a container that starts the preloader. It has a blank movie clip and this code on a seperate layer:
stop();
mc_container.loadMovie("main.swf");
When I use this .swf file to go to the page I want there are problems such as certain functions don't work (drawing lines, resizing pictures). Sometimes buttons don't even work. I really don't know what to do. Thank you.
View Replies !
View Related
Combox Is Messing With My OnRelease
I have an application that uses a combo box to select information to be loaded. Before the user uses the combo box, my onRelease functions work fine; I can click on a button several times to activate the function without moving the mouse. Once a selection is made with the combobox, however, I can only click on a button once. After that, it won't run the function unless i move the mouse.
This is the code I have for the combobox (named select_order)
Code:
function change(evt) {
if (evt.target.selectedItem.data == null) {
init();
} else {
updateOrder(evt.target.selectedItem.data);
pro_mc._visible = true;
updateText();
}
}
select_order.addEventListener("change", this);
Any clues on to why this is happening or how to get around it? There are a few buttons affected by this where the user wouldn't normally have to move the mouse. Thanks
Phar
View Replies !
View Related
[F8] Array Messing Up Pointers
I've attached MovieClip Loader.as as a .txt file If my information isn't sufficient enough.
I'm trying to make it so each image has it's own loading bar.
The images load fine, the loading bars all end up on the last image.
I'm not even sure if there's 4 there or not, the rest seem to vanish from the array list.
I'm adding a rectangle to use for the loading bar.
Here's how I start out:
Code:
#include "MovieClip Loader.as"
loadMovieClip("car.jpg", mc1);
loadMovieClip("clouds.png", mc2);
loadMovieClip("car2.jpg", mc3);
loadMovieClip("house.png", mc4);
The rest of the code you'll see is in "MovieClip Loader.as"
Here's the variables I use at the top of the .as file:
Code:
var _MCL = new MovieClipLoader();
var _mc_width:Number;
var _mc_height:Number;
var _MCLLoading = [];
Code:
loadMovieClip = function(File:String, MC:Object, Width:Number, Height:Number){
_MCL.loadClip(File, MC);
_mc_width = MC._width;
_mc_height = MC._height;
_MCLLoading[MC._x, MC.y] = this.createEmptyMovieClip("rect_"+MC, 5);
drawRectangle(_MCLLoading[MC._x, MC.y], _mc_width, 5, 0xAAAAAA, 100);
_MCLLoading[MC]._x = MC._x
_MCLLoading[MC]._y = MC._y
trace(_MCLLoading[MC._x, MC.y] + " = " + MC);
}
the trace at the bottom of that prints out this:
_level0.rect__level0.mc1 = _level0.mc1
_level0.rect__level0.mc2 = _level0.mc2
_level0.rect__level0.mc3 = _level0.mc3
_level0.rect__level0.mc4 = _level0.mc4
I trace the same thing again in the onLoadStart function:
Code:
_MCL.onLoadStart = function (targetMC)
{
trace(_MCLLoading[targetMC._x, targetMC.y] + " == " + targetMC)
var loadProgress = _MCL.getProgress(targetMC);
_MCLLoading[targetMC._x, targetMC.y]._xscale = Math.round(loadProgress.bytesLoaded/loadProgress.bytesTotal*100);
}
This is what the trace outputs:
_level0.rect__level0.mc4 == _level0.mc1
_level0.rect__level0.mc4 == _level0.mc2
_level0.rect__level0.mc4 == _level0.mc3
_level0.rect__level0.mc4 == _level0.mc4
Anyone have any idea why the _MCLLoading list is changing? I don't change it anywhere else other than the loadMovieClip function I made. I don't remove it or delete it anywhere either.
View Replies !
View Related
Buttons Messing Up Music
I've nearly finished a project, but have discoverd a big F up with the sound. I've saved the bad bits in another .fla
http://www.miyazakinights.com/musicproblem.fla
Problem is that when you push navigation buttons(movie clips) to get around the site, the music starts again (now I have 2 sounds competing with each other), push another button and you guessed it, the music starts again(now 3 sounds!). Funnily enough, this doesn't happen if you push consecutive nav btns(in the time line), only if you go back. I had scripted buttons at first (using functions) and thought that might be the problem, so I deleted the script and added a dummy button inside the button movie clips. Nothing changed. Anyone help? Thanks.
View Replies !
View Related
Walls Without Messing With The _xscale
Hi, can anyone tell me how to make my character not go through walls without modifying the _xscale when it touches a wall. I've read a lot of tutorials about this but they are all the same, they are somehing like this:
"Make your character a movieclip and add this actions:"
ActionScript Code:
onClipEvent (enterFrame) {
if (this.hitTest(_root.Wall)) {
_x = _x+10; }
}
(That code is incomplete, I just want to give the idea)
I don't need that because in my game the background is the one that moves (character only rotates) so the character is always centered. So if anyone could tell me how to do this it'll be great.
Thanks in advance
View Replies !
View Related
Is LoadMovie AS Messing Up My Functions?
i will try to explain as best I can. I'll post my fla.
here is my .fla
www.zunskigraphics.com/showme/index.fla
In my timeline i have 8 buttons
Each button has an instance name of RWone_mc
Each button also has the AS of:
ActionScript Code:
on (release) {
loadMovie("rw1.swf", (2));
}
NOTE:: Above is for the first button. Obviously each button has an instance name of RW"thebuttonnumber" and loads the rw'buttonnumber.swf"
I have also in the first frame of the actions layer the following AS for each button (just a simple rollover technique for _mc's to act like _btn's)
ActionScript Code:
this.RWone_mc.onRollOver = function() {
RWone_mc.gotoAndPlay("_over");
};
this.RWone_mc.onRollOut = function() {
RWone_mc.gotoAndPlay("_out");
};
this.RWtwo_mc.onRollOver = function() {
RWtwo_mc.gotoAndPlay("_over");
};
this.RWtwo_mc.onRollOut = function() {
RWtwo_mc.gotoAndPlay("_out");
};
this.RWthree_mc.onRollOver = function() {
RWthree_mc.gotoAndPlay("_over");
};
this.RWthree_mc.onRollOut = function() {
RWthree_mc.gotoAndPlay("_out");
};
this.RWfour_mc.onRollOver = function() {
RWfour_mc.gotoAndPlay("_over");
};
this.RWfour_mc.onRollOut = function() {
RWfour_mc.gotoAndPlay("_out");
};
this.RWfive_mc.onRollOver = function() {
RWfive_mc.gotoAndPlay("_over");
};
this.RWfive_mc.onRollOut = function() {
RWfive_mc.gotoAndPlay("_out");
};
this.Rsix_mc.onRollOver = function() {
RWsix_mc.gotoAndPlay("_over");
};
this.RWsix_mc.onRollOut = function() {
RWsix_mc.gotoAndPlay("_out");
};
this.RWseven_mc.onRollOver = function() {
RWseven_mc.gotoAndPlay("_over");
};
this.RWseven_mc.onRollOut = function() {
RWseven_mc.gotoAndPlay("_out");
};
this.RWeight_mc.onRollOver = function() {
RWeight_mc.gotoAndPlay("_over");
};
this.RWeight_mc.onRollOut = function() {
RWeight_mc.gotoAndPlay("_out");
};
In the actions layer about 20 frames later, I call for a movie in another spot with this AS
ActionScript Code:
loadMovie("soundon.swf" , (4));
Now, what I am having trouble with is the rollOver status of each movieclip. It worked fine before I did the AS for the soundon button. Is this due to the way I call it? loadMovie vs. loadMovieNum ???
I don't get it!!!
Please Help!!!
see the example here
www.zunskigraphics.com/showme/index.swf
Thanks!!
ZG
View Replies !
View Related
LoadMovie Messing With My Mind - And XML
Hello,
I'm having a little trouble loading a loadMovie containing a page with XML. There is basically a main.swf that loads a product.swf in a Movie Clip called "container". Standalone the product page works fine. When I load in the product.swf it break the code. It no longer generates the thumbnails from an attatchMovie, or loads the XML. I a little lost, aand a little tired, can someone help me out.... Thanks...
//Main.swf Code
var movLoad:Number = 1;
//Initial Page Load
var container:MovieClip = this.createEmptyMovieClip("container", this.getNextHighestDepth());
//Function to Load Pages
function loadPage():Void {
if(movLoad == 1){
loadMovie("nocomply_home.swf", "container");
container._x = 25;
container._y = 250;
}else if(movLoad == 2){
loadMovie("nocomply_products.swf", "container");
container._x = 25;
container._y = 250;
}else if(movLoad == 3){
loadMovie("nocomply_media.swf", "container");
container._x = 25;
container._y = 250;
}else if(movLoad == 4){
getURL("http://nocomplyatx.blogspot.com", "_blank");
}else if(movLoad == 5){
loadMovie("nocomply_links.swf", "container");
container._x = 25;
container._y = 250;
}
};
//Product.swf Code
//New XML Object
var mydata:XML = new XML();
//ignores formatting of XML files tabs, returns, ect.
this.mydata.ignoreWhite = true;
//Setup onLoad Function
this.mydata.onLoad = loadXML;
//Loads actual XML Data File
this.mydata.load("data/data_product.xml");
//setInterval Vars
var count:Number = 1;
var maxCount:Number = 20;
var duration:Number = 100;
var intervalId:Number;
//Thumbnail Position Vars
var originalx:Number = 20;
var originaly:Number = 55;
currentx = originalx;
currenty = originaly;
//setInerval Vars
var i:Number = 0;
//XML Load Sucess Boolean
function loadXML(success:Boolean):Void {
if (success) {
//Start Intervals
intervalId = setInterval(_root, "thumbInterval", duration);
}
}
//Create Thumbnails Interval
function thumbInterval():Void {
//trace(i);
//Controls # of Thumbnails per line
if ((i % 5 == 0) && (i > 0)) {
currenty += 125;
currentx=originalx;
}
//Attatch Library MC
this.attachMovie("thumbnailMC", "thumbnailMC" + i, 1000 + i);
//Load Image, text, and position
this["thumbnailMC" + i].thumbnailname = mydata.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue;
this["thumbnailMC" + i].textbox.productdescr = mydata.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue;
this["thumbnailMC" + i]._x = currentx;
this["thumbnailMC" + i]._y = currenty;
currentx += 130;
i++
if(count >= maxCount) {
clearInterval(intervalId);
}
count++;
};
View Replies !
View Related
Version Cue - Messing With My Code
I've just spent the morning fixing up a .fla from Friday. For some reason it lost some code over the weekend.
We started testing version cue on friday, and this was my first go with it.
I had 2 versions of the .fla, one that I checked inat 3pm, and one at 5pm.
The 3pm was a working version of an interface... and the 5pm version has some extra features.
When I opened it today (it said altered at 5pm), Monday morning, it appeared to be the 3pm version because the extra features weren't working) so I started coding them again, to find, they were already scripted... but not being utilized. 95% of the code was from the 5pm version, but one movieClips code was from the 3pm version. At no stage, did the code 'align' in that way.
So somehow version cue butchered/mixed-up my code
I've had very similar problems in the past using the project system in flash. So I stopped using it entirely. But we've just purchased an Xserve to run version cue mainly for flash version control... so there's not turning back.
So has anyone encountered this before? Any ideas what's going on?
I'm going to invest some time saving some .flas in, and comparing them tomorrow and see if the code has been altered.
View Replies !
View Related
IE/FF Issues... Somehow The Flash Is Messing Up
for some reason, i'm getting some inconsistencies in my flash between Firefox and IE. check this link:
http://dev.clydemedia.com/BRCL/BRCL0...ploy/index.php
Most of the time, but not all of the time, in IE 6 in xp and 7 in vista, the content area's background boxes shifts to the right about 300-350 pixels. Firefox in xp, vista, and osX and Safari in osX all display the Flash area correctly.
but here's an even weirder thing, it looks like the two boxes are getting masked (the right edge has sharp corners, but all the corners should be rounded). there are no masks in this swf.
here's the hierarchy of things:
the html page loads main.swf via swfobject. main.swf is aligned to the TOP (no left or right), this SWF is where the backgrounds are: mcContent_BG1 (the gray box underneath) and mcContent_BG2 (the lighter box on top). in main.swf is a Loader var which loads the content SWF specified as a FlashVar in the swfojbect. Right now, the index.php doesn't have a content SWF, but the about.php, game.php, and media.php all load in some content, and those SWFs are placed properly on the stage.
i have no idea what to check. i thought flash was consistent across all browsers, all platforms. anybody got any ideas?
View Replies !
View Related
My First Time Messing With Components
Hey all,
I'm trying to make my first script involving a component work.
It needs to be a scrollbar that works with dynamic content
coming from a XML file. The XML gets loaded in just fine so
I'm just focussing on the data treatment function.
Code:
function showNews(){
for(i=0;i<newsXML.firstChild.childNodes.length;i++){
xmlNode = newsXML.firstChild.childNodes[i];
mc = this.attachMovie("newsHeadline",newsHeadline,i);
month = xmlNode.attributes.month;
day = xmlNode.attributes.day;
year = xmlNode.attributes.year.slice(2);
mc.date.text = month+"."+day+"."+year;
mc.title.text = xmlNode.childNodes[0].childNodes[0];
mc._x = 486;
mc._y = 92 + (i*18.5);
}
// add scrollbar component
attachMovie("FScrollBarSymbol","scroller",1);
scroller._x = 698;
scroller._y = 83;
scroller.setSize(226);
scroller.setScrollTarget(mc);
scrollColors = {lightest:0x99CC33, medium:0x66ccff, darker:0x000000, darkest:0x000000};
// other set of colours
//scrollColors = {lightest:0x64B1FF, medium:0x48A4FF, darker:0x178BFF, darkest:0x007AF4};
scroller.setStyleProperty("arrow", scrollColors.darkest);
scroller.setStyleProperty("face", scrollColors.medium);
scroller.setStyleProperty("shadow", scrollColors.darker);
scroller.setStyleProperty("darkshadow", scrollColors.darkest);
scroller.setStyleProperty("highlight", scrollColors.lightest);
scroller.setStyleProperty("highlight3d", scrollColors.medium);
scroller.setStyleProperty("scrollTrack", scrollColors.lightest);
}
Does someone sees what I'm doing wrong here? The first strange thing is
that the second 'node' from the XML file gets skipped?! The other one is
that the data doesn't appear inside the scollbar. It just continues like one long list...
My XML file looks like this:
<newsXML>
<item month="11" day="15" year="2004" thumbnail="sample1.jpg">
<title><![CDATA[Headline here]]></title>
<subtext><![CDATA[subtext here]]></subtext>
<article><![CDATA[full article here]]></article>
</item>
</newsXML>
Hope you can help me out a bit. Thanks!
View Replies !
View Related
HTML Messing Up My Curve
Is there any reason that html would mess up a curved bar? Its a png that I made in Fireworks and then imported into my flash movie. It has looked fine when I have tested the swf, but when I put it into html, its looking jagged.
View Replies !
View Related
LoadMovie Messing With My Mind - And XML
Hello,
I'm having a little trouble loading a loadMovie containing a page with XML. There is basically a main.swf that loads a product.swf in a Movie Clip called "container". Standalone the product page works fine. When I load in the product.swf it break the code. It no longer generates the thumbnails from an attatchMovie, or loads the XML. I a little lost, aand a little tired, can someone help me out.... Thanks...
Attach Code
//Main.swf Code
var movLoad:Number = 1;
//Initial Page Load
var container:MovieClip = this.createEmptyMovieClip("container", this.getNextHighestDepth());
//Function to Load Pages
function loadPage():Void {
if(movLoad == 1){
loadMovie("nocomply_home.swf", "container");
container._x = 25;
container._y = 250;
}else if(movLoad == 2){
loadMovie("nocomply_products.swf", "container");
container._x = 25;
container._y = 250;
}else if(movLoad == 3){
loadMovie("nocomply_media.swf", "container");
container._x = 25;
container._y = 250;
}else if(movLoad == 4){
getURL("http://nocomplyatx.blogspot.com", "_blank");
}else if(movLoad == 5){
loadMovie("nocomply_links.swf", "container");
container._x = 25;
container._y = 250;
}
};
//Product.swf Code
//New XML Object
var mydata:XML = new XML();
//ignores formatting of XML files tabs, returns, ect.
this.mydata.ignoreWhite = true;
//Setup onLoad Function
this.mydata.onLoad = loadXML;
//Loads actual XML Data File
this.mydata.load("data/data_product.xml");
//setInterval Vars
var count:Number = 1;
var maxCount:Number = 20;
var duration:Number = 100;
var intervalId:Number;
//Thumbnail Position Vars
var originalx:Number = 20;
var originaly:Number = 55;
currentx = originalx;
currenty = originaly;
//setInerval Vars
var i:Number = 0;
//XML Load Sucess Boolean
function loadXML(success:Boolean):Void {
if (success) {
//Start Intervals
intervalId = setInterval(_root, "thumbInterval", duration);
}
}
//Create Thumbnails Interval
function thumbInterval():Void {
//trace(i);
//Controls # of Thumbnails per line
if ((i % 5 == 0) && (i > 0)) {
currenty += 125;
currentx=originalx;
}
//Attatch Library MC
this.attachMovie("thumbnailMC", "thumbnailMC" + i, 1000 + i);
//Load Image, text, and position
this["thumbnailMC" + i].thumbnailname = mydata.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue;
this["thumbnailMC" + i].textbox.productdescr = mydata.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue;
this["thumbnailMC" + i]._x = currentx;
this["thumbnailMC" + i]._y = currenty;
currentx += 130;
i++
if(count >= maxCount) {
clearInterval(intervalId);
}
count++;
};
View Replies !
View Related
Problem With Buttons Messing Up
Hey I have a problem with some buttons Im working on in a site. I have the buttons set up right now so when you scroll over them a bar fades in behind them and when you rollout it fades away. Anyway I have about 6 of these buttons lined up horizontaly. It workes fine but when you go over the buttons quickly they lock up in the over position. What is this? I have it so it is a function in an actionscript layer.
Thanks
Fidelity88
View Replies !
View Related
Why Is Flash Messing With My Images?
*Moderator Edit* Do not use profanity in your thread titles...
Well, I`ve had this problem before, but then I could solve the problem with setting the alpha to 99%, but now nothing helps. You can see the bugs in the gallery section, the images will work like links to each gallery content when its finished.
The images are cracked up in a way and looks like they are very low quality. If you could help me out of this, I would be very happy!
lightfountains_WIP
Another thing, the images on the main page is loadig randomly from 5 different swf files, is it possible to add preloaders to them and how?
Thanks!
Andreas
View Replies !
View Related
Flash Messing Up My Images
hey guys, i was making a scroller for my site and i made two little arrows (up and down respectivly) in pixle art in FWMX. i brought it into flash and it looked great, untill i prewiewed it, the arrows are all round and stuff. if you need to see what i mean i will post the SWF. well my question is how do i stop this?
see swf here
View Replies !
View Related
Components Are Messing Up My Preloaders
Does anyone know why after adding the media component the file size (of the component) shows up in every seperate movie cilp and the preloaders don't read correctly anymore?
The code for preloader on the seperatly loaded .swfs looks like this
frame1:
loadpercent = "0%";
loadBytes = "0 of "+Math.round((_parent.getBytesTotal()/1024)*1000)/1000+" Kb";
Frame2:
loadPercent = (Math.floor(_parent.getBytesLoaded()/_parent.getBytesTotal()*100)+"%");
loadBytes = (Math.round((_parent.getBytesLoaded()/1024)*1000)/1000+" Kb of "+Math.round((_parent.getBytesTotal()/1024)*1000)/1000+" Kb total Loaded.");
progressMov.gotoAndStop(int(_parent.getBytesLoaded ()/_parent.getBytesTotal()*100));
if (_parent.getBytesLoaded() == _parent.getBytesTotal()) {
loadPercent = "100%";
loadBytes = (Math.round((_parent.getBytesLoaded()/1024)*1000)/1000+" Kb of "+Math.round((_parent.getBytesTotal()/1024)*1000)/1000+" Kb total Loaded.");
_parent.gotoAndPlay("pade");
stop();
Frame3: gotoAndPlay(2);
It works great until I add those components to the movie, then it adds like 76k to all the seperate files - even ones that don't use them.
The preloader then doesn't read the extra 76k...it just shows up on like 90%
View Replies !
View Related
Help, Firefox Messing Up XML Gallery
I'm using a code I got from kirupa. I basically have an xml gallery, and this resizes to the size of the picture loaded from the xml file. I have multiple xml files, for different categories. I have 5 categories, and I load different xmls for each frame. It works fine in Flash, and in Firefox, but unfortunately, for Safari and Firefox, there's a glitch. What happens is if you switch to another category, instead of getting the dimension of the new picture in the new category, it will get the dimension of the next picture from the current category you're viewing.
To better illustrate it:
Category 1, image 1, 200x200
Category 1, image 2, 300x300
Category 2, image 1, 100x50
Category 2, image 2, 200x70
You're viewing Image 1 category 1, and you decide to go to Category 2, instead of the border resizing to 200x70, the border will resize to 300x300, and yet load the correct picture (200x70). The border follows the dimension of the wrong image, but loads the correct image anyway. It works fine in flash and in IE though. Has anyone encountered this before? Any suggestions?
View Replies !
View Related
Problem With Buttons Messing Up
Hey I have a problem with some buttons Im working on in a site. I have the buttons set up right now so when you scroll over them a bar fades in behind them and when you rollout it fades away. Anyway I have about 6 of these buttons lined up horizontaly. It workes fine but when you go over the buttons quickly they lock up in the over position. What is this? I have it so it is a function in an actionscript layer.
Thanks
Fidelity88
View Replies !
View Related
Why Is Flash Messing With My Images?
*Moderator Edit* Do not use profanity in your thread titles...
Well, I`ve had this problem before, but then I could solve the problem with setting the alpha to 99%, but now nothing helps. You can see the bugs in the gallery section, the images will work like links to each gallery content when its finished.
The images are cracked up in a way and looks like they are very low quality. If you could help me out of this, I would be very happy!
lightfountains_WIP
Another thing, the images on the main page is loadig randomly from 5 different swf files, is it possible to add preloaders to them and how?
Thanks!
Andreas
View Replies !
View Related
Carousel - Logo Messing Up..
Hey guys, I'm having a problem with the carousel. I followed the tutorial exactly and successfully got my logo to move around in an oval just like it should, and it looks great, but then I try to add more than one logo, and they all move around like they should, but the image is SUPER wack.. Say I have 10 images in my carousel. Some show the full gradient masker layer with my refelction on top of it, some show the gradient masker with no reflection at all, and some show the reflection with no gradient masker.. And its not the reflection I should be seeing, Its just the exact, 100% opacity copy of my image. For some reason, my ref.setMask video clip won't work whenever I add more than one image to my carousel. It works perfectly when I leave it at 1 image tho, which confuses me. That was A LOT harder to explain than I thought lol. Any help would be much appreciated and I've skimmed through the forums but haven't found any topics with the same problem...
View Replies !
View Related
Carousel - Messing With Xscale... Almost There...
Hi guys!
I am working with Lee´s carousel and was looking for a way to make the PNG´s thinner as the reach the carousel sides... For my surprise, I´ve managed to do it... at least most of it. Here is the funtion "mover" code:
function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = (this._y - perspective) /(centerY+radiusY-perspective);
this._yscale = s*100;
this._xscale = this._y-centerY; <--------------------------------------------take a look here
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._yscale) + 100);
}
With this adjustment, the PNG´s get thinner as they reach the sides of the carousel... That´s fine. Then, If I click on a PNG, the picturegets tweened and the dynamic text appears, as expected. The problem is that once I click on the selected image to get back to the carousel, it reappears all messed up! Can anyone give me a hand here? I feel that I am close...
Thanks in advance!
Here is the whole code:
import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;
var numOfItems:Number;
var radiusX:Number = 350;
var radiusY:Number = 75;
var centerX:Number = Stage.width / 2;
var centerY:Number = Stage.height / 2;
var speed:Number = 0.05;
var perspective:Number = 130;
var home:MovieClip = this;
theText._alpha = 0;
var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
tooltip._alpha = 0;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var nodes = this.firstChild.childNodes;
numOfItems = nodes.length;
for(var i=0;i<numOfItems;i++)
{
var t = home.attachMovie("item","item"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
t.toolText = nodes[i].attributes.tooltip;
t.content = nodes[i].attributes.content;
t.icon.inner.loadMovie(nodes[i].attributes.image);
t.r.inner.loadMovie(nodes[i].attributes.image);
t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
t.icon._xscale = 35;
t.icon._yscale = 35;
t.r._xscale = 35;
t.r._yscale = 35;
}
}
function over()
{
//BONUS Section
var sou:Sound = new Sound();
sou.attachSound("sover");
sou.start();
home.tooltip.tipText.text = this._parent.toolText;
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
home.tooltip._alpha = 100;
}
function out()
{
delete home.tooltip.onEnterFrame;
home.tooltip._alpha = 0;
}
function released()
{
//BONUS Section
var sou:Sound = new Sound();
sou.attachSound("sdown");
sou.start();
home.tooltip._alpha = 0;
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
t.xPos = t._x;
t.yPos = t._y;
t.theScale = t._xscale;
delete t.icon.onRollOver;
delete t.icon.onRollOut;
delete t.icon.onRelease;
delete t.onEnterFrame;
if(t != this._parent)
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
}
else
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,250,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,250,1,true);
var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,200,1,true);
var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,320,1,true);
var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
theText.text = t.content;
var s:Object = this;
tw.onMotionStopped = function()
{
s.onRelease = unReleased;
}
}
}
}
function unReleased()
{
//BONUS Section
var sou:Sound = new Sound();
sou.attachSound("sdown");
sou.start();
delete this.onRelease;
var tw:Tween = new Tween(theText,"_alpha",Strong.easeOut,100,0,0.5,true);
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
if(t != this._parent)
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,100,1,true);
}
else
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,100,t.theScale,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,100,t.theScale,1,true);
var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,t.xPos,1,true);
var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,t.yPos,1,true);
tw.onMotionStopped = function()
{
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
t.icon.onRollOver = Delegate.create(t.icon,over);
t.icon.onRollOut = Delegate.create(t.icon,out);
t.icon.onRelease = Delegate.create(t.icon,released);
t.onEnterFrame = mover;
}
}
}
}
}
function moveTip()
{
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
}
xml.load("icons.xml");
function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = (this._y - perspective) /(centerY+radiusY-perspective);
this._yscale = s*100;
this._xscale = this._y-centerY;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._yscale) + 100);
}
this.onMouseMove = function()
{
speed = (this._xmouse-centerX)/2500;
}
View Replies !
View Related
Javascript In GetURL Is Messing With My Head Man
Im using this command:
Code:
on(release) {
getURL("javascript:window.open('links.html?SearchType="+_root.Type+"','','width=550,height=400');");
}
to open a new window and pass in a parameter, the problem is that the flash movie in my old window changes to a blank screen with the text '[object]'. Is there any way I can stop this from happening?
Thanks people
View Replies !
View Related
Help With Htmltext And Hand Cursor Messing Up
I have a movie. There is a dynamic text field with html text. The movie retrieves an XML document and parses it and turns it into html text that flash can understand. There are links within this text field. Links that call a function which goes to another section of the website. <a href="asfunction:gotoPos,3>click here</a> is an example of a link. Going to a new section of the website just means the current text on screen is replaced with text from a different xml file. So the current text goes away and new text comes up. EVERYTHING WORKS FINE EXCEPT: When the link to go to a new section is clicked, the hand cursor stays on screen even after the link that was clicked is no longer there. I guess the mouse just doesn't refresh itself to know that the link is no longer there and there shouldnt be a hand cursor. I have noticed this with other things too. In a movie i made, when a button is clicked i had it turn gray and disable. Signifying that that was the option chosen. The hand cursor would stay up until the mouse was moved. This isnt a huge problem, but it would be a little better if the mouse changed back to a hand cursor when it is clicked. I like to have complete control over my movies, and it just bugs me when there is something i cannot do in flash.
View Replies !
View Related
WAAAAH Preloader Messing Up My Buttons?
nearing completion of my site, added a preloader (downloaded one as an extension, used it before so guess its ok) and now none of my links work. i added a scene before each of my movies to be loaded with the loaded (its just 1 frame) and i remember before i had to move my button targets forwards one frame for this (ie gotoAndplay 15 becomes gotoAndplay 16...) to compensate. wouldnt work this time tho. also tried naming my frames and targeting them this way. anyone else had simialr problems? any other ways you can think of sorting it? have the .flas if anyones interested?
thx anyways
lev
View Replies !
View Related
Pixel Fonts Still Messing Up In ScrollPane
I'm using a nice pixel font on my site, in the main site, no problems.
But, i have a scrollpane which i load in external swf's to, but when these come in the fonts are a mess, all blurry as if i've got the positions not on a whole number.
All positions are perfect integers, the scrollpane, the content mc linked to it, and in the external swf they're all fine.
Anyone had this problem or know of any possible fixes?
Cheers,
Robsco!
View Replies !
View Related
Flash Messing With Image Quality
Hi all
I am having spot of trouble with a piece of flash I am working on, this one has really got me bothered.
I add a shape drawn in free hand (a circle) and its fine. If I make a second key frame further along the time line the quality of the image become horrid (all jagged edges)
I have checked publish settings, and jpg quality is 100% and quality is best.
Any help would be greatly appreciated thanks
View Replies !
View Related
Math.round Is Messing Things Up
v: Flash MX
I can't make this work. Can anyone help
Click here and go to the portfolio section
The mc sectionDisk (which stops below the section you're in)uses this script:
sectionDisk._x = Math.round(sectionDisk._x+(sectionDiskX-sectionDisk._x)/nSpeed);
'sectionDiskX' takes it's value from the X position of the section button (eg) Broadcast, Internet, whatever, but the value it generates for sectionDisk._x changes depending on what button you come from.
So if you're in 'Other', and you click 'Broadcast', sectionDisk._x will be a different value than if you're in 'Kiosk' and then you click 'Broadcast'
This would be OK, but the number strip (which contains the links to the individual projects) needs to sit exactly centered in the disk - and it wont.
I know it's a problem with the way Math.round modifies the numbers, but I can't make it work. Can anyone help?
View Replies !
View Related
Problem With Url On Button Messing Up Rollover
Okay to start with I'm not a flash programmer but this guy left me in a lurch and I had to add the url's to the links myself, the problem is that it messes up the rollover action.
Here is the original: http://www.cecvp.com/header5.swf
Here is the version with the urls put on the links: http://www.cecvp.com/header5_mod.swf
There are other things I changed but ignore that, just focus on the behavious of the navigation links (home, about us, etc). In the second version the rollover stopped working.
The process i used to add the url was to double click until i got to symbol 18 at which point i would double click on each link the select it then enter the url where the link symbol is in the properties window.
View Replies !
View Related
Tween Function Is Messing Up My Width
Hello All,
I posted this over at the Adobe Flash Forum, but I didn't get any kind of reply. Though I would try here as well.
I am using Flash 8 Professional for a real-world pop-up application. I have isolated a tweening problem that I can not seem to fix and I need to call in the experts. I have created a very small sample app which demonstrates my problem.
My stage is 500 x 500.
I've got a movie clip called my_mc which contains a 50 x 50 square. On the stage, it is located in the lower left-hand corner (the box is registered in the lower left corner as well).
I've got two other movie clips called FindEdge_x and FindEdge_y. They consist of a vertical line and a horizontal line respetively. They will be dynamically positioned to the top edge (FindEdge_y) and right edge (FindEdge_x) of the box after a tween has been applied to it.
When I roll over the my_mc movieclip, I am tweening it to a random height and width and then repositioning the findedgex and findedgey lines accordingly.
Am am making the following assumptions ::
The line corresponding to the top edge of the box (FindEdge_y) = my_mc._y - my_mc._height
The line corresponding to the right edge of the box (FindEdge_x) = my_mc._x + my_mc._width
The problem I am having is this -- the width and height properties of my_mc contain a level of error after the tween has been applied. The greater the distance of the tween, the greater the level of error. This makes positioning elements to the top-right corner of the box (ie, a close "X" button) nearly impossible.
The code for my sample application is as follows ::
========================================
import mx.transitions.Tween;
import mx.transitions.easing.*;
my_mc.onRollOver = function():Void
{
tmpTween = new Tween( my_mc, "_width", None.easeNone, 50, 50+random(400), 6, false );
tmpTween.onMotionFinished = function()
{
findedgex._x = my_mc._x + my_mc._width;
}
tmpTween = new Tween( my_mc, "_height", None.easeNone, 50, 50+random(400), 6, false );
tmpTween.onMotionFinished = function()
{
findedgey._y = my_mc._y - my_mc._height;
}
}
my_mc.onRollOut = function():Void
{
tmpTween = new Tween( my_mc, "_width", Strong.easeOut, my_mc._width, 50, 6, false );
tmpTween.onMotionFinished = function()
{
findedgex._x = my_mc._x + my_mc._width;
}
tmpTween = new Tween( my_mc, "_height", Strong.easeOut, my_mc._height, 50, 6, false );
tmpTween.onMotionFinished = function()
{
findedgey._y = my_mc._y - my_mc._height;
}
}
findedgex._x = my_mc._x + my_mc._width;
findedgey._y = my_mc._y - my_mc._height;
=============================================
1) Is this a problem with my code or with the Tween class? (I have tried various easings and they all yeild the same error-result)
2) Any ideas how I can counteract (ie hack) the problem away?
Thanks in advance for your help!
-Tim
View Replies !
View Related
Sql Join Messing Up Returned Results
Hi there.
I have a remoting app in which i use PHP/amfphp to get data into my app.
Now in my PHP I have the following SQL query performed to create a join on 2 tables...
Code:
SELECT dkcms_photo.*, dkcms_profiles.uFname FROM dkcms_photo LEFT JOIN dkcms_profiles ON dkcms_profiles.uId = dkcms_photo.phUsername ORDER BY phMod DESC
Now when I test the query (by running at the mysql command line), all the data is returned as expected.
I then test the php in the amfphp service browser and again - same thing all data is returned as expected.
Now - in flash....
When I try to access the one column name returned by the join - I get undefined. So I then used the "getColumnNames" function (and trace the results) to see what is actually being listed in flash.... Well as expected, none of the columns from the second table are actually making it into flash.
Does anyone have any ideas?
View Replies !
View Related
Glow Filter Colour Messing Up
Hi all,
I have a glow filter that glows around a movie clip when i click on it. The glow colour is black and it shows fine when the colour of the movie clip is the standard colour. however when i perform a colour transform on it the glow just appears as the colour of the transform. Is there a way i can force the glow to be the black colour i want it to be? help would be very much apprechiated this has been doing my nut in for like 2 days now. Thanks in advance.
Regards
Mark
View Replies !
View Related
|