FCS3 - XML Content & Direct Access
Hi People,
I have a question regarding direct access to XML Data nodes. Please bear in mind I am building this application for an Online Advertisement so loading times are essential.
The first question to ask is: How much XML Data is acceptable to be loaded on the first frame? There will be about 100 different products, each with 6 attributes (Name, ImgPath, etc). Is this going to be too much? If yes, please read on...
I am building an application which will contain around 100 different products, I generally build XML applications by bringing all the data in at the beginning, putting it into Arrays and displaying it when necessary. This has served me well in the past and I would like to stick somewhat close to this for sanity's sake. I am hoping to reduce the amount of data brought in on the first frame to reduce loading time and make it easier for myself to debug, is it possible for me to access specific child nodes by a name that will be retreived from the users selection. I am hoping this will reduce loading times and make it easier for me arrange everything, as I will only have to data I need and can update it when necessary.
Any assistance greatly appreciated,
thanks in advance.
FlashKit > Flash Help > Flash ActionScript
Posted on: 10-29-2007, 03:07 PM
View Complete Forum Thread with Replies
Sponsored Links:
[F8] Direct Access To Subsymbol
Hi,
I have a main symbol called "world", it has a subsymbol called "europe", which has a subsymbol called "FR".
In ActionScript, I can access the FR symbol using the command:
PHP Code:
world.europe.FR
Is there any way I could access "FR" symbol without having to tell explicitely its parent symbol?
I'm working on an interactive map and I'm reading data from an XML file. For exemple, if I read data corresponding to "FR" country, I would like to be able to access the symbol "FR" directly (e.g: to change its color).
I don't want to keep a list of all countries for each continent. I tried to export it using "Linkage" but I still cannot call the symbol using simply "FR".
View Replies !
View Related
Prohibit Direct Access To XML File
Hi there...following problem
I have a Flash application that reads from an XML file located in the same directory.
I want to prohibit in any circumstances that the user may read this XML file directly.
The user doesn't see the XML file, but he could guess the location and the file name und just type the adress to the browser
I tried with htacces and apache configuration to manage read permissions
But the problem is, that flash runs on the client, not the server, so if i forbid public access to the XML file, the Flash application can't read it too.
Any advice or keywords?
View Replies !
View Related
Direct Pixel Access On MovieClips | AS2.0.
How can anyone read and change the RGBA pixel values of MovieClips in AS2.0?
This question comes up, when we need to apply self coded filters on a MovieClip.
For example I want to make a MovieClip to appear mirrored and it's pixels to change their alpha from 100 to 0, from the top side to down. As far as I know all Flash filters are applied to the whole MovieClip. Thus I guess the only way is to make a function that will take the pixels RGBA values and their positions relative to the origin of the MovieClip instance and change dynamic their values. This technique is used in many Photos presentations as far as I have seen, where the photo is apperead as mirrored and gradient-faded.
In another case I want a dynamic Fish-Eye filter to be applied to panoramic moving image, giving in that way the sense of depth to the viewer. In order to do that I have to know the XY-RGBA (A for Alpha) values of each pixel, and to be able to change them dynamically on runtime.
Anyone that can help?...
Thanks.
View Replies !
View Related
Restrict Direct Access To Files But The Main
I have a all-flash-site which on demand loads several swf-files in to the main.swf.(e.g. if you type www.mySite.com and hit the button movie movieOfTheDay.swf is loaded.)
And I want to avoid people being able to directly access those files using http://www.mySite.com/movieOfTheDay.swf .
Best would be if they where be directed to index att all times.
Does it make sense?
My webspace is hosted.
Any Ideas?
greets
andreas
View Replies !
View Related
XML/XMLNode Wrappers With Direct NodeName Access Using __resolve
So I recently discovered the __resolve property of objects and got this idea yesterday afternoon to use it to simulate access to XML trees by nodeName. About halfway into this I realized I'd probably never use it, but maybe someone will find it mildly interesting.
The two classes are wrappers for XML and XMLNode that allow you to access nodes on an XML tree by nodeName. So for example say you have an XML file:
Code:
<root>
<sub1 someAttr="someValue">
<sub2>abc</sub2>
<sub2>def</sub2>
</sub1>
<sub1>
<sub2a>ghi</sub2a>
<sub2a>jkl</sub2a>
<sub2b>mno</sub2b>
</sub1>
</root>
example in Flash:
ActionScript Code:
var txml:TXML = new TXML();
txml.onLoad = function() {
// the TXML class is really basic. It's only written to allow access
// to the firstChild, which I just call "rootNode";
var rn = this.rootNode;
// but from the rootNode you can access all the branches of the
// xml tree by nodeName, e.g.
trace(rn.sub1[0].sub2[0].firstChild.nodeValue); // abc
trace(rn.sub1[0].attributes.someAttr); // someValue
// notice that where there are multiple childNodes of the same name,
// the return is an array of elements. But if there is only a single
// it is returned as a single node, so:
trace(rn.sub1[1].sub2b.firstChild.nodeValue); // mno
// also accessing by name will return only the children of that name
// so in this case (2 elements of 1 name and a 3rd of another)
trace(rn.sub1[1].sub2a.length); // returns an array of 2 Nodes
trace(rn.sub1[1].sub2b); // returns a single Node
trace(rn.sub1[1].childNodes.length); // returns all children
// finally, the node has a "resolveZero" property which is by default
// true that will resolve calls such as sub2b[0] to the object returned
// by sub2b. This is a bit confusing but it's so you can treat single nodes
// like arrays or nodes, e.g.
var a = rn.sub1[1].sub2b;
var b = rn.sub1[1].sub2b[0];
trace(a==b); // true
// further extending this, the node has a "length" property defined to be
// 1. A bit hacky but it works... so you iterate over a single element
// node the same way you can an array, e.g.
a = rn.sub1[1].sub2b; // a in this case is a single node
for(var i = 0; i < a.length; i++) {
trace(a[i].firstChild.nodeValue); // traces "mno"
}
b = rn.sub1[0].sub2; // while b is an array of 2 nodes
for(var i = 0; i < b.length; i++) {
trace(b[i].firstChild.nodeValue); // traces "abc", "def"
}
}
txml.load("theAboveXML");
Anyway, I know this is massive and totally incomplete: Only some of the major properties of the XML and XMLNode objects are accessible and the classes are only good for examining the tree, not modifying it. I just thought someone might find it interesting --- before I throw it in some folder and never think of it again.
One more thing to mention is the way __resolve handles the properties. Once an undefined property on the object is accessed and the match to childNode nodeNames is attempted a reference to that match is stored on the object, so the property becomes resolved and the match search only occurs once. So after first access to a childNode name the return becomes directly accessible as a property, and not processed the next time.
Anyway here they are, somewhat commented:
class TXML.as
ActionScript Code:
class TXML {
/* wrapped XML object */
private var xml:XML;
/** constructor */
public function TXML(str:String) {
xml = new XML(str);
init();
}
private function init() {
xml.ignoreWhite = true;
xml["_ADAPTER_"] = this;
xml.onLoad = function(success) {
this._ADAPTER_.onLoad(success);
}
}
/** load passed to wrapped XML object */
public function load(url:String) { xml.load(url); }
/** stub to be overridden by your handler */
public function onLoad(success) {}
//public function set ignoreWhite(v) { xml.ignoreWhite = v; }
//public function get ignoreWhite() { return xml.ignoreWhite; }
public function get docTypeDecl() { return xml.docTypeDecl; }
public function get attributes() { return xml.attributes; }
private var rn;
public function get rootNode() {
if(!xml.firstChild) return null;
if(!rn) rn = new TXMLNode(xml.firstChild);
return rn;
}
}
class TXMLNode.as
ActionScript Code:
class TXMLNode {
/* ref to wrapped XMLNode */
private var node:XMLNode;
/** constructor takes XMLNode, called by TXML & internally */
public function TXMLNode(node:XMLNode) {
this.node = node;
this.resolveZero = true;
}
/***
* property getters for wrapped XMLNode
*/
public function get nodeType() { return node.nodeType; }
public function get nodeName() { return node.nodeName; }
public function get nodeValue() { return node.nodeValue; }
public function get attributes() { return node.attributes; }
private var _resolveZero:Boolean;
public function get resolveZero() { return _resolveZero; }
public function set resolveZero(v) { _resolveZero = v; }
public function get length() { return 1; }
/*
* Attempts to resolve undefined property calls on the node
* to matches with the nodeName of members of childNodes.
* After the attempt it will store a reference to the result
* by the called property name, so the next time the property
* is accessed it will just return the referenced data.
* Returns null, a single TXMLNode, or an array of TXMLNodes,
* dependent on number of matches found.
*/
private function __resolve(sPath) {
if(resolveZero && sPath=="0") return this;
var cn = node.childNodes;
var tmp = [];
for(var i=0;i<cn.length;i++) {
if(cn[i].nodeName == sPath) tmp.push(cn[i]);
}
var v;
if(!tmp.length) v = null;
else v = ( tmp.length > 1 )
? objectizeNodes(tmp)
: objectizeNode(tmp[0]);
return this[sPath] = v;
}
/*
* functions to wrap XMLNodes with TXMLNodes
*/
/* wrap multiple nodes and return array */
private function objectizeNodes(arr):Array {
if(!arr.length) return null;
var tmp = [];
for(var i=0;i<arr.length;i++) {
tmp[i] = new TXMLNode(arr[i]);
}
return tmp;
}
/* wrap single node (for refs like firstChild, etc) */
private function objectizeNode(n):TXMLNode {
return n ? objectizeNodes([n])[0] : null;
}
/*
* public overrides of node references for wrapping,
* each objectized/stored on call
*/
private var fc;
/** firstChild of wrapped XMLNode as TXMLNode */
public function get firstChild():TXMLNode {
if(!fc) fc = objectizeNode(node.firstChild);
return fc;
}
private var lc;
/** lastChild of wrapped XMLNode as TXMLNode */
public function get lastChild():TXMLNode {
if(!lc) lc = objectizeNode(node.lastChild);
return lc;
}
private var ns;
/** nextSibling of wrapped XMLNode as TXMLNode */
public function get nextSibling():TXMLNode {
if(!ns) ns = objectizeNode(node.nextSibling);
return ns;
}
private var ps;
/** previousSibling of wrapped XMLNode as TXMLNode */
public function get previousSibling():TXMLNode {
if(!ps) ps = objectizeNode(node.previousSibling);
return ps;
}
private var cn;
/** childNodes of wrapped XMLNode as TXMLNode[] */
public function get childNodes():Array {
if(!cn) cn = objectizeNodes(node.childNodes);
return cn;
}
/**
* uncomment/modify for debugging
*/
public function toString():String {
var str = "TXMLNode[";
//str+="
";
/* to examine properties of this object */
//for(var i in node) str+=i+":"+node[i]+"
";
/* to examine this object's XMLNode */
//for(var i in this) str+=i+":"+this[i]+"
";
return str+"]";
}
}
View Replies !
View Related
AS3 Loader.content Access To Partially Loaded Content
I have a main swf that loads an external swf. The external swf is a fairly large video embeded on the timeline.
Ive got my Loader all setup correctly, handling PROGRESS, COMPLETE and INIT events all fine.
What id like to do (which i could do in AS2 very easily) is start the playing and accessing variables in the loaded swf before it finishes loading. If i do these things when the video swf is loaded completely, everything works fine.
Any attempt to access Loader.content or the container clip ive placed Loader.content in, BEFORE its finished loading (when it reachs, lets say, 20%), i get error:
#2099 The loading object is not sufficiently loaded to provide this information.
Anyone have any ideas on how it could be possible to start messing with loaded SWF content before all of its frames are loaded? Thanks in advance for lookin over my post!!
View Replies !
View Related
Access Content Of Loader
Last edited by SkyNarc : 2006-11-22 at 01:33.
Hi,
I'm loading an image into a loader from an Array which is loaded from an XML file.
Now I'm trying to change the X position of that image but cannot access it since this is the first time I am doing this.
My loader is called loader_mc and my array for the images is called propertyImage so I've tried this without much luck:
PHP Code:
_root.loader_mc.propertyImage[currentProperty]._x
Thanks..
View Replies !
View Related
Problem To Access The Content Of A Variable..
I have a dynamic textfield whose var name is "actu", this textfield is in a MC named "scrolltext".
The content of the textfield is loaded by a loadvariable("txtfile","")
So far so good, the textfield displays the right text, but then i can't managed to accessed the content of the textefield.
I've tried to trace(_root.scrolltext.actu) and the result is "undefined".
Please help me
thanks a lot
View Replies !
View Related
Flash Access Local Content
We have received a request to serve SWF files from a server, but to place the FLV files that they access on the persons local machine. The reason for the request has to do with bandwidth. Is there any way to accomplish that? Anyone have any ideas?
View Replies !
View Related
Loader Class Access .swf Content
Hi!
I am having trouble accessing a MovieClip from a .swf file that I load in my main movie.
I use a code similar to the one bellow, and myMovieClip is a MovieClip placed directly on the stage of my .swf file.
I would apreciate a little help on this.
Thank you!
Attach Code
var loader:Loader = new Loader();
loader.loaderInfo.addEventListener(Event.COMPLETE, on LoadComplete);
funciton onLoadComplete(event:Event):void {
loader.myMovieClip.visible = false; // for example
};
loader.load(new URLRequest("mySwf.swf"));
View Replies !
View Related
Access Content Inside A Tilelist?
If I populate a tilelist with movies from the library', is there a way I can access these? I know with a scrollpane, I can do something like
MovieClip(scroller.content).instanceIwantToAccess. addEventListener(MouseEvent.CLICK, handler);
Is there something similar I can do with the tilelist?
View Replies !
View Related
Access Content Inside A Tilelist?
If I populate a tilelist with movies from the library', is there a way I can access these? I know with a scrollpane, I can do something like
MovieClip(scroller.content).instanceIwantToAccess. addEventListener(MouseEvent.CLICK, handler);
Is there something similar I can do with the tilelist?
View Replies !
View Related
Access Content Inside Window Component?
Is there any way that I can access for instance box_mc which is inside window component that is created by:
MyWindow = PopUpManager.createPopUp(_root, Window, false, {closeButton:true, title:" - Testing!", contentPath:"box_mc"});
with AS 2 player 7.
I tryed
MyWindow.box_mc._x+=50;
but it doesn't work.
View Replies !
View Related
Flash Access To Read The Folder Content
I am trying to make a gallery which I know previously that we could make flash reads the folder "eg. gallery/" by using xml and database and the only thing that we could do it dynamically is only thru php. But I was just wondering whether there's a new method in flash for me to just point a folder and flash reads the whole content in that folders and loop through it?
I asked this because of the purpose of me trying to let people to upload to that folder and if there's any new images, then flash would dynamically reads it.
And also just one more question. Can flash make new folders?
View Replies !
View Related
Display Content In Flash From An Access Database
Hey...
I have a flash movie which is just a simple animation (which this part is totally irrelevant to what am trying to achieve but anyway) at the end of the animation, I would like to display some names that would scroll from left to right (Like the Star Wars film credits but instead of text going bottom to top it would go from Left to Right). And DON’T HAVE TO FADE OUT.
Now! The problem is that I want it to display the names on a screen from the Database which would be created in Access (have to be access if possible).
So any names entered into the database will get pull out and displayed on the screen and that animation (of names going from left to right) would just loop.
Also the extraction from the DB would be done at runtime, so as soon as you add a name in the database it would display in the next loop of the movie.
Is something like is possible? If so could somebody help me with this? It would be much appreciated.
Many Thanks
View Replies !
View Related
Display Content In Flash From An Access Database
Hey...
I have a flash movie which is just a simple animation (which this part is totally irrelevant to what am trying to achieve but anyway) at the end of the animation, I would like to display some names that would scroll from left to right (Like the Star Wars film credits but instead of text going bottom to top it would go from Left to Right). And DON’T HAVE TO FADE OUT.
Now! The problem is that I want it to display the names on a screen from the Database which would be created in Access (have to be access if possible).
So any names entered into the database will get pull out and displayed on the screen and that animation (of names going from left to right) would just loop.
Also the extraction from the DB would be done at runtime, so as soon as you add a name in the database it would display in the next loop of the movie.
Is something like is possible? If so could somebody help me with this? It would be much appreciated.
Many Thanks
View Replies !
View Related
[fcs3]
Hello, novice here
Right the basic problem is this:
I have one Main.swf file and I’m importing symbols from a seperate.swf using the import for runtime sharing options. What I have in the Main.swf is a container symbol and in the separate.swf file I have a symbol containing a bmp that needs to scale up at runtime when it is imported by the Main.swf to fit the size of the container symbol. Do you know if this is this possible?
I have the importing/exporting part working fine, it is just the scaling that I can’t get to work. Any ideas
View Replies !
View Related
[Fcs3]
hi, ive been trying to make myself a portfolio using flash cs3, and so far everythings been running pretty smoothly, ive been following a tutorials by cartoonsmart.com, but ive started running into some trouble now, i created a function that tweens out a section off to the side when i click on a new section, but for some reason the tween refuses to work with certain sections...even tho the code for each section is identical...
heres the code:
frame one(the function)
Code:
function swapSections(){
if (sectionVar == "home"){
new mx.transitions.Tween(home_section, "_x", mx.transitions.easing.Regular.easeOut , 95.0, 800, 30, false);
}
if (sectionVar == "about"){
new mx.transitions.Tween(about_section, "_x", mx.transitions.easing.Regular.easeOut , 75, 800, 30, false);
}
if (sectionVar == "contact"){
new mx.transitions.Tween(contact_section, "_x", mx.transitions.easing.Regular.easeOut , 95, 800, 30, false);
}
if (sectionVar == "sigs"){
new mx.transitions.Tween(sigs_ection, "_x", mx.transitions.easing.Regular.easeOut , 75, 800, 30, false);
}
if (sectionVar == "sites"){
new mx.transitions.Tween(sites_section, "_x", mx.transitions.easing.Regular.easeOut , 95, 800, 30, false);
}
}
frame 50(home)
Code:
new mx.transitions.Tween(home_section, "_x", mx.transitions.easing.Regular.easeOut , -700, 95, 30, false);
// function called to move out the old section (this function is on frame 1)
swapSections();
//variable used in the function above to determine the current section
sectionVar = "home";
stop();
frame 60 (about me)
Code:
new mx.transitions.Tween(about_section, "_x", mx.transitions.easing.Regular.easeOut , -700, 75, 30, false);
// function called to move out the old section (this function is on frame 1)
swapSections();
//variable used in the function above to determine the current section
sectionVar = "about";
frame 70 (contact me)
Code:
new mx.transitions.Tween(contact_section, "_x", mx.transitions.easing.Regular.easeOut , -700, 95, 30, false);
// function called to move out the old section (this function is on frame 1)
swapSections();
//variable used in the function above to determine the current section
sectionVar = "contact";
frame 80 (sigs)
Code:
new mx.transitions.Tween(sigs_section, "_x", mx.transitions.easing.Regular.easeOut , -700, 95, 30, false);
// function called to move out the old section (this function is on frame 1)
swapSections();
//variable used in the function above to determine the current section
sectionVar = "sigs";
View Replies !
View Related
[fCS3] Why? Just Why?
Sorry about the unclearness of the title but that's the question i have been asking myself all day!
I am making a part in my flash game where you can select the level. I have made an input text box and set the var name to levelinput. Then i made a button and gave it this code:
Code:
on(release, keyPress"<Enter>"){
if(levelinput.toLowerCase eq "tutorial"){
gotoAndStop("Scene 2", "tutorialstart");
}else if(levelinput.toLowerCase eq "level1"){
gotoAndStop("Scene 3", "hsstart");
}else{
gotoAndStop("Scene 1", "invalidlvl");
}
}
for some reason i always get the invalidlvl frame. I would really appreciate some help guys, cos i haven't even done the main part of the game yet, and i don't like moving on while things don't work.
oh, btw, i made sure the frame labels are correct and used the script assist to confirm it. nothing wrong with the code... I followed a tut on this kind of thing and that didn't work either....
View Replies !
View Related
[FCS3] Actionscript 2 Or 3?
Hi
I've been learning flash for about a year, and have slowly been trying to get to grips with using actionscript (2). I normally grab bits of script from forums and tutorials and piece and adapt them to how I need.
Thing is, I really want to understand what I'm using and to be able to write my own script. With that in mind, am I best to forget the basic knowledge of AS2 and learn AS3? Or should I attempt to learn AS2 first, then AS3???
Also, if anyone could reccomend a book or tutorial that would be good to learn with, that would be great!!
Thanks
Wayne
View Replies !
View Related
[fCS3] Can't Add Actionscript To MC
Ok so i'm trying out fCS3, and I can't seem to add actionscript to MC's. I click on the MC, press the button with the arrow on the bottom pannel/right click then hit actions, and it says that I can't add actionscript to it. Am I pressing the right button or what? and also when I import/open something from F8 that already has actionscript it adds a panel with Actions - MC. and yes I am aware that fCS3 uses actionscript 3, is it that or what am i doing wrong? lol yes a very noob question. ty for any answers
View Replies !
View Related
[FCS3]How To Call External SWF's
I am creating an eLearning class using Flash CS3.
I would like to use basic controls to control the class (i.e. play, next, back). What I am trying to figure out is how to each new slide.
Example: At the main menu screen users have three different chapters they can go to, each chapter is a seperate .SWF file. How do I call this SWF so that it loads and plays, without it being in a seperate FLV playback window?
Anybody have any ideas on how to do this? I am sure it is possible, but I am new and ignorant.
I do not want to use the slide show application becaquse it only supports AS 2.
View Replies !
View Related
(FCS3) Combo Box Flickers, Why?
Hi, got a combobox inside a mc in a 1.swf that I import into 2.swf but there the combobox just flicker. It works fine when I test it using
´Test Movie´ in flash. And if I go straight to the directory and open 1.swf.
Any ideas?
And another newbie question how do I relabel a datagrid instance? (I am using a script from a mate and I need to relable the datagrid)
Help really appriciated!
B
View Replies !
View Related
[FCS3] Point-Roll?
does anyone know a good script for Point-roll that works cross-platform? i've created a point-roll in Flash CS3: hover over Flash movie and unfolding the pane. it needs to play in both IE and Safari/Firefox ? we got it to work in IE but not Safari/Firefox.
thanx much,
Sara
scsirain@yahoo.com
View Replies !
View Related
[FCS3] Tween Trouble In CS3
My Flash experience is in using Flash8, and I'm currently using CS3 for the first time. I am however using AS2.0, not 3.0.
I'm using several motion tweens between various keyframes in a layer of a movieclip. Each tween is from a keyframe with a symbol instance set at color: Alpha, 0% and the same symbol with color: Alpha, 100%. These appear to be functioning properly. Below that layer I have a layer with almost identical "static" symbols. The intended effect being part of the swf "fades in."
However, by the second frame as the alpha starts to tween in, the entire image (including the normal static layer) is washed out as if the tween layer has 100% opacity over the static fill layer.
I've done the exact same thing in the past using Flash8, so maybe I'm just forgetting something. Thanks for any help!
View Replies !
View Related
[FCS3] Dynamic Layers
How do I dynamically control which object is shown above or below another? I want to create a rotating menu, where icons are revolving around a vertical axis. So the icons in the foreground will eventually become icons in the background and thus their view will get obstructed by the icons coming into the fore.
I'm figuring that the actionscript is needed to dynamically assign assets to layers. How do I achieve this?
(I haven't touched flash in ages and this may not be the correct place to post this)
View Replies !
View Related
[FCS3] Interface Annoyance
This is driving me nuts.
I'm using CS3 and since I like a large screen I'm in the habit of docking everything and collapse/expand my libraries. I also keep my properties panel docked at the bottom. Before, when I opened the library panel, it used to show up over everything. Now, I don't know which wrong button I pressed but the bottom of it keeps getting covered by the properties panel. The only way I can have it on top of properties is if I undock properties, which isn't what I want. Can any gurus out there help me with this annoying issue? Thanks in advance.
View Replies !
View Related
[FCS3] Including Php Links
I am working on a HTML/PHP site which uses php links to forward/include a refID. The links within the HTML have changed from standard HTML <a href="page.html"> to PHP <a href="<?writeLink('page.php')?> so the refID will always remain in the address bar for the contact.php page to pick up when relevant.
This is all fine, however I also use an animated Flash map to link to (for example) page.php. How can I update the standard getURL links in my Flash file to carry this RefID onwards?
The writelink code is:
<?
function writeLink($strLink)
{
echo $query_string;
$refId = $_GET["ref"];
if ($refId=="")
{
echo $strLink;
}
else if (parameterAlreadyExists()==true)
{
echo $strLink."?id=".$_GET["id"]."&ref=".$refId;
}
else
{
echo $strLink."?ref=".$refId;
}
}
function parameterAlreadyExists()
{
if ($_GET["id"]=="")
{
return false;
}
else
{
return true;
}
}
Not sure if I'm just being dumb, but I've spent hours trawling through various sites and Flash/PHP tutorials without finding the answer! Any help, as always, would be appreciated.
View Replies !
View Related
Class Exclusion In FCS3
Hi all :)
My question is related to the exclusion of classes during the compilation of a fla file (not using the Flex Builder !!!) using AS3. Simply, I'm searching a way to do the same as the exclude.xml using AS2. As I want to set a Document Class to my fla, I cannot use a describeType-solution or a solution
like that :(
Is there a way to do that ? I already launched a topic on Media-Box [FR] but it seems that isn't possible yet...
Best regards !
View Replies !
View Related
Flex And Fcs3 Not Playing Well Together
i havent woked on any as3 projects in a few months but now am getting back at it with a new project although now fcs3 and flex dont want to play well together like they used to.
first problem is when i have a movieclip in fcs3 linked to a AS3 class and put another movieclip inside it (in fcs3) and give it a variable name and try to declare it in the AS3 class
Code:
public class Puzzle1 extends MovieClip{
public var myImg:MovieClip;
it gives me this error: 1151: A conflict exists with definition myImg in namespace internal.
my second problem is when i try to pass tat same Puzzle1 class to another class it wont let me
Code:
public var pGrid:PGrid = new PGrid(this);
it gives me this error: 1067: Implicit coercion of a value of type Class to an unrelated type game.p1uzzle1.
but if i pass it in as a MovieClip it works fine, this i know can not be right.
any ideas on what the problem could be?
View Replies !
View Related
[FCS3] Class Limit?
There are 77 classes in my project and around 30 of them are linked to MovieClips. If I do a size report it says that my Actionscript classes are 110296 bytes.
I am having a mysterious problem. I have a MovieClip, and I would like to link a class to it in the library.
But I get the following error:
The class or interface 'gui.screens.game.ContinueGame' could not be loaded.
The class at the moment is empty (see code below), although I have tried renaming, deleting and recreating it a few times.
Code:
class gui.screens.game.ContinueGame extends MovieClip {
public function ContinueGame() {
}
}
I have also tried linking the class to other MovieClips that have been successfully linked other classes before - which didn't work.
I have tried linking other classes I have used before to the MovieClip - which worked. So the problem lies with the linking of the specific class. Since I have tried renaming it, I'm wondering if there is you can only link a certain number of classes or something. Or I am missing something obvious and will kick myself when I find it.
View Replies !
View Related
[FCS3] Help: Animated Navigation Bar
i'm trying to create a nav toolbar of some sort like the one that was mentioned here.
being an actionscript newbie relying on kirupa tutorials i am stumped on a few items.
questions.
1. how do i make the buttons inside the scrolling mc or any animated mc to work.
2. i am able to swap the z order of the scrolling items using swapDepths using "onRelease"... how do i make it work on something like "onRollOver"?
3. is there a way to maintain the object spacing on the scrolling items while the focused item is enlarged?
...i know there was one more question in my head... i kinda forgot what it was. update this post when i remember it =]
any help would be appreciated.
thanks!
View Replies !
View Related
Logging On With Flash (FCS3.AS2)
i've looked on the site and it doesn't quite have what i need (great site btw)
anyway this is what im looking for.
actionscript 2 for;
a stand alone flash program
that several users can log on
and multiple accounts can be made
and it will save and remember where the user was if they log in again
basically i'm making a puzzle flash game
if they finish level 1 level 2 gets unlocked and level 3 after level 2 is complete.
i'm thinking of heading on the lines of
if the user logs on and plays the variables (level 1, level 2, level 3) change from false to true until they complete the previous level (with the exception of level 1 always being true)
then when logging on again if the name and password is the same as previously used then they will be able to resume from either level 1 2 or 3 (they will have to start from the beginning of the puzzle naturally, not from their last move)
so is there any way to do this without mySQL and without PHP? or do i have to use them? because i'm using a stand alone flash file and at most use a simple .txt or an .xml file.
also its preferred that all scripting done on the first frame and not on buttons and using instance names not the var box down in the bottom right hand corner.
(if not ill translate it on my own)
fast help will be greatly appreciated
thanks in advance!!
z~
PS im not a flash wiz or anything... i just know the basics...
View Replies !
View Related
[FCS3] Problems With Gotoandplay And GetURL?
I just started using Flash CS3 and am trying to do something seemingly very simple. All I want to do is loop Scene 2 and have the flash movie link to a certain web page. I managed to get it to loop Scene 2, but once I added the button with the link, it stopped looping. I'm not sure if I even have the link working either.
I made a mockup of my FLA. This is exactly how I do it in my real FLA.
Any help is appreciated
View Replies !
View Related
[fcs3-as2] Save Listbox To File...
Hi again,
Well, using AS2, because I just don`t know whats to great about AS3 above AS2 yet. I`m used to Delphi, so maybe AS3 would be better, but for now, it`s AS2
And to the question;
I`m making a little program. It contains lists witch can be edited (add/remove/edit-line). It`s holding information like programs/games/movies and stuff you`v got on your computer.
All the buttons are working, but I still need one more thing; save the lists to a .txt file(or .ini, or whatever).
How do I do this? Just a simple methode to save all the lines in a way that they can be read back again. (Need help with the read thing too..)
And is there any way to "hold" the information inside the flashfile as long as it`s running? Because, I`v got 5 areas witch loads on different keyframes (depending on what cathegory you click on in the main menu) and each time I switch to another place on the timeline and back again, the text is gone...
Would work to just save/load each time too...
Thanks in advance!
View Replies !
View Related
[FCS3]Simple Textbox Problem
Hey guys,
For some reason when i click in a multiline textbox the cursor appears on the 2nd line not the very top line. Does this happen to everyone or is there a way to fix this? Seems a bit unprofessional on my contact form...
Thx
View Replies !
View Related
[fCS3] How Do I Break Out Of A Movie Clip?
Ok, this is confusing.
I have made a button inside a movieclip. I have a applied actionscript to the button. The actionscript has an IF statement which, when true, should take me to a frame on the main timline that i have labeled "window". however, this doesn't work.
basically how can i get a button in a movieclip to take me to somewhere on the main timline?
View Replies !
View Related
[Fcs3] Tricky Carousel Question...
hi...
Just a simple carousel based question, (it's tricky for me though). I was utilising the tutorial over at gotoandlearn. I'm trying to load a mc from the library in flash instead of an external movie via the xml file...
Code:
<icon image="img/frame7.png" tooltip="Funky" movie="funky.swf" />
^^^ is an example of a line of code in the xml file which loads an external movie into a mc called myLoader in the main flash movie.
Any ideas how to use a library item instead of an external movie. I've tried code:
//load movie from directory...
myLoader.attachMovie(t.movie);
whereby t.movie is the attribute movie in the xml file, (which I gave the linkage ID of "funky" instead of "funky.swf"). no luck though...
thanks in advance
Jeff
View Replies !
View Related
[FCS3]Checking External SWF In Levels
Hello all.
I'm new to working with levels, and I'm trying to test which .swf is currently loaded into a certain level. Is there a way to do this?
What I'm attempting is to load content for a portfolio into the main swf. However, if the "home" content is already loaded and the "home" button is clicked, I don't want it to reload.
By the way, I'm using AS 2.0
Also, is there an easy way to split the scenes in a .fla into separate .fla's?
Thank you for any advice you can give me!
View Replies !
View Related
[FCS3] Popup Window Size Issue
Hi,
For some reason, the popup window link in my Flash website opens up a popup which doesn't behave to the window size rules I set.
The website is www.caveataudiens.net , click on the 'music' button, and then on the Jukebox button to see as example.
The Jukebox button has the following actionscript:
on (release) {
//customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = "http://www.caveataudiens.net/music/mp3player.html";
target_winName = "kirupa";
width = 400;
height = 300;
toolbar = 0;
location = 0;
directories = 0;
status = 0;
menubar = 0;
scrollbars = 1;
resizable = 0;
//sends data back to the function
openWinCentre(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);
}
and in my main actionscript layer I have:
stopAllSounds();
forum_btn.onRelease = function() {
getURL("http://www.flaccidsacks.co.uk/phpBB2/", "_blank");
}
music_btn.onRelease = function() {
gotoAndStop("music");
}
links_btn.onRelease = function() {
gotoAndStop("links");
}
about_btn.onRelease = function() {
gotoAndStop("about");
}
news_btn.onRelease = function() {
gotoAndStop("news");
}
Movieclip.prototype.openWinCentre = function (url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {
getURL ("javascript:var myWin; if(!myWin || myWin.closed){myWin = window.open('" + url + "','" + winName + "','" + "width=" + w + ",height=" + h + ",toolbar=" + toolbar + ",location=" + location + ",directories=" + directories + ",status=" + status + ",menubar=" + menubar + ",scrollbars=" + scrollbars + ",resizable=" + resizable + ",top='+((screen.height/2)-(" + h/2 + "))+',left='+((screen.width/2)-(" + w/2 + "))+'" + "')}else{myWin.focus();};void(0);");
}
Can some kind soul help me figure out how to adjust the window size?
Many thanks
lyle
PS 30 seconds in, a brief anti-war logo flashes up, don't be startled.
View Replies !
View Related
[FCS3] Menu/Button Repeat Problem
Hi there, my name is Alex Collins, and i'm sure i will be coming to this forum very often in the future. I have been using flash for ages, but I don't know much actionscript. I was making a menu for my friend today, and I came accross a problem. I attched the .fla file and the .swf file, so you can have a look. Basically, when you rollover the menu bar thingy, its meant to come up with the movie clip (in the "over" state of the menu) and play it, but instead, it just plays it halfway, and repeats over and over. I have put in stop actions to try and stop it repeating, but to no avail. It only works fully when you hold the mouse down on it??? Can anyone help me? (please)
I use Flash CS3 and Windows XP.
Thanks
Alex
FLA < here
SWF < here
View Replies !
View Related
[FCS3] Firefox Not Displaying Loaded Images
BTW this is Flash CS3 Actionscript 2.0 though.
I have created a website, http://www.stephenkiers.com/, for a client and am now testing it live on the server after testing it on my local machines fine. The problem is that for some reason the images (contained in a xml document) won't display in firefox or safari. The flash document seems to load the image, it just won't display it. The more confusing part is it works fine in IE 7 on PC.
the code to load the images is below.
Sorry if it messy, most of it was written by me, and some is modified from anothers work....
Keyframe1
Code:
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
////////////////////////////////////////////////////////
if (picturenumber == 1) {
picturenumber = numberofpictures;
gotoAndPlay("set_variable");
}
else if (picturenumber != 1) {
picturenumber -= 1;
gotoAndPlay("set_variable");
} ;
////////////////////////////////////////////////////////
} else if (Key.getCode() == Key.RIGHT) {
////////////////////////////////////////////////////////
if (picturenumber != numberofpictures) {
picturenumber += 1;
gotoAndPlay("set_variable");
}
else if (picturenumber == numberofpictures) {
picturenumber = 1;
gotoAndPlay("set_variable");
};
////////////////////////////////////////////////////////
}
};
numberofpictures = 50;
picturenumber = 1;
loadVariables("pictures.asp","");
Keyframe 30- used to confirm how many pictures there are:
Code:
if (picture1caption == "none") {numberofpictures -= 1};
if (picture2caption == "none") {numberofpictures -= 1};
if (picture3caption == "none") {numberofpictures -= 1};
if (picture4caption == "none") {numberofpictures -= 1};
if (picture5caption == "none") {numberofpictures -= 1};
if (picture6caption == "none") {numberofpictures -= 1};
if (picture7caption == "none") {numberofpictures -= 1};
if (picture8caption == "none") {numberofpictures -= 1};
if (picture9caption == "none") {numberofpictures -= 1};
if (picture10caption == "none") {numberofpictures -= 1};
if (picture11caption == "none") {numberofpictures -= 1};
if (picture12caption == "none") {numberofpictures -= 1};
if (picture13caption == "none") {numberofpictures -= 1};
if (picture14caption == "none") {numberofpictures -= 1};
if (picture15caption == "none") {numberofpictures -= 1};
if (picture16caption == "none") {numberofpictures -= 1};
if (picture17caption == "none") {numberofpictures -= 1};
if (picture18caption == "none") {numberofpictures -= 1};
if (picture19caption == "none") {numberofpictures -= 1};
if (picture20caption == "none") {numberofpictures -= 1};
if (picture21caption == "none") {numberofpictures -= 1};
if (picture22caption == "none") {numberofpictures -= 1};
if (picture23caption == "none") {numberofpictures -= 1};
if (picture24caption == "none") {numberofpictures -= 1};
if (picture25caption == "none") {numberofpictures -= 1};
if (picture26caption == "none") {numberofpictures -= 1};
if (picture27caption == "none") {numberofpictures -= 1};
if (picture28caption == "none") {numberofpictures -= 1};
if (picture29caption == "none") {numberofpictures -= 1};
if (picture20caption == "none") {numberofpictures -= 1};
if (picture31caption == "none") {numberofpictures -= 1};
if (picture32caption == "none") {numberofpictures -= 1};
if (picture33caption == "none") {numberofpictures -= 1};
if (picture34caption == "none") {numberofpictures -= 1};
if (picture35caption == "none") {numberofpictures -= 1};
if (picture36caption == "none") {numberofpictures -= 1};
if (picture37caption == "none") {numberofpictures -= 1};
if (picture38caption == "none") {numberofpictures -= 1};
if (picture39caption == "none") {numberofpictures -= 1};
if (picture40caption == "none") {numberofpictures -= 1};
if (picture41caption == "none") {numberofpictures -= 1};
if (picture42caption == "none") {numberofpictures -= 1};
if (picture43caption == "none") {numberofpictures -= 1};
if (picture44caption == "none") {numberofpictures -= 1};
if (picture45caption == "none") {numberofpictures -= 1};
if (picture46caption == "none") {numberofpictures -= 1};
if (picture47caption == "none") {numberofpictures -= 1};
if (picture48caption == "none") {numberofpictures -= 1};
if (picture49caption == "none") {numberofpictures -= 1};
if (picture50caption == "none") {numberofpictures -= 1};
Keyframe 31
Code:
if (picturenumber == 1) {src = picture1;srcname = picture1caption;}
else if (picturenumber == 2) {src = picture2;srcname = picture2caption;}
else if (picturenumber == 3) {src = picture3;srcname = picture3caption;}
else if (picturenumber == 4) {src = picture4;srcname = picture4caption;}
else if (picturenumber == 5) { src = picture5;srcname = picture5caption;}
else if (picturenumber == 6) {src = picture6;srcname = picture6caption;}
else if (picturenumber == 7) {src = picture7;srcname = picture7caption;}
else if (picturenumber == 8) {src = picture8;srcname = picture8caption;}
else if (picturenumber == 9) {src = picture9;srcname = picture9caption;}
else if (picturenumber == 10) {src = picture10;srcname = picture10caption;}
else if (picturenumber == 11) {src = picture11;srcname = picture11caption;}
else if (picturenumber == 12) {src = picture12;srcname = picture12caption;}
else if (picturenumber == 13) {src = picture13;srcname = picture13caption;}
else if (picturenumber == 14) {src = picture14;srcname = picture14caption;}
else if (picturenumber == 15) {src = picture15;srcname = picture15caption;}
else if (picturenumber == 16) {src = picture16;srcname = picture16caption;}
else if (picturenumber == 17) {src = picture17;srcname = picture17caption;}
else if (picturenumber == 18) {src = picture18;srcname = picture18caption;}
else if (picturenumber == 19) {src = picture19;srcname = picture19caption;}
else if (picturenumber == 20) {src = picture20;srcname = picture20caption;}
else if (picturenumber == 21) {src = picture21;srcname = picture21caption;}
else if (picturenumber == 22) {src = picture22;srcname = picture22caption;}
else if (picturenumber == 23) {src = picture23;srcname = picture23caption;}
else if (picturenumber == 24) {src = picture24;srcname = picture24caption;}
else if (picturenumber == 25) {src = picture25;srcname = picture25caption;}
else if (picturenumber == 26) {src = picture26;srcname = picture26caption;}
else if (picturenumber == 27) {src = picture27;srcname = picture27caption;}
else if (picturenumber == 28) {src = picture28;srcname = picture28caption;}
else if (picturenumber == 29) {src = picture29;srcname = picture29caption;}
else if (picturenumber == 30) {src = picture30;srcname = picture30caption;}
else if (picturenumber == 31) {src = picture31;srcname = picture31caption;}
else if (picturenumber == 32) {src = picture32;srcname = picture32caption;}
else if (picturenumber == 33) {src = picture33;srcname = picture33caption;}
else if (picturenumber == 34) {src = picture34;srcname = picture34caption;}
else if (picturenumber == 35) {src = picture35;srcname = picture35caption;}
else if (picturenumber == 36) {src = picture36;srcname = picture36caption;}
else if (picturenumber == 37) {src = picture37;srcname = picture37caption;}
else if (picturenumber == 38) {src = picture38;srcname = picture38caption;}
else if (picturenumber == 39) {src = picture39;srcname = picture39caption;}
else if (picturenumber == 40) {src = picture40;srcname = picture40caption;}
else if (picturenumber == 41) {src = picture41;srcname = picture41caption;}
else if (picturenumber == 42) {src = picture42;srcname = picture42caption;}
else if (picturenumber == 43) {src = picture43;srcname = picture43caption;}
else if (picturenumber == 44) {src = picture44;srcname = picture44caption;}
else if (picturenumber == 45) {src = picture45;srcname = picture45caption;}
else if (picturenumber == 46) {src = picture46;srcname = picture46caption;}
else if (picturenumber == 47) {src = picture47;srcname = picture47caption;}
else if (picturenumber == 48) {src = picture48;srcname = picture48caption;}
else if (picturenumber == 49) {src = picture49;srcname = picture49caption;}
else if (picturenumber == 50) {src = picture50;srcname = picture50caption;}
MovieClip.prototype.fadeIn = function() {
this.onEnterFrame = function() {
if (this._alpha<100) {
this._alpha += 5;
} else {
delete this.onEnterFrame;
}
};
};
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
_root.pictures._alpha = 0;
_root.bar._visible = true;
_root.loadtext._visible = true;
};
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
_root.bar._width = (lBytes/tBytes) * _root.barwidth;
_root.loadtext.text = Math.round((lBytes/tBytes)*100);
};
preload.onLoadComplete = function(targetMC) {
//_root.pictures._alpha = 100;
_root.pictures.fadeIn();
_root.bar._visible = false;
_root.loadtext._visible = false;
trace(targetMC+" finished");
};
//default image
my_mc.loadClip(src, "_root.pictures");
_root.desctxt.text = srcname;
Keyframe 45
Code:
stop();
Please ask as many questions as needed, I would love to help you help me find an answer.
View Replies !
View Related
[FCS3] Load Movie Positioning Question
I am trying to play 2 flash movies on the screen at the same time. When the main movie begins to play it will trigger the second external movie to play on the page BUT this second movie is outside of the dimensions of the main flash movie on the page. Then when the 2nd movie is done playing it unloads itself.
Is this possible to do in flash? If so, can someone point me to a tutorial or shed some light on how this is accomplished.
I am wanting to accomplish this using some type of action script I am guessing. I can get the second movie to play but it just puts it within the main movie.
Please Help.
View Replies !
View Related
|