How Do I Specify A Location For Objects?
I am trying to create a flash with a header text with an effect. Then after the effect is ran, I want the text to remain while a second line of text runs its effect. Then I want the first two pieces of text to remain while a third piece of text runs its effect, and so on.
I did this by putting the first text with effect in key frame 1. Then in key frame two, I put the same text without an effect PLUS the second piece of text with an effect, and so on. The problem is I can not quite get the text to line up exactly with the text in the previous key frame so it is a little choppy. I can see what appears to be the location of the text on the bottom tool bar, but I can not find out how to change it.
BOTTOM LINE - Is there a way to specify a piece of text, object, or whatever else to be a set number of pixels from the edge and top?
FlashKit > Flash Help > Flash Newbies
Posted on: 12-24-2005, 03:29 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Moving Different Objects To One Location
Howdy, i have the following problem
First Object: x100 y100
Second Object: x400 y400
Thrid Object: x200 y200
when a counter reaches a certain number they all have to move to
x300 y300
how can i do this via AS??
any help
thanx in advance
Location Of Shared Objects With Associated .exe File
Currently I have a .swf file located on my desktop and the location is:
c:Documents and Settings imDesktopjournaljournal.exe
the location of its associated shared object is:
c:Documents and Settings imApplication DataMacromediaFlash PlayerLocalhostDocuments and Settings imDesktopjournaljournal.sol
2 QUESTIONS:
1) Is it possible to have the shared object travel with (Attached to) the executable so that information stays with the .exe no matter where it sits?
2) Is it possible to have the shared object in the same folder as the .exe file so the the path to the .sol file looks the same.
Shared Object:
c:Documents and Settings imDesktopjournaljournal.sol
Executable:
c:Documents and Settings imDesktopjournaljournal.exe
Thanks for your help!
Shared Objects File Location
just a quickie, ive been using shared objects which are working fine but im curious as to where the SO files (*.sol) are stored. i read they are by default kept in the same dir as the flash player but i cant see them.
in fact ive done a search for all *.sol files on my pc, nothing. they should be somewhere though, doing their job in flash fine.
any ideas?
How To Make Objects 'snap' To A Location
I was wondering how to make an object snap to a specific location when dragged to an approximate area. For example, when dragging a solid circle to an outline of itself, the circle would snap perfectly in place when user releases the button. Is there a built-in mechanism that allows for this. I already know how to drag and drop. Any help is appeciated.
Moving An Object To Another Objects Location
hi, i am creating a vertical shooter adaptation.
i am trying to create the enemy units to fire in a direction at the main unit.
The problem is that the bullet follows the main unit instead of moving in a straight direction where the unit used to stand.
I am using timers for creating the animation and i have tried changing the rotation of the bullets. I have got it to rotate in the direction i want it to but it doesnt move there.
i am also trying out this temp object thing where an object is left at the main units last location and the bullet travels to that location. its not working yet but i am going to give it another try.
Shared Objects Location On A Hard Drive
I am developing an interesting site and would like to store user information for repeat customers. I stumbled across shared objects and understand the concept quite well with the exception of where the files will be stored on a users hard drive. If I create a shared object does the clients computer automatically store it in some default directory?
I read somewhere that it is WindowsApplication DataMacromediaFlash Player
But when I searched my computer there was no such folder to be found. It must have been for earlier versions of Windows. Could someone elaborate on where a shared object will be stored, and if the clients computer just knows where to store the object when it is playing a flash movie? Or do I have to manually specify the directory on the clients machine?
Thanks,
Sam
How To Move An Object Slowly And Smoothly From Location 1 To Location 2?
Hi,
I am new to ActionScript. I wish to use ActionScript to move an object slowly and smoothly from location 1 to location 2.
I learned that I can use the following to move an object to location 2 (x2, y2):
mThisObject.x = x2;
mThisObject.y = y2;
However the object just "swift" from location 1 to location 2, not moving slowly and smoothly from location 1 to location 2.
Could some experts here provide a guideline for me?
Thanks and best regards
Alex
Xml Read From Dynamic Location Or Web Location
hello, i am working on a site which uses a flash menu i was handed
i have never worked with flash, but i suspect my problem is really easy to solve
the flash menu uses an xml file to generate, it works fine as long as one stays at the top-level dir of the site, say http://www.example.com/
when someone enters a page, say http://www.example.com/test/ the menu stops working, being unable to read the xml which is hardcoded to be in the same directory as the page it's called from (menu.xml is in /)
i must say that the locations visible to the browser are not real, everything non-top level in http://www.example.com/test/page/ is just mod-rewrite, thus none of the directories test or page really exist
i can see the reason why flash looks in the same directory as the one the client requested for the file (instead of looking at the same dir locally in example), but i can't seem to find a workaround to fix the menu myself without touching the flash code, so the two solutions i thought of:
1. is there a file_exists function i could use to make the flash recurse upper-level directories until the menu finds the xml file? as in:
quote:var menufile = menu.xml
while (!file_exists(menu.xml)) {
menufile = '../' + menufile
}
obviously this is not real code
2. is there a way to open the xml from a web location and not from a static path relative to the swf itself?
i googled for both but i could not find a clean or satisfying solution for either.. any answer on those and/or any other recommendations for a workaround would save me
Location-location Movement
Well... I'm working on a new game, which is sort of like a pokemon/golden sun etc. style RPG, but isn't tile-based. I have been setting up the actual moving from one screen (location) to another, and it all goes fine if i have just 3 arranged like this:
<1><2>
<3>
but if i add a fourth below screen <2> it all suddenly goes haywire.
move right from <1> and u end up in <4>, move left from <2> and you end up in <3>, move up from <3> and you end up in <2>.... you get the idea. can anyone help?
this is my code:
ActionScript Code:
if (grim._x<0) {
grim._x = 306;
if(bg._currentframe=2) {
bg.gotoAndStop(1);
}
if(bg._currentframe=4) {
bg.gotoAndStop(3);
}
}
if (grim._x>306) {
grim._x = 1;
if(bg._currentframe=1) {
bg.gotoAndStop(2);
}
if(bg._currentframe=3) {
bg.gotoAndStop(4);
}
}
if (grim._y<0) {
grim._y = 212;
if(bg._currentframe=3) {
bg.gotoAndStop(1);
}
if(bg._currentframe=4) {
bg.gotoAndStop(2);
}
}
if (grim._y>213) {
grim._y = 1;
if(bg._currentframe=1) {
bg.gotoAndStop(3);
}
if(bg._currentframe=2) {
bg.gotoAndStop(4);
}
}
('grim' is the character and 'bg' the set of locations, each location set on a different frame)
Controlling Clip Location With Other Clip Location
That title was admittedly confusing...but I don't know a better way of putting it. I want to create an effect like is on http://www.lennon.net/familytree/familytree.html The small map in the right hand corner controls the large map in the middle. I have a version that is a little bit different, but essentially the same. It has a clip in the middle (mine is a drag and drop instead of having scrolling buttons), and it has a zoom in and out function. The zoom is where I get completely lost because I don't know how to relate the two objects with the correct equation especially when the size will be changable. If anyone can point me to a tutorial or another thread that discusses any of this, that would be fantastic...I don't expect you to write all of the script for me, but just point me in the right direction.
Thanks.
Store And Retrieve Array Of Custom Class Objects From Shared Objects.
Hi,
I am stuck up with a problem in ActionScript 2. I am using Flash MX 2004 on windows XP.
I have created 3 custom classes say Parent, Child, and GrandChild. Parent class contains in it an array of its Child objects. Similarly each Child object contains in it an array of GrandChild objects. Also I do have one global array of all the Parent objects.
I want to store this array to the shared objects on specific events(say exiting the session) and then reload them from the shared object(on next session startup). I am able to store the global array to the shared object but when I try to retrieve the same array from shared object, I could not do it. The retrieved array is not of my custom class type [Parent].
Help needed to solve this problem urgently. Does anybody have idea how to do it??
Thanks in advance.
Cheers,
Naishadh Sevalia
Objects Talking To Objects, Parent/child Communication, Scope
I've been using AS3 at an intermediate level, and am getting deeper
into classes. I'm loving classes! I'm just cloudy on a few general
concepts.
It's easy for me to create a child object from a parent object, like a
ship in space for example (not working with ships right now but seems
fun to talk about). I can then navigate the ship from the parent
object.
What happens if the ship's engine temperature reaches critical? Is it
wise to dispatch a ship event that tells space that my ship is nearly
scrap? Or do I periodically query the temperature amount of the ship
from space? To me an event sounds like the solution, but I remember
hearing somewhere that parent objects should only talk to child
objects, not the other way around. Is this true?
Could I trouble someone for a basic example of how you would make this
communication work best?
Thanks for the assist. I'll post if I find anything interesting in
the meantime.
How Do I Reference Objects Inside Of Exported Library Objects ?
Hi,
I am having trouble figuring out what seems to be a simple fix? I have created a movieClip in Flash that contains 3 button clips. I want all to be accessible to actionscript, so I gave the movieClip and the 3 buttons a Linkage Identifier. I deleted them from the stage.
In actionscript, I have instantiated the movieClip and, thankfully, the buttons inside went along.
The trouble I'm having is figuring out how to target those buttons. Since they're on the stage already, I shouldn't have to create a new instance right? When I trace the buttons I get an undefined return in the out put.
Anybody know this one??
Thanks for the help!
Brian
Depth And Dynamic Objects/Attaching Scripts To Objects
I am having some problems with my Flash MMORPG created in Actionscript 3.0 that I am working on, not really errors, but more how to do something, in theory. I have 2 problems. First, my game is at a 45 degree angle, so it requires some depth handling(like one object is over another object when it should be behind that object). I am not sure how to go about this. I was thinking that each object's depth should be it's y position if it's origin was at it's feet. But that idea didn't go well, because the depth is limited by the number of children. What is the average way to do this? Next, I am trying to make dynamic objects, so that all I would do is copy and paste an object, or create a new class of it and it would work. What I mean is, the character checks a collision for each object, but if I copy the object with the same name, it doesn't work. In AS3 you can't attach scripts to objects anymore, so I am running into a lot of problems with that. How would I go about fixing this? Thank you in advance.
Aligning Variable Sized Objects And Objects Inside Them
Hi,
How do I align a movieclip, which width and height is user-defined, inside another object (this one is static, though). Top-left alignment is easy, x=0 and y=0, but what about center, center left, bottom left, etc? Math(.round) i suppose, but how?
and
I want an object (static) inside the movieclip (user-defined) to stay aligned to, for instance, the top right corner, similiar to the minimize, maximize and close buttons at the top right of your browser..
The height and width data is pre-defined by the user in another file... But that does probably not make any difference...
If anyone could help me with this, I'd appreciate it alot!
Thanks!,
Peter
How To Output Both AS Objects And Drawn Objects On Pages?
Using Flash 8;
Hello,
I am building a site entirely in actionscript and the "shell" of the site, the pages, text, static images, come up and work fine, no problems.
However, I'm having troubles trying to implement Kirupa's "XML_Flash Photo Gallery", for one of my pages, link here:
http://www.kirupa.com/developer/mx20...otogallery.htm.
I'm running into troubles because my pages are entirely actionscript and this tutorial uses objects which were drawn by the drawing tool.
I have been trying to get both actionscript and drawn objects to work together and cannot get it right!!
Questions:
1) In terms of layering or frames, What is the best way to output on your pages both "objects drawn by the Flash drawing tools" and "actionscript objects"?
Is this better handled using frames or layers? Should I place my actionscript on the first few frames, then my "drawn objects" on the later frames? Or use layers and have my AS code above or below the manually drawn objects?
For example:
I have my actionscript on layer 1. Then use drawing tools to draw a box on layer 2.
When published, I want the "manually drawn box" and "the actionscript drawn objects" to both be viewable on the pages. Do I place the "drawn" layer above or below the
actionscript layer? Or should this be handled by frames?
I have tried both and neither seem to work for me. When I do one or the other, it works, meaning, all drawn objects, obviously things are viewable, then if
I use all actionscript, things are viewable, but when I try to combine both, the manually drawn objects do not show up.
The actionscript objects show up correctly, but I cannot see the objects I have directly drawn on-stage.
In my actionscript, I use, "_root.getNextHighestLevel()", for each of the objects, this works fine for all the actionscript objects. However, I did nothing
for the objects drawn using the tools, should I attach the same "_root.getNextHighestLevel()" to those objects drawn on-stage?
Or,
2) Should I try to draw Kirupa's objects on my pages using actionscript?
Thanks, any help is great!!
Dave.
Help: Stage Objects Get In Front Of Script Objects?
This is getting me mad...
addChild(my_script_object);
I can't see it...
If I try trace(numChildren) I get 10, so then I try addChildAt(my_script_object,9) and still cant' see it.
If I delete all the objects in stage then I finally see it.... If I delete one by one I find my_script_objects gets beneath a bitmap placed by hand by the designer.
Any ideas?
TIA
About Referencing Objects And Copying Objects
This is for AS1
hi,
i should know this but i got lost for a bit, can someone make this clear:
i have the following:
code: myobject=new Object()
myobject.var="hello"
getvar=myobject.var
In this case, get var has a reference for myobject.var, or it has just copied de value? mean if i update myobject.var to "good bye" get vatr will be that, too, or will stay as "hello".
If it's just a reference, how can make it a different variable, i mean, assign the value of myobject.var to getvar and loose any relationship between myobject.var and getvar, so if i update one, the other doesn't.
Anyone?
Problem With Class Objects Within Objects
Hi There,
I am having trouble creating an oop grid.
My initial object is "world" shown below which will contain an array of "Row" objects, which in turn contains an array of tile objects.
As i build up the rows and assign the tiles everything seems fine but when i try to retrieve the values the tiles in each row returns the same values from each tile..
class world{
//declare class members
private var goalScore
private var mapPreview
private var title
private var editor
private var createdBy
private var movieBorder
private var instructions
private var rows = new Array()
//Constructor
public function world(Param_goalScore, Param_mapPreview, Param_title, Param_editor, Param_createdBy, Param_movieBorder, Param_instructions){
this.goalScore = Param_goalScore
this.mapPreview = Param_mapPreview
this.title = Param_title
this.editor= Param_editor
this.createdBy= Param_createdBy
this.movieBorder= Param_movieBorder
this.instructions= Param_instructions
}
//Methods
public function createRow(){
if (rows==null){
this.rows[0] = new row()
}else{
this.rows[rows.length] = new row()
}
return this.rows[rows.length-1]
}
}
class row{
//declare class members
public var tiles = new Array()
//Constructor
public function row(){
}
//Methods
function createTile(Param_tileType, Param_completionScore, Param_objectType){
if (tiles==null){
trace("created first tile")
this.tiles[0] = new tile(Param_tileType, Param_completionScore, Param_objectType)
}else{
trace("created tile " + tiles.length +" tiles="+tiles)
this.tiles[this.tiles.length] = new tile(Param_tileType, Param_completionScore, Param_objectType)
}
return this.tiles[this.tiles.length-1]
}
}
class tile{
// declare class members
public var tileType;
public var completionScore;
public var objectType;
public var character;
// Constructor
public function tile(Param_tileType, Param_completionScore, Param_objectType){
tileType = Param_tileType;
completionScore = Param_completionScore;
objectType = Param_objectType;
//movementPreset = Param_movementPreset
//error = Param_error
//errorImage = Param_errorImage
}
// Methods
}
Any advice will be greatly received.
Jason
Mask Objects And Masked Objects
Well.. I don't know if there is already a thread on this subject, but I have this doubt, and I would really like some support.
Been trying to use one mask object to mask several movies, but it doesn't seems to work. Has anyone ever managed to do this?
For example:
Let's say I have three MC - man, woman and baby are their names - and I want to use setMask to mask then so they walk behind the walls of a house, but just show up through the window. I create, then, a mask object - one object with the shape of the window inside it - named it windowMask, put it in _root and added to my actions layer the following lines:
Code:
man.setMask(_root.windowMask);
woman.setMask(_root.windowMask);
baby.setMask(_root.windowMask);
Unfortunately, only the last of them - baby in this case - is masked.
Can't I use one mask object to mask multiple MCs?
Everything works fine if I duplicate the mask MC and set each copy as a mask for each of them.
Code:
man.setMask(_root.windowMask);
woman.setMask(_root.windowMask1);
baby.setMask(_root.windowMask2);
The thing is, what I wrote above is just an example. The real movie has 30 to 40 MC which should be masked by the same mask object and I don't want to have 30 to 40 mask objects dangling around my movie...
Mask Objects And Masked Objects
Well.. I don't know if there is already a thread on this subject, but I have this doubt, and I would really like some support.
Been trying to use one mask object to mask several movies, but it doesn't seems to work. Has anyone ever managed to do this?
For example:
Let's say I have three MC - man, woman and baby are their names - and I want to use setMask to mask then so they walk behind the walls of a house, but just show up through the window. I create, then, a mask object - one object with the shape of the window inside it - named it windowMask, put it in _root and added to my actions layer the following lines:
Code:
man.setMask(_root.windowMask);
woman.setMask(_root.windowMask);
baby.setMask(_root.windowMask);
Unfortunately, only the last of them - baby in this case - is masked.
Can't I use one mask object to mask multiple MCs?
Everything works fine if I duplicate the mask MC and set each copy as a mask for each of them.
Code:
man.setMask(_root.windowMask);
woman.setMask(_root.windowMask1);
baby.setMask(_root.windowMask2);
The thing is, what I wrote above is just an example. The real movie has 30 to 40 MC which should be masked by the same mask object and I don't want to have 30 to 40 mask objects dangling around my movie...
Making Objects Go Behind And In Front Other Objects
Say I wanted to tween something so that it like rotates around it.
IE: a moon rotating around a planet, an electron orbiting a nucleus
How would I make the orbiting object go in front and behind the stationary object?
AS3: XObject Class - Treat Objects Like XML (E4X4O - "E4X For Objects")
I just finished this a few minutes ago (coincidentally while at a SilverLight camp ). Its an AS3 Object that allows you to add "elements" in the form of objects much like you would with XML using E4X. By assigning values to an XObject, you are adding that value into its "node" structure as one of its children with the given name. Retrieving a property, instead of returning a value, returns an instance of XObjectList which is essentially a list of objects (like XMLList) that are defined to that property. As with XML, there is a separation of elements and attributes using the @ character to precede references. Without @ you access a child, with, you are accessing a property or attribute of that particular XObject or whatever object defined inside it. Setting an attribute of an XObjectList, assigns the value to that property of all the objects in the list.
Its a little hard to explain. Its better to just see some examples.
ActionScript Code:
var rootNode:XObject = new XObject();rootNode.one = new Object();rootNode.two = new Array();rootNode.two = 20;rootNode.two[1].deep = "Hello XObject";rootNode.@three = "attribute";trace(rootNode);/* output:<XObject three="attribute"> <Object:one /> <Array:two /> <int:two> 20 <String:deep> Hello XObject </String:deep> </int:two></XObject>*/
ActionScript Code:
var rootNode:XObject = new XObject();rootNode.a = 1;rootNode.a = 2;rootNode.a = 3;delete rootNode.a[1];trace(rootNode);/* output:<XObject> <int:a> 1 </int:a> <int:a> 3 </int:a></XObject>*/
ActionScript Code:
var myMcs:XObject = new XObject();myMcs.badGuys = enemy1_mc; // movie clips on the screen...myMcs.badGuys = enemy2_mc;myMcs.badGuys = enemy3_mc;myMcs.badGuys.@x = 100; // all enemy mc's move to x = 100
It's pretty much done, but there might still be some problems, so if anyone finds any, just say so. I'm not sure how many more methods I might want to add in addition to what's there now (to match XML) though I think I want to keep it as simple as possible, so probably not much more, if any, than what's already there. To see what's there now, you'd just have to check out the classes - its not much.
Location, Location
I have a cd presentation where I have loaded an external .swf into scene 4 of my main movie in a new layer using :
on (release) {
loadMovieNum ("indo.swf",1);
gotoAndPlay ("Scene 4", 2);
}
The .swf positions it self as default in the top left hand corner. I have tried to repositioning it by adding:
on (release) {
loadMovieNum ("indo.swf" , 1);
_level1._x=350;
_level1._y=275;
gotoAndPlay ("Scene 4",2)
}
It still shows the .swf in the top left corner. Is this the right action script in the wrong palce or the wrong action script in the wrong palce?? I want the .swf to play roughly in the centre of the screen. Any suggestions.....
Thanks.
Location, Location
I have a cd presentation where I have loaded an external .swf into scene 4 of my main movie in a new layer using :
on (release) {
loadMovieNum ("indo.swf",1);
gotoAndPlay ("Scene 4", 2);
}
The .swf positions it self as default in the top left hand corner. I have tried to repositioning it by adding:
on (release) {
loadMovieNum ("indo.swf" , 1);
_level1._x=350;
_level1._y=275;
gotoAndPlay ("Scene 4",2)
}
It still shows the .swf in the top left corner. Is this the right action script in the wrong palce or the wrong action script in the wrong palce?? I want the .swf to play roughly in the centre of the screen. Any suggestions.....
Thanks.
This.location();
In flash MX I was wondering how to get tell flash to return the current URL location.
For example in php the var $PHP_SELF would return the current URL location. Or in javascript it would be something like this.location.
Does flash MX have some sort of function that would return the current URL? Thanks in advance..
Location Chk
Hello,
how can i know if my swf file is loaded on my domain name and if its not i wish to know how to redirect to my domain name
thank you for any input,
George
Get Location Of MC
I am unsure how to make an MC appear at the location of another MC, I am unsure how to put it on the MC without interfering with the MC's other animations for example if going left, play left animation etc etc, or if that is even the proper way to do it,
unless there is a simple way Get MC coordinate command?
and if so how to put it on a specific part of the MC
Location Of A Hit
Hi,
I'm doing some physics simulation work, and I want to be able to find tangent lines to points of collision for arbitrary shapes. I'm thinking about doing this by manually trying to find points on the boundary lines of the shapes near the point of the collision. However, at this point I don't even know of a simple way to get the coordinates of where a collision happens (for a hitTest collision with another clip as an argument). I'd appreciate any suggestions for this. Thanks.
X And Y Location Between MCs
I want an MC that will remain locked within the bounds of another MC's perimiter once its dragged in. To do this, I set bounds as follows below:
this.startDrag(false, _parent._parent.PL_Drop_Zone._x-6, _parent._parent.PL_Drop_Zone._y-40, _parent._parent.PL_Drop_Zone._x-6, (_parent._parent.PL_Drop_Zone._y+_parent._parent.P L_Drop_Zone._height-60));
Two questions:
1)
To get the line above, I spent some time tweaking, as for some reason
_parent._parent.PL_Drop_Zone._y
didn't exactly mean the top of the other MC (where the other MC is PL_Drop_Zone).
Why did I need to do this tweaking? Why does the difference of the upper bounds and lower bounds of the PL_Drop_Zone not match the height of it?
2)
I have duplicates of the original MC I want to move. I have found that their location determines the bounds also. For example, after I tweaked the above line to display correctly, I put the same code in a duplicate movie, positioned right below the first one. It moves the bounds down just a little, equal to it difference in position relative to the first MC.
Why would an MC's position affect the startDrag boundaries, if its properties are not used in the actual bounds?
Sorry for the longwinded explanation! Even a link to a page explaining coordinates and MC location properties could be helpful.
Thanks!
Location Of The Pop Up
Hi!
I just have one question is there a way to give the pop up window loacation where on screen it has to pop up....
CSS Var Location?
How do you change this code so that it works when the swf timeline its on, is loaded into a movieclip on a main swf stage (_root.loadarea)
It works fine on its own but dont when loaded into the loadarea mc.
Code:
var format = new TextField.StyleSheet();
var path = "http://www.kirupa.com/developer/mx2004/code/flash.css";
var quick = "<br><p class='one'>The quick Kirupa jumps over the lazy dog.</p>
format.load(path);
format.onLoad = function(success) {
if (success) {
output.styleSheet = format;
output.text = quick;
} else {
output.text = "Error loading CSS file!";
}
};
Also can someone alter it for text that's being loaded in from txt file?!.....ta!
HELP : X, Y Location
Hello,
I have a MENU that only plays if an INVISIBLE BUTTON is hovered. However, I wanted that there will be no invisible buttons but when the MOUSE moves around the entire movie area, it will play the MENU.
Any tutorial for this?
Thanks
CSS Var Location?
How do you change this code so that it works when the swf timeline its on, is loaded into a movieclip on a main swf stage (_root.loadarea)
It works fine on its own but dont when loaded into the loadarea mc.
Code:
var format = new TextField.StyleSheet();
var path = "http://www.kirupa.com/developer/mx2004/code/flash.css";
var quick = "<br><p class='one'>The quick Kirupa jumps over the lazy dog.</p>
format.load(path);
format.onLoad = function(success) {
if (success) {
output.styleSheet = format;
output.text = quick;
} else {
output.text = "Error loading CSS file!";
}
};
Also can someone alter it for text that's being loaded in from txt file?!.....ta!
Mc Location Help
Hey everyone I have a scroller which works fine but im looking to update text in a dynamic text box depending on the position of the scrollbar movie clip
im guessing that i need to use something like:
if (dragMC._x = 100){
title_txt.text = "hello";
}
i know that is terribly sloppy but im new to this xpos stuff
anyone have any ideas on this? any input greatly apreciated!
download file: www.vectorsesh.com/printscrollertest.fla
CSS Var Location?
Hey up all!
Ive got this code:
ActionScript Code:
var.format = new TextField.StyleSheet();
var.path = "http://www.mywebsite.com/flash.css";
var.quick = "<br><p class='one'>The quick Fox jumps over the lazy dog.</p>
format.load(path);
format.onLoad = function(loaded) {
if (loaded) {
output.styleSheet = format;
output.text = _global.quick;
} else {
output.text = "Error loading CSS file!";
}
};
Which is loading in the var.quick as CSS formatted txt. which works fine when tested at _root level....but the swf file I have it in is being loaded into:
ActionScript Code:
_root.loadarea
Which makes it stop working. Ive figured its down to the level where the variables are being stored....but Im having a bit of a thick moment and forgotten how to target them with this code!
Any ideas?
Also....if I want to CSS format some dynamic txt loaded in from a txt file....what do I need to change/add above?
Thanks all!
Specifying Location For LoadMovie
I'm using a loadMovie script to load a new .swf file on level 1. It works but it loads the newmovie in the top left corner of screen (or over the top left corner of level 0 movie) I want to specify where I want the movie to load on the screen.. How do I do that....
help please..
thanx....
Location Information
Hi a friend told me that I could find a flash tutorial that consists of working with databases by using ASP i was just wondering if someone new where it was i can;t seem to find it.
How To Loadmovie At A Particular Location In A MC?
I have been able to use loadmovie option and play an external swf file over my current movie, it loads the movie and plays it, with the source movie bkgd behind it.
But it plays the external swf on the left hand top corner of my original MC. I want the movie to play at a specific location and also in a smaller size than its original file.
How do I specify that in the actionscript ?
Location Value As A String?
heres what I have.
a text box value in this case b1 on _level0
ontop of that is a movieclip whose location is _level0.b1
this is repeted 38 times so the next text box is b2 movie clip _level0.b2 etc etc...
What I want to do.
So I only need one symbol for the movie clips that go ontop of the textboxes im trying to read its location, and from that i can get a value for which text box it represents.
What I have done.
in the movie clip is the following action script
location = this;
day = location.toString();
day1 = day.indexOf("b") +1;
gridday = day.slice(day1);
for some reason it fails from day = location.toString(); instead of the variable day being "_level0.b2" its "[Object object]"
This i cant understand, as the variable location does equal _level0.b1 so why once made a string does it change to [Object...
Any help most appreciated on how i can solve this problem, or maybe another soloution to what id like to do.
Thanks everyone!!
Danny
Location - Get Url - Pop Up Size
my flash button suppose to pop up a window with width=320 height= 240 with no status or toolbars or menubars.
and the file that the button is link to is in a sub folder. so wats the actionscript? this is wat i have below. but i cant load this up cos the link is local harddisk.
------------------------------------------------
getURL ("file:///C|/Sutzdesign/Web projects/mila closet/htdocs/tvc/tvc.html", "_blank ");
------------------------------------------------
please help!
thanx
Movie Location
im using the loadMovie action to load an swf, but it always loads it at 0,0. how can i change this. also, ive seen this atachmovie method around but dont see how it works. i would preferable like to be able to have one swf with several mc, then from another swf, load any mc of my chossing fromt he first. which is a better way? and how can i tell it where to go?
Random Location
hi guys,
I am making the following movieclip
several buttons and a plane which flies above a map.
I want to following to happen
I click on button 1 and the plane goes to location 1
I click on 2 and the plane goes tol ocation 2
I click on 3 and the plabe goes to....yes to location 3
I click on 4 and the plane goes to location 4
I click on 5 and the plane goes to location 5
etc..
it's easy to make if the user will use the buttons from 1- 5. Unfortunately this is not going to happen...the user will go from 1-3-2-1-4-3-5 or something.
But I want the plane to fly to the correct location...from every point
Unfortunately I have NO clue on how to start...I downloaded MX trial version now ( i have Flash5 experience, but i am not a good programmer)
Can somebody help me on the way?
Thnx!
Joris
PS. if somebody has a wordl map that is vector based and is willing to share it with me....please let me know, still looking for it
External Swf Location
i want to load an external swf file in my project in a particual place on my stage for example on the right side... but i tried doing it and it resizes the stage according to the external swf's size.. how to over come that`?
urgent
thnx
Movieclip's Location
Hi all,
I would like to ask how i can get a x position of an object which reside in a movie clip to a global x position
Document.location?
Hi all
Is there a quick way in Flash 5.0 I can get the URL of the page the flash file is embedded in?
Thanks
Steve
LoadMovie Location
attached are the files.
I cannot for the life of my get the crew.swf to load into the movie clip at the right location. With or without quotes for 'target'.
Would it be that the movieClip has to have certain properties in order for another movie to be loaded into it?
Basically I am having a hard time positioning the movie in the right location. Thanks in advance everyone/anyone
|