Co-ordinate System.
Can anyone give me a quick overview of the vector/co-ordinate system of the stage window and the surrounding area? Which is X and Y etc and where position 0,0 is?
(Do you have to use negative numbers to position things on the stage?)
Regards
Martin.
FlashKit > Flash Help > Flash Newbies
Posted on: 09-20-2004, 01:10 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Co-ordinate Lines
Hi,
I'm making a map which uses co-ordinates in degrees, and "north/south" or "east/west".
So I have 2 input boxes (for the co-ordinate numbers (one is x, one is y)), and 2 drop-down lists.
So say the user inputs "10 south" and "15 east",
I want the 'x' line to move 10 'degrees' down, and the 'y' line to move 15 'degrees' right.
Just say 1 degree is 2 pixels.
Can anyone help me with the actionscript involved??
AS Co-Ordinate Spin
Does anyone have any idea how to make and movie clip rotate depending on the mouse co-ordinates?
any help would be great.
Thanks
Abstuce
Mouse Co-ordinate Tracking
Ok here is the thing. I have written a small piece of code.
Code:
this.onEnterFrame = function() {
x_txt.text = this._xmouse;
y_txt.text = this._ymouse;
};
that tracks the mouse co-ordinates. It works fine while the mouse is within the bounds of the embeded flash movie. when you move your mouse outside of the flash movie and onto any other part of the screen it stops working. Which I guess makes a little bit of sense, except that if you hold down the mouse while moving elsewhere on the screen it works just fine.
anyone come across this before or know a work around so that you can track the co-ordinates of the mouse no matter where it is on the page (and without having to hold down the mouse button)?
[edit]
Actually. Just discovered that it only tracks with the mouse down on a mac, not on a pc.
How To Find Out The Co-ordinate Of An Object On A Grid?
Im doing an activty where user can move the object to any position of a 12 x 12 grid. In order to move the object, user can click on any particular coordinate, then the object will appear there. So If I want to find out the new co-ordinate of the object on a grid, what should be done?
[MX04] Drop Down On Mouse Co-ordinate
Hi I having been searching tirelessly for a script that creates a drop down or pop up menu that will activate based on the mouses proximity.
I had originally created a rollover menu with an invisible roll out button so that it would pop back up but this is abit messy and doesnt function as smoothly as an actionscripted method.
Basically when the mouse is close to the menu it should fall down and when it moves away a certain distance is should move back up.
Thanks.
LocalToGlobal Co-ordinate Hell Hole
Hi people - am having some some hell. I was trying to move a box with the mouse - it was flickering between positions - the only way I have been able to get it be in the correct position is with the following code :-
Quote:
private function popIt() : void {
if(_pop)removeChild(_pop);_pop=null;
_pop=new PopUp();
addChild(_pop);
_pop.init("click to start",63,20);
_pop.addEventListener(Event.ENTER_FRAME,repos);
}
private function repos(e:Event) : void {
var bound:Rectangle=_pop.getBounds(_pop);
var clickPoint:Point = new Point(mouseX,mouseY);
_pop.x=clickPoint.x-bound.x;
_pop.y=clickPoint.y-bound.y;
}
As you can see I am having to subtract the bounds etc. This is madness. I have been trying for hours to get the localToGlobal to work but absolutely no success - the popUp always ends up in the wrong spot. I am tearing my hair out.
Cheers,
audas.
How To Find Out The Co-ordinate Of An Object On A Grid?
Im doing an activty where user can move the object to any position of a 12 x 12 grid. In order to move the object, user can click on any particular coordinate, then the object will appear there. So If I want to find out the new co-ordinate of the object on a grid, what should be done?
What Does System.capabilities.language Return On Your System?
I am working on a multi-lingual web site that automatically detects the user's OS or browser language by using System.capabilities.language .
Since I am running a german OS/browser, this returns 'de' in my case, but I wonder what it returns on other systems (english, french, spanish etc.)
To find this out, please copy and paste this code into a Flash doc and see what it says:
trace( System.capabilities.language );
Thx!
Mike
System.pause(); And System.resume();
I've been looking for a simple way to pause everything inside the flash player when a user clicks on a pause button. I found what I thought to be a solution by running System.pause() method. This sounds funny but the problem is that this method does exactly what it's supposed to do, meaning it pauses EVERYTHING.
There is another System method call resume(). But with the entire player pause, how is one supposed to call this method when the pause button is clicked a second time?
This is what I thought about using:
ActionScript Code:
public function pauseSystem(evt:MouseEvent):void {
if(!sytemPaused){
sytemPaused = true;
System.pause();
} else {
sytemPaused = false;
System.resume();
}
}
But once the pause() method runs, nothing is clickable. I've got tons of event listeners and things happen all at once, so I'd rather not have to go through removing and adding event listeners every time the user clicks a pause button. Any ideas? Thanks.
I Really Like This NAV System
I really like this nav system and would like to recreate it.
http://www.frontmedia.co.uk/
If some one could point in the right direction that would be great.
thanks
readyornot
Tab System?
How can I make a tab system which loads html files in a specific tab?
Suppose I create a Flash movie clip containing a tab system and on each tab the HTML file is loaded in a frame just below the frame housing the Tab movie clip while bringing the appropriate tab to the foreground. Is there a way to change the HTML file on a tab and/or bring up a different tab to the foreground by sending the HTML linked URL to the Flash movie via JavaScript or something like that. I'm trying to send/translate a variable with a URL as a value to a movie clip and then load that URL's file onto the relevant tab's "page".
Thanks for any help or hints...
jruben
How To Do A F1 Nav System
hi,
i want to do a navigation system similar to the F1 system (the one on the right side).
http://www.f1play.com
i got heaps of links to show in a list one after the other, so i think this would be a nice solution... could anyone give me a hint?
cobo
Help With Map Pin System
Well here is the deal.
I have a map of my country (Greece) and i want to place pins on it to point out the places i have been, links to photos etc, files etc.
I want you to guide me at how to make my programm to remember where i've placed those pins. Should i save the x,y location of the every pin to a table at a database for example and fetch them at loading?
Help With A Tab System
Hey all.. I'm trying to make a tab system and I'm having a problem with clicking on one tab, and then having that tab call a function that resets the appearance of any other tabs that are "on" to "off" Here is basically what I have here:
It all works, but I don't know how to have All instances of the Tabclass respond to the RESET_BUTTON event. I can't seem to figure out how to address the displayList or?????
Thanks in Advance!
C
Tabclass.as
Code:
package com.mysite.testing {
import com.mysite.testing.DisplayContent;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.text.TextFormatAlign;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.events.*;
public class TabClass extends Sprite{
private var _totalTabs:Number;
public function TabClass(pos:Number, totalTabs:Number):void {
_totalTabs = totalTabs;
var dataLoader:Sprite = new Sprite();
dataLoader.name = "dl"+pos;
if(pos==0){
dataLoader.graphics.lineStyle(1, 0xcccccc, 1, true);
dataLoader.graphics.beginFill(0xcccccc, 1);
}
else{
dataLoader.graphics.lineStyle(1, 0xa9a9a9, 1, true);
dataLoader.graphics.beginFill(0xa5a5a5, 1);
}
dataLoader.graphics.drawRect(0, 0, 114, 23);
dataLoader.graphics.endFill();
dataLoader.addEventListener(MouseEvent.CLICK, clickMe);
dataLoader.addEventListener(ResetButtonEvent.RESET_BUTTON, buttonReset);
var boxName:TextField = new TextField();
boxName.text = "Testing";
boxName.width = 110;
boxName.height = 25;
boxName.mouseEnabled = false;
boxName.wordWrap = true;
var boxNameFormat:TextFormat = new TextFormat("Trebuchet MS", 11, 0xffffff, true, null, null, null, null, TextFormatAlign.CENTER);
boxName.setTextFormat(boxNameFormat);
dataLoader.mouseEnabled = true;
dataLoader.buttonMode = true;
trace("TabClass working");
var displayContent:DisplayContent = new DisplayContent(10);
dataLoader.addChild(boxName);
addChild(dataLoader);
}
private function clickMe(evt:MouseEvent):void{
evt.target.dispatchEvent(new ResetButtonEvent());
evt.target.graphics.clear();
evt.target.graphics.lineStyle(2, 0xCCCCCC, 1, true);
evt.target.graphics.beginFill(0xCCCCCC, 1);
evt.target.graphics.drawRect(0, 0, 114, 23);
evt.target.graphics.endFill();
}
private function buttonReset(evt:ResetButtonEvent):void{
trace("halp");
}
}
}
ResetButtonEvent.as
Code:
package com.mysite.testing{
import flash.events.*;
public class ResetButtonEvent extends Event{
public static const RESET_BUTTON = "resetButton";
public function ResetButtonEvent():void{
super(RESET_BUTTON);
}
}
}
AS3 - Tab System
Hey all.. I'm trying to make a tab system and I'm having a problem with clicking on one tab, and then having that tab call a function that resets the appearance of any other tabs that are "on" to "off" Here is basically what I have here:
It all works, but I don't know how to have All instances of the Tabclass respond to the RESET_BUTTON event. I can't seem to figure out how to address the displayList or?????
Thanks in Advance!
C
Tabclass.as
Code:
package com.mysite.testing {
import com.mysite.testing.DisplayContent;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.text.TextFormatAlign;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.events.*;
public class TabClass extends Sprite{
private var _totalTabs:Number;
public function TabClass(pos:Number, totalTabs:Number):void {
_totalTabs = totalTabs;
var dataLoader:Sprite = new Sprite();
dataLoader.name = "dl"+pos;
if(pos==0){
dataLoader.graphics.lineStyle(1, 0xcccccc, 1, true);
dataLoader.graphics.beginFill(0xcccccc, 1);
}
else{
dataLoader.graphics.lineStyle(1, 0xa9a9a9, 1, true);
dataLoader.graphics.beginFill(0xa5a5a5, 1);
}
dataLoader.graphics.drawRect(0, 0, 114, 23);
dataLoader.graphics.endFill();
dataLoader.addEventListener(MouseEvent.CLICK, clickMe);
dataLoader.addEventListener(ResetButtonEvent.RESET_BUTTON, buttonReset);
var boxName:TextField = new TextField();
boxName.text = "Testing";
boxName.width = 110;
boxName.height = 25;
boxName.mouseEnabled = false;
boxName.wordWrap = true;
var boxNameFormat:TextFormat = new TextFormat("Trebuchet MS", 11, 0xffffff, true, null, null, null, null, TextFormatAlign.CENTER);
boxName.setTextFormat(boxNameFormat);
dataLoader.mouseEnabled = true;
dataLoader.buttonMode = true;
trace("TabClass working");
var displayContent:DisplayContent = new DisplayContent(10);
dataLoader.addChild(boxName);
addChild(dataLoader);
}
private function clickMe(evt:MouseEvent):void{
evt.target.dispatchEvent(new ResetButtonEvent());
evt.target.graphics.clear();
evt.target.graphics.lineStyle(2, 0xCCCCCC, 1, true);
evt.target.graphics.beginFill(0xCCCCCC, 1);
evt.target.graphics.drawRect(0, 0, 114, 23);
evt.target.graphics.endFill();
}
private function buttonReset(evt:ResetButtonEvent):void{
trace("halp");
}
}
}
ResetButtonEvent.as
Code:
package com.mysite.testing{
import flash.events.*;
public class ResetButtonEvent extends Event{
public static const RESET_BUTTON = "resetButton";
public function ResetButtonEvent():void{
super(RESET_BUTTON);
}
}
}
Help With A Tab System
Hey all.. I'm trying to make a tab system and I'm having a problem with clicking on one tab, and then having that tab call a function that resets the appearance of any other tabs that are "on" to "off" Here is basically what I have here:
It all works, but I don't know how to have All instances of the Tabclass respond to the RESET_BUTTON event. I can't seem to figure out how to address the displayList or?????
Thanks in Advance!
C
Tabclass.as
Code:
package com.mysite.testing {
import com.mysite.testing.DisplayContent;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.text.TextFormatAlign;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.events.*;
public class TabClass extends Sprite{
private var _totalTabs:Number;
public function TabClass(pos:Number, totalTabs:Number):void {
_totalTabs = totalTabs;
var dataLoader:Sprite = new Sprite();
dataLoader.name = "dl"+pos;
if(pos==0){
dataLoader.graphics.lineStyle(1, 0xcccccc, 1, true);
dataLoader.graphics.beginFill(0xcccccc, 1);
}
else{
dataLoader.graphics.lineStyle(1, 0xa9a9a9, 1, true);
dataLoader.graphics.beginFill(0xa5a5a5, 1);
}
dataLoader.graphics.drawRect(0, 0, 114, 23);
dataLoader.graphics.endFill();
dataLoader.addEventListener(MouseEvent.CLICK, clickMe);
dataLoader.addEventListener(ResetButtonEvent.RESET_BUTTON, buttonReset);
var boxName:TextField = new TextField();
boxName.text = "Testing";
boxName.width = 110;
boxName.height = 25;
boxName.mouseEnabled = false;
boxName.wordWrap = true;
var boxNameFormat:TextFormat = new TextFormat("Trebuchet MS", 11, 0xffffff, true, null, null, null, null, TextFormatAlign.CENTER);
boxName.setTextFormat(boxNameFormat);
dataLoader.mouseEnabled = true;
dataLoader.buttonMode = true;
trace("TabClass working");
var displayContent:DisplayContent = new DisplayContent(10);
dataLoader.addChild(boxName);
addChild(dataLoader);
}
private function clickMe(evt:MouseEvent):void{
evt.target.dispatchEvent(new ResetButtonEvent());
evt.target.graphics.clear();
evt.target.graphics.lineStyle(2, 0xCCCCCC, 1, true);
evt.target.graphics.beginFill(0xCCCCCC, 1);
evt.target.graphics.drawRect(0, 0, 114, 23);
evt.target.graphics.endFill();
}
private function buttonReset(evt:ResetButtonEvent):void{
trace("halp");
}
}
}
ResetButtonEvent.as
Code:
package com.mysite.testing{
import flash.events.*;
public class ResetButtonEvent extends Event{
public static const RESET_BUTTON = "resetButton";
public function ResetButtonEvent():void{
super(RESET_BUTTON);
}
}
}
ResetButtonEvent.as
Code:
package com.mysite.testing{
import flash.events.*;
public class ResetButtonEvent extends Event{
public static const RESET_BUTTON = "resetButton";
public function ResetButtonEvent():void{
super(RESET_BUTTON);
}
}
}
3d Navigational System
Can someone help with the scripting to make a 3d navigational menu.
Check out http://www.fifthrotation.com to see what I'm talking about. Click on the menu and the 3d navigational system is the 6th button.
I have some sort of idea of how to work something like this out, but I'm looking for suggestions. I'm not that good at math, and I can only assume there are tons of math equations involved.
Thanks,
a..
Navigation System - Help
How did they do that? Check out http://www.greekislandstoronto.com
How did they do the effect that is created whenever you go from one area to another in the site - via the navigation? The images scroll/move depending on what link you choose.
Is that a long clip that has goto and stop actions that correlate to the navigation links????
Any idea how it is done? Any tutorial links to how that is done? Can you supply a tutorial?
I would like to use that effect in my portfolio site.
Score System
Can anyone tell me how to create a score system? I really need one. Thanx
Please Help With My Navigation System
Hi I was wondering if someone could help me with my navigation system? I will try and explain my problem as clearly as possible. I have a navigation bar (which is a Movie Clip in the main timeline). This navigation bar controls the whole site and allows the user to enter certain sections of the site. Now when a user clicks on a section 1, he/she enters the section and is shown a text that fades in. Now is the tricky part, which I am having trouble with. When the user leave that section of the site to go to another section,
e.g. I am in section 1 and I want to go to section 4. So I click on button no.4 in the navigations bar, which then takes me to section 4.
Now when the user leaves a section I would like the text/image that faded in when entering a section to fade out when leaving. Does this seem clear enough. So when you enter a section you have a text or an image fading in, then when you leave a section I need the text or image to fade out. But it has to work for every section in the site,
e.g. I am in section 2 then go to 3
section 1 then go to 3
section 4 then go to 3
section 2 then go to 1
section 3 then go to 2
etc.....
I have thought about it, but I don't have much experience with flash. And having a goto action at the end of the section will not work cause it will only go to one section.
e.g. in the end of section 1 you have a gotoAndPlay ("section 2"); action
This is not the solution because if I want to go to section 4, the script will always send me to section 2.
Navigation system: Button 1, 2, 3, 4
----------------
| [1] [2] [3] [4] |
----------------
Main Timeline:
--[section 1]-----------------------------------------------
-------------[section 2]------------------------------------
------------------------[section 3]-------------------------
-----------------------------------[section 4]--------------
This is a simple diagram. If I am in section 1 I need to be able to jump to any section and have the text or image fade out when I leave section 1, then on entering the next section I need the text or image fade in. And I need this to work for any section I enter.
I am very grateful for any help given.
Flash Akira.
System Clock
How do I use action script to simply change a photo once every hour according to the system clock?
Help With Menu System Please
I have posted an image of what I want my navigation to look like here http://www.fuzzylogik.ws/nav_example.jpg
What i need to make happen:
1.When you click on any box, they all move clockwise to the next position until the item clicked is located in the "hotspot"
2.They don't need to tween between the locations, just move to the next spot until the selected item is in the "hotspot"...kinda like chasing christmas lights
My brain is aching from trying to figure this one out so any help would be greatly appreciated! If you know of a FLA posted in the movies section that does something like this please let me know...I had no luck finding any.
Thanks,
Chris Brixey
[FUZZY.LOGIK]
A Menu System
http://www.nebulouscore.com/examples/NCNavmenu.html (.fla)
http://www.nebulouscore.com/examples/newlevel.as
http://www.nebulouscore.com/examples/CommandEngine.as
http://www.nebulouscore.com/examples/NavMenu.xml
Hardcore code. Enter at your own risk.
System Capabilities
I want to use the system.capabilities object to get the screenresolutionX and screenresolutionY.
Then I want to use these to scale my movie accordingly. Now how is that to be done?
Menu System
Hi,
I'm fairly new to flash, but was wondering if anybody out there with a slower machine could take a look at this for me:
http://www.geocities.com/thurstonis/...type.test.html
It's my first work with prototypes and I'm hoping that it was coded well enough not to bog down on slower computers.
Also, any tips on optimizing the code would be excellent.
Thanks!
Code:
onClipEvent (load) {
menuState = new Array("n", "sr", "fr", "sw", "fw");
currState = menuState[0];
// coordinates for "sr", [0] = x, [1] = y
sideRoofX = new Array(-112.3, -133, -131.1, -136.7, -133.1);
sideRoofY = new Array(-62.5, -79, -69.7, -71.8, -64.5);
frontWallX = new Array(-66.1, 1.4, -101.7, 2.7, -104.0);
frontWallY = new Array(-10.4, -26.8, -8.8, -18, -8.9);
sideWallX = new Array(-98.1, -111.1, -114.6, -112.6, -118.9);
sideWallY = new Array(-6.3, -11.3, 11.2, -12.4, -1.5);
frontRoofX = new Array(-75.4, 3, -117.3, 5.1, -122.5);
frontRoofY = new Array(-62.1, -78.7, -70.3, -71.9, -65);
myButton = function () {
for (i = 0; i < this.myX.length; i++) {
temp = new Object();
temp.x = this.myX[ i ];
temp.y = this.myY[ i ];
_parent.localToGlobal(temp);
this._parent.globalToLocal(temp);
this.myX[ i ] = temp.x;
this.myY[ i ] = temp.y;
}
this.gotoAndStop(menuState[myState]);
this._x = this.myX[_global.currFrame];
this._y = this.myY[_global.currFrame];
this.myState = _global.currFrame;
};
myButton.prototype = new MovieClip();
myButton.prototype.onEnterFrame = function() {
if (_global.hideButtons) {
this._visible = false;
}else{
this._visible = true;
}
if (this.myState != _global.currFrame) {
this.myState = _global.currFrame;
if (this.over) {
this.gotoAndStop(menuState[this.myState] + 1);
} else {
this.gotoAndStop(menuState[this.myState]);
}
this._x = this.myX[_global.currFrame];
this._y = this.myY[_global.currFrame];
}
};
myButton.prototype.onRollOver = function() {
this.over = true;
this.gotoAndStop(menuState[this.myState] + 1);
_parent.gotoAndPlay(menuState[_global.currFrame] + "-" + menuState[this.myName]);
};
myButton.prototype.onRollOut = function() {
this.over = false;
this.gotoAndStop(menuState[this.myState]);
//_parent.gotoAndPlay(menuState[_global.currFrame] + "-n");
};
myButton.prototype.onRelease = function() {
trace("I am " + this);
trace("My parent is " + this._parent);
trace("released");
trace("x=" + this._x);
trace("y=" + this._y);
trace("My X should be" + this.myX[_global.currFrame]);
trace("My Y should be" + this.myY[_global.currFrame]);
};
Object.registerClass("sideRoof", myButton);
Object.registerClass("frontWall", myButton);
Object.registerClass("sideWall", myButton);
Object.registerClass("frontRoof", myButton);
attachMovie("sideRoof", "srBUT", 100, {myName:1, myX:sideRoofX, myY:sideRoofY});
attachMovie("frontWall", "fwBUT", 101, {myName:4, myX:frontWallX, myY:frontWallY});
attachMovie("sideWall", "swBUT", 102, {myName:3, myX:sideWallX, myY:sideWallY});
attachMovie("frontRoof", "frBUT", 103, {myName:2, myX:frontRoofX, myY:frontRoofY});
}
Archiving System
hi
i am making an archiving system soon.
does anyone know where there a tuts or .fla's for it?
does anyone know much about it or advice
i could do with some help
cheers
System.properties
Has anybody out there had some experience with the new system.properties object?
Navigation System
hey,
im trying to create as navigation in which there are 4 buttons on the left, and a button on the right.
the button on the right is telling you where u r.
when u click on one of the buttons of the left, it plays a short movie of the button being moved over to the right, over the previous button on the right. The space where the button on the left was fades to show the button that was on the right.
heres an example: your at the home page and it says "home" on the right. The buttons on the left say "links", "pharses","poetry" an "jokes"
when u click on "links" a movie shows the links button being moved over the "home" button covering it.
where the "links" button was the home button fades in.
i want it to work for all of the buttons.
what would the actionscript be????
im very new at actionscript and have no idea what i would write
help
thanx a lot
PJ
System.ShowSettings();
O.K. Some undocumented features of Flash MX. Don't know if this has been
discussed earlier or not..
In the Macromedia's documentation they have given the System object.
There are four main pats of the system object.
1) Security
2) ShowSettings
3) Product
4) Capabilities
The Security and Capabilities are documented by Macromedia, but not the
Product and ShowSettings. Product, we have talked of earlier.
ShowSettings is a simple method which when called opens the settings dialog
box for the user where he can alter the settings of the microphone, camera,
etc.
You can call the method by simply writing.
System.ShowSettings();
Warm regards,
Pavan
System.ShowSettings()
O.K. Some undocumented features of Flash MX. Don't know if this has been
discussed earlier or not..
In the Macromedia's documentation they have given the System object.
There are four main pats of the system object.
1) Security
2) ShowSettings
3) Product
4) Capabilities
The Security and Capabilities are documented by Macromedia, but not the
Product and ShowSettings. Product, we have talked of earlier.
ShowSettings is a simple method which when called opens the settings dialog
box for the user where he can alter the settings of the microphone, camera,
etc.
You can call the method by simply writing.
System.ShowSettings();
Warm regards,
Pavan
System.Product();
Now comes System.product(); - The undocumented feature.
Put the following code into a Flash MX movie and generate the SWF.
var foo = new System.Product("bar");
foo.download();
you will get a message saying: "To install this service you must install Macromedia Flash Central. Would you like to install it now?". When I click "yes". It says "Couldn't write the application to the hard disk. Please verify the hard disk is available and try again".
Done? O.k. now the next step. If you are using Windows 2000. Check the Application Data Folder. C:Documents and SettingspavanApplication DataMacromediaFlash Playerwww.macromedia.cominar
Guess what happened??? Macromedia Flash is looking for bar.exe to launch!! i.e. if bar.exe was present in the folder it would launch it.
Now try the next example:
Create a directory under Application DataMacromediaFlash Playerwww.macromedia.comin
otepad i.e. name it as notepad and place notepad.exe in this folder. Notepad.exe is present in win32 folder. Now write the following code…
var x = new System.Product("notepad");
trace(x.IsInstalled());
trace(x.Launch());
Embed this swf in a browser and launch it… What happened?? It opened the notepad.exe…. Now isn’t that interesting?
The sample files are attached. I haven’t been able to take this any further. What does Macromedia want to do? Allow users to download exe’s from any site, download them and install them and run them? What is Flash Central? There are various questions unanswered! Any body making a breakthrough would be a welcome.
Login System
Ok say you go to my web page and your looking around only to find that you CAN"T download anything? every ware there is a download it say you need to login in oder to download so you go and reaster and login and POW you can download stuff.
How can i do this?
Menu System
Hey, i was wondering if you could tell me how to create a system where u have 3 ovals and they are overlapping. If you click say the one on the bottom it will move to the front and the other two will move under it. (Also i would like the alpha to change....top one = 100%, 2nd one = 75%, 3rd one = 50%) Thanks for your help! - Jeff
3D Menu System
hi, this is my first post on this board and am a novice user of flash, i've done a bit of c++ but am eager to learn.
i've been playing about with a few of the tutorials and i came across the very well written 3d flower tutorial and low and behold managed to get it working. you can see my results at my homepage . anyway, i was thinking of useing it in a project at collage as the menu system in a report, i.e. spin it around and choose an arm to go to each page, i know its not the best for ease of navigation but the lecturer was suitably impressed and hinted if i got it working it would be worth my while.
now to my problem, the code is quite complicated and its not really like anything i've done before, its out of the scope of the lecturer at collage so i've been haveing a bash at it myself. heres the code:
Code:
Points = 11;
Lines = 10;
Viewport = 500;
rad = (3.14*2)/360;
line = new Array(Lines);
vertex = new Array(Points);
fscommand ("fullScreen", true);
for (i=0; i != Lines; i++) {
wire.DuplicateMovieClip("l" add i, i);
line[i] = eval("l" add i);
}
for (i=0; i != Points; i++) {
point.DuplicateMovieClip("v" add i, (Lines*2)+i);
vertex[i] = eval("v" add i);
}
vertex[0].x = 0;
vertex[1].x = -100;
vertex[2].x = -150;
vertex[3].x = -150;
vertex[4].x = 0;
vertex[5].x = 100;
vertex[6].x = 150;
vertex[7].x = 100;
vertex[8].x = 150;
vertex[9].x = 0;
vertex[10].y = 0;
vertex[0].y = 0;
vertex[1].y = -100;
vertex[2].y = 0;
vertex[3].y = 100;
vertex[4].y = 150;
vertex[5].y = 100;
vertex[6].y = 0;
vertex[7].y = -100;
vertex[8].y = -150;
vertex[9].y = 0;
vertex[10].y = 0;
vertex[0].z = 0;
vertex[1].z = -100;
vertex[2].z = 0;
vertex[3].z = 100;
vertex[4].z = 0;
vertex[5].z = 100;
vertex[6].z = 0;
vertex[7].z = -100;
vertex[8].z = 0;
vertex[9].z = -150;
vertex[10].z = 150;
line[0].a = 0;
line[0].b = 1;
line[1].a = 0;
line[1].b = 2;
line[2].a = 0;
line[2].b = 3;
line[3].a = 0;
line[3].b = 4;
line[4].a = 0;
line[4].b = 5;
line[5].a = 0;
line[5].b = 6;
line[6].a = 0;
line[6].b = 7;
line[7].a = 0;
line[7].b = 8;
line[8].a = 0;
line[8].b = 9;
line[9].a = 0;
line[9].b = 10;
function Rotate (x, y, z) {
radx = rad*x;
rady = rad*y;
radz = rad*z;
for (i=0; i != Points; i++) {
vertex[i].x1 = vertex[i].x;
vertex[i].y1 = (Math.cos(radx)*vertex[i].y)-(Math.sin(radx)*vertex[i].z);
vertex[i].z1 = (Math.sin(radx)*vertex[i].y)+(Math.cos(radx)*vertex[i].z);
vertex[i].x2 = (Math.cos(rady)*vertex[i].x1)-(Math.sin(rady)*vertex[i].z1);
vertex[i].y2 = vertex[i].y1;
vertex[i].z2 = (Math.sin(rady)*vertex[i].x1)+(Math.cos(rady)*vertex[i].z1);
vertex[i].x3 = (Math.cos(radz)*vertex[i].x2)-(Math.sin(radz)*vertex[i].y2);
vertex[i].y3 = (Math.sin(radz)*vertex[i].x2)+(Math.cos(radz)*vertex[i].y2);
vertex[i].z3 = vertex[i].z2;
}
}
function toScreen () {
for (i=0; i != Points; i++) {
vertex[i].dx = (vertex[i].x3*viewport)/(vertex[i].z3+600)+350;
vertex[i].dy = (vertex[i].y3*viewport)/(vertex[i].z3+600)+262.5;
}
}
function render () {
for (i=0; i != lines; i++) {
with (line[i]) {
_visible = true;
_x = vertex[line[i].a].dx;
_y = vertex[line[i].a].dy;
_xscale = vertex[line[i].b].dx-vertex[line[i].a].dx;
_yscale = vertex[line[i].b].dy-vertex[line[i].a].dy;
}
}
for (i=0; i != points; i++) {
with (vertex[i]) {
_x = dx;
_y = dy;
_xscale = 75+(((((500-z3[i])/10)*30)/100)*(-1));
_yscale = 75+(((((500-z3[i])/10)*30)/100)*(-1));
_alpha = ((((z3[i]*(-1))+500)/10));
}
}
}
var ax, ay, az, oldx, oldy, bx, by, bz, nu;
now from what i understand from reading various texts and such for starters i should be makeing more movie clips titled "links" "page 1" etc and then declareing them at the top of the script in place of one of the parts of the points array. then i need to create arrays for the instances name, both of these i have done then in the bits i have coloured blue insert the names of the new movie clips but keep the values they are assigned i.e. the -150, etc. which i have also given a shot. then we bypass the red which i will get to later and go to the green which i think is to be duplicated with the appropriote names substituted much the same as the blue bits. now to the red, i have absolutly no idea what i should be doing with these bits of code, i'm not sure if i'm just getting blinded by all the maths especially the top red bit.
anyway thanks for reading this, i would really appreciate some help if possible, even just directing me to somewhere where i could find some stuff to read up on that would help.
cheers, monkeysquid.
Cache System
I'm trying to create a cache system to hold and record info about the swf files loaded into my main movie. I've found that you can load the swfs into blank clips. You can then hide them until the user tries to load the same swf and instead of loading the swf again, you make the cached page visible. However, I've found that the cached mc won't 'hold' variables, so i've had to cheat and use an object to store the info I need. Is there a more elegant way to do this? Ideally, I want an array of cache objects which would then show the order in which swf were loaded (thus providing a sort of browser history functionality). This needs to work for flash 5. Any suggestions?
// class to hold info about the cached pages
function CacheIndex (pWidth, pHeight) {
this.pWidth = pWidth;
this.pHeight = pHeight;
}
function cachePage(url) {
if (cache[url]) {
cache[url]._x = content._x;
cache[url]._y = content._y;
loadComplete(cache[url]);
} else {
cache.attachMovie("blank", url, cache.zindex);
cache[url]._x = content._x;
cache[url]._y = content._y;
cache.zindex ++;
// record width & height of cached page as a new CacheIndex object
// because you can't store this information in the attached clip
eval(url) = new cacheIndex(mainbox._width, mainbox._height);
trace("pWidth = " + gallery.pWidth);
loadPage(url, cache[url]);
currentPage = cache[url];
}
}
Menu System
I am learning flash and have used the resources from this site, which are great. just getting into actionscript, I have a menu that slides onto the screen when the spacebar is pressed at current.
I want to change this so that the menu comes in when the mouse hovers over a button then goes when the mouse is not over the button. my web address is: http://anthony.8bit.co.uk. The code I am currently using for the menu is:
menu.onEnterFrame = function() {
if (Key.isDown(Key.SPACE)) {
if (menu._x<25) {
menu._x += 50;
}
} else {
if (menu._x>-50) {
menu._x -= 25;
}
}
};
can you show me how to adapt it so it will do what I want. Thanks for your help.
Menu System
menu system
I am learning flash and have used the resources from this site, which are great. just getting into actionscript, I have a menu that slides onto the screen when the spacebar is pressed at current.
I want to change this so that the menu comes in when the mouse hovers over a button then goes when the mouse is not over the button. my web address is: http://anthony.8bit.co.uk. The code I am currently using for the menu is:
menu.onEnterFrame = function() {
if (Key.isDown(Key.SPACE)) {
if (menu._x<25) {
menu._x += 50;
}
} else {
if (menu._x>-50) {
menu._x -= 25;
}
}
};
can you show me how to adapt it so it will do what I want. Thanks for your help.
Menu System
I am learning flash and have used the resources from this site, which are great. just getting into actionscript, I have a menu that slides onto the screen when the spacebar is pressed at current.
I want to change this so that the menu comes in when the mouse hovers over a button then goes when the mouse is not over the button. my web address is: http://anthony.8bit.co.uk. The code I am currently using for the menu is:
menu.onEnterFrame = function() {
if (Key.isDown(Key.SPACE)) {
if (menu._x<25) {
menu._x += 50;
}
} else {
if (menu._x>-50) {
menu._x -= 25;
}
}
};
can you show me how to adapt it so it will do what I want. Thanks for your help.
System.capabilities.os
Is there a way to make a MC happen only if the user is on a PC.
I think I can do this with the system.Capabilities.os command
but what will I have to input to cover all the Windows OS ??
Menu System?
Lo all,
Anyone help me with this problem? Im sure I done something like it before but its been a while since i used flash.
Basically what i want is 4 buttons - when one of these buttons is pressed a short animation plays, then the relevant movie is loaded on top of the main movie.
I have tried setting a variable with the button press then playing the movie. E.G:
Button 1 when pressed sets variable a = "1"
Button 2 a = "2"
ETC.
Then after the (main) movie has played I had a set up like:
If a = "1"
Then goto and stop "page1"
Else if a = "2"
Then goto and stop "page2"
Each of these keyframes (page1, page2 etc.) had command to stop and load the relevant movie.
This doesnt seem to work though - any ideas?
Its probably simple I know but im out of practice, any help would be GREATLY appreciated as I have a deadline approaching :P
Thanks.
Stu.
Help In Usability System
Hi, I need some guidance in where to find any tutorials or open source fla on this. I need to develop an application whereby there's a map filled with draggable icons (representing PCs). I can create, delete, drag, rename those icons on-the-fly. It's something like our Windows Desktop in concept but each icon contains information about that PC. The information will be shown when I highlite the icon.
Some lead I have is dynamically create movie instances on the fly using the attachmovie function but it's still insufficient for me to start coding. Thanks in advance.
System Capabilities
Hi everybody
why does'nt this code work:
trace(System.capabilities.screenResolution.x)
I can't understand it, because all others system capability things worked.
Thanks
Max
Gauge System
hey peeps! me an and my friend are doing a basketball game and we're doing a gauge system on a player shooting the ball. we have a horizontal bar and a movie clip of a ball scrolling left to right of that bar. our question is how could we make the movie clip of the ball stop when a user presses a key on the keyboard!!! just like the way in NBA live 2003 when they shoot freethrows. please! any light shed on this matter would be greatly appreciated! thanks!!!
Nav System Effect Help
Hi...does anyone know of a tutorial that has the effect where when you move your mouse over the nav link buttons a arrow or some shape slides out to show what link button you are on? The arrow slides out to the link you are over..then dissapears when you move off the link.
Exampme site: www.vectorgate.com
Thanks for any help you can give.
System Resources?
I assume this is a problem with system resources, but I'm not sure, what do you lot think?
Every time I shut FlashMX down, it seems to cause problems for every other program running, fonts are altered, system slows right down, sometimes even crashes the whole thing.
The weird thing is, it never has these problems while running flashMX, only when I shut it down. I have already tried doing an uninstall/reinstall, but still get the same problem
I suppose the fact that its only got 128MB RAM doesn't help?
(PC running Win98)
Any thoughts from anyone about what I can do?
JennyJ
|