Structure
Im having a bit of trouble understanding how to structure a website in AS3.
Here is what i am trying to accomplish.
The splash page starts out in a maximum browser size. Loads a background image which i want to scale relatively and not distort, date and time bubble in with some filter effects, then title fades in. When user hits the enter button, the background changes, and main UI loads centered on page.
Im guessing all this can be done with 1 frame, and all the tweens can be controlled from the main.as class??
So looking at this I imagine the structure of the site like this.
Main.fla
main.as - sets up the stage properties and utilizes all other classes?
then custom classes
date.as for displaying the date and time. ( not sure if i should incorporate the transition effects into this or make new class)
transition.as - for creating the transition effects for date/time and title fade in.
loader.as - for loading the background image
preloader.as - creates a custom preloader
would this be correct, or am i tottaly wrong here.
Actionscript 3.0
Posted on: Thu Aug 28, 2008 3:06 pm
View Complete Forum Thread with Replies
Sponsored Links:
Structure
hey there...
I have a movie on level0 that loads a movie on level1 a digital map.... when the user clicks on the desired location on the map a new movie appears on level0 and so forth corresponding movies on level1... Now I want to back (after the user has clicked a destination) to the original first movies on level0..
I have heard that unloading level0 or loading on top of it really doesn't work well with flash...
here is my question... How should I strucutre this site then? I have been suggeted to have a root movie witha container clip, but I did not understand this? any one please...
THX ..
DR
View Replies !
View Related
Structure
Can someone explain how I should structure a Flash site because i hear everyone talking about 'scenes' and stuff and all I do is put everything on the one animation. Cheers.
View Replies !
View Related
[F5] (AS1) XML Structure?
Hey people!
I'm pretty new with dealing with xml, so there might be a really easy solution, but I can't seem to be able to find it. The thing is - I have a flash file which structures data from this xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<real>
<rt o="order.vsp?itemId=10498&mode=RT" t="Jul+i+Skomakergata" p="Henki+Kolstad"
s="http://cpgw.paragallo.com/cpgw/getPreview.aspx?cguid=AC50AE5FD7E14C7FBE35E99CFA7BE9CB"/>
<rt o="order.vsp?itemId=1067624&mode=RT" t="Beggin" p="Madcon" s="/static/drm/bonnier/Madco-Begg-15089_real220k.mp3"/>
<rt o="order.vsp?itemId=58054&mode=RT" t="En+stjerne+skinner+i+natt" p="Oslo+Gospel+Choir" s="http://cpgw.paragallo.com/cpgw/getPreview.aspx?cguid=A45BFC7B67E040F7AA842B17B1F7D2F9"/>
<rt o="order.vsp?itemId=1009512&mode=RT" t="Apologize" p="Timbaland+ft.+Onere..."
s="http://medias.digiplug.net/medias/mp/10/web_mp3_32kbs_22khz_m/m763210.mp3"/>
<rt o="order.vsp?itemId=127898&mode=RT" t="Jingle+Bells" p="Christmas+%28Sinatra%29"
s="/static/aspiro/ringtone/real/prev/10420.mp3"/>
<rt o="order.vsp?itemId=189010&mode=RT" t="ALL+I+WANT+FOR+CHRISTMAS+IS+YO+..." p="Mariah+Carey"
s="/static/drm/sonybmg/partnersaspiroaudiomp3_prw/MariahCarey_AllIWantForChristmasIsYou.mp3"/>
<rt o="order.vsp?itemId=9631&mode=RT" t="Last+Christmas" p="George+Michael%2F+Wha..."
s="/static/drm/Wham!_LastChristmas.mp3"/>
</real>
<wmedia>
<ft o="order.vsp?itemId=10498&mode=RT" t="song" p="ft1"
s="http://cpgw.paragallo.com/cpgw/getPreview.aspx?cguid=AC50AE5FD7E14C7FBE35E99CFA7BE9CB"/>
<ft o="order.vsp?itemId=1067624&mode=RT" t="Beggin" p="ft2" s="/static/drm/bonnier/Madco-Begg-15089_real220k.mp3"/>
<ft o="order.vsp?itemId=58054&mode=RT" t="En+stjerne+skinner+i+natt" ft3"
s="http://cpgw.paragallo.com/cpgw/getPreview.aspx?cguid=A45BFC7B67E040F7AA842B17B1F7D2F9"/>
<ft o="order.vsp?itemId=1009512&mode=RT" t="Apologize" p="ft4"
s="http://medias.digiplug.net/medias/mp/10/web_mp3_32kbs_22khz_m/m763210.mp3"/>
<ft o="order.vsp?itemId=127898&mode=RT" t="Jingle+Bells" p="Christmas+%28Sinatra%29"
s="/static/aspiro/ringtone/real/prev/10420.mp3"/>
<ft o="order.vsp?itemId=189010&mode=RT" t="ALL+I+WANT+FOR+CHRISTMAS+IS+YO+..." p="Mariah+Carey"
s="/static/drm/sonybmg/partnersaspiroaudiomp3_prw/MariahCarey_AllIWantForChristmasIsYou.mp3"/>
<ft o="order.vsp?itemId=9631&mode=RT" t="Last+Christmas" p="George+Michael%2F+Wha..."
s="/static/drm/Wham!_LastChristmas.mp3"/>
</wmedia>
And I'm able to call the real tags, using just:
Code:
baseXML.firstChild.childNodes[m].attributes.t;
So if I do that it works with the REAL content...
but when i try to call the wmedia tags with
Code:
baseXML.firstChild.nextSibling.childNodes[m].attributes.t;
it doesnt work. See faulty code here:
Code:
function wmedia() {
for (m=0; m<4; m++) {
k=m%5;
//if (_root["item"+i] == undefined) {
cl = _root.attachMovie("item", "item"+m, m);
//}
cl.t = baseXML.firstChild.nextSibling.childNodes[m].attributes.t;
cl.p = baseXML.firstChild.nextSibling.childNodes[m].attributes.p;
cl.s = baseXML.firstChild.nextSibling.childNodes[m].attributes.s;
cl.o = baseXML.firstChild.nextSibling.childNodes[m].attributes.o;
//cl.artist.text = (i+1)+". "+unescape(cl.p.convert().substr(0,10)).toUpperCase()+".. - "+unescape(cl.t.convert()).toUpperCase();
cl.artist.text = (m+1)+". "+unescape(cl.p.convert().substr(0,10)).toUpperCase()+".. - "+unescape(cl.t.convert()).toUpperCase();
cl.n = m;
cl._y = 152+23*k;
cl._x = 8;
}
}
clip = _root.createEmptyMovieClip("container", 1);
clip.loadMovie("http://www.kenobi.se/flash/xmlproxy.swf");
What am I doing wrong? Thankful for any help
View Replies !
View Related
An OOP Structure
So here's what I'm trying to do: (in AS 2.0)
I have a movieclip called mc_drawshape. In that MC rests multiple circle movieclips which I call nodes (instance named "node1", "node2", etc). Now in my game, when one node is selected, you'll be able to drag your mouse in a drawing fashion to another node that is linked. All those nodes and links together form a shape.
So if I had a square, for example, with a node at each of the four corners, and the top left node was selected, then the player could go right or down towards the next node.
What I want is to be able to easily make a shape, which I can create nodes within, each of which have 1 or 2 linked nodes. So basically, in my mc_drawshape movieclip, if I have a frame, say it's called "square", I would put the 4 nodes where I want them to be, and then on the scripting side, I attach all the info to them.
So the structure I'm currently thinking of going with is having a class, say it's called Shape, and a class called Node. The Node class would extend Movieclip, and its constructor would pull in the assigned movieclip as an argument. This movieclip would be passed through AddNode, a memeber function of the Shape class.
So, for example...
var Square:Shape = new Shape();
Square.AddNode(mc_drawshape.node1);
And inside AddNode I would create the instance of the Node.
This is all I've been able to come up with myself, but I'm really, REALLY new to Object-Oriented Programming, so I'm not quite sure where to go from here. I have a lot of trouble knowing what functions or variables should go in which class...
The main things I'm missing is how to store which nodes are linked to a particular node. I'm also not sure how to manipulate specific nodes if I'm only creating instances of them within a Shape instance.
So any tips, ideas and suggestions would be greatly appreciated. In any case, I'll be returning to this thread often if there's any response. I'm hoping to learn a lot from this experience.
Thanks,
~ Pol
View Replies !
View Related
XML Structure
Hi,
I'm trying out the best way to strucure my XML document.
I need to have:
Sections (6)
sub sections (10)
thumbnail images (8)
main images (8)
Can anyone suggest how to write the xml for one of the six sections?
Cheers
View Replies !
View Related
Tab Structure
I add several instance of a clip from the library to a container clip on the stage, each instance has an input field within it and a button. I want to be able to move from one input field to the next with the tab key whilst skipping the buttons but can't make it work. I either tab between the button and the field repeatedly within one movie or cant tab anywhere (when tabIndex is set). Any thoughts on the subject please as I am stumped and pretty fed up with looking at it.
Cheers all
View Replies !
View Related
XML Structure
Hey
Is there someone who could tell me how to call this xml data from flash.
I usually use this:
Code:
<resources>
<item name="" description="" pic="" visit=""/>
<item name="" description="" pic="" visit=""/>
<item name="" description="" pic="" visit=""/>
<item name="" description="" pic="" visit=""/>
<item name="" description="" pic="" visit=""/>
<item name="" description="" pic="" visit=""/>
...
</resources>
but I'd like to create something like this:
Code:
<resources>
<item name="" description="" pic="" visit=""/>
<item name="" description="" pic="" visit=""/>
</resources>
<fora>
<item name="" description="" pic="" visit=""/>
<item name="" description="" pic="" visit=""/>
</fora>
so how should I call the "resources" and "fora" data?
thanx
View Replies !
View Related
Structure Of Xml
How do I format the structure of xml
from:
<root><news><title>title text</title><body>body text</body></news></root>
to:
<root>
<news>
<title>title text</title>
<body>body text</body>
</news>
</root>
//code
var news_xml:XML = new XML();
news_xml.ignoreWhite = true;
AddNewsEntry();
//
function AddNewsEntry() {
var newsRoot:XMLNode = news_xml.createElement("root");
var newsNode:XMLNode = news_xml.createElement("news");
var titleNode:XMLNode = news_xml.createElement("title");
var bodyNode:XMLNode = news_xml.createElement("body");
var titleText:XMLNode = news_xml.createTextNode("title text");
var bodyText:XMLNode = news_xml.createTextNode("body text");
//
news_xml.appendChild(newsRoot);
newsNode.appendChild(titleNode);
newsNode.appendChild(bodyNode);
newsRoot.appendChild(newsNode);
titleNode.appendChild(titleText);
bodyNode.appendChild(bodyText);
}
//
trace(news_xml);
View Replies !
View Related
Structure Structure Structure
Hey there everyone,
I'm having trouble creating a good structure on my website. Currently I have it so I have the document class called Main.as. That loads all the preliminary stuff. I have a Homepage.as Class which has two addChild methods on the constructor. I make an instance of homepage on Main.as but it won't load the images! Why!?
On Main.as:
homePage = new HomePage();
On HomePage.as(constructor):
addChild(introText);
addChild(mainTent);
I'm I structuring this wrong. Should I have have a Homepage.as and a Contact.as, etc...
View Replies !
View Related
XML Structure
Hey
Is there someone who could tell me how to call this xml data from flash.
I usually use this:
Code:
<resources>
<item name="" description="" pic="" visit=""/>
<item name="" description="" pic="" visit=""/>
<item name="" description="" pic="" visit=""/>
<item name="" description="" pic="" visit=""/>
<item name="" description="" pic="" visit=""/>
<item name="" description="" pic="" visit=""/>
...
</resources>
but I'd like to create something like this:
Code:
<resources>
<item name="" description="" pic="" visit=""/>
<item name="" description="" pic="" visit=""/>
</resources>
<fora>
<item name="" description="" pic="" visit=""/>
<item name="" description="" pic="" visit=""/>
</fora>
so how should I call the "resources" and "fora" data?
thanx
View Replies !
View Related
Need Some Structure, Please Help
Okay, so I have this project that I have been working on since just after the earth cooled (not literally, but it feels like it). Because I have had the luxury of no deadlines on this project, I have taken full advantage of this and used the site to experiment and learn Flash. For that I am grateful.
My big problem, however is now that I feel like I could code just about anything that I would need to make a really dynamic, exciting site, I just can't decide where to start or how to structure things...Who would've guessed that all this time learning how to write some really cool code is useless when you can't pull it all together.
I can't decide if I should have a common preloader for all sections and a flyout menu to traverse between sections or if each section should have it's own preloader. Should I use XML to generate my configuration parameters or should I use a PHP/SQL system (which I have written a dozen of now to dynamically generate the config parameters)? Should my mainMenu be setup as an AbstractFactory whereby I can re-use it for each section in case there's a section menu? And then what about transitions? do I have a centralized transitionHandler that handles both the transitions between sections as well as any transitions between progressMeters? Or what about progressMeters? should I have one progress meter for loading sections and then each section can have a progressMeter or loading assets?
If you have ever been in this situation, I could use a word of encouragement, because now that I am finally feeling good about the programming skills, I feel the wind has been taken out of my sails that I can't make a simple website because I have too many options and too many ideas and no experience to guide me.
Could someone please gimme some advice about not only how to figure this out, but perhaps a simple structure that I can use (without analyzing it to death) that will get the job done and give me some idea about how to put it all together. A structure that would allow me to upgrade pieces without having to rework the entire system...
Any help would be greatly appreciated.
Thanks in advance,
jase
View Replies !
View Related
Structure
Im having a bit of trouble understanding how to structure a website in AS3.
Here is what i am trying to accomplish.
The splash page starts out in a maximum browser size. Loads a background image which i want to scale relatively and not distort, date and time bubble in with some filter effects, then title fades in. When user hits the enter button, the background changes, and main UI loads centered on page.
Im guessing all this can be done with 1 frame, and all the tweens can be controlled from the main.as class??
So looking at this I imagine the structure of the site like this.
Main.fla
main.as - sets up the stage properties and utilizes all other classes?
then custom classes
date.as for displaying the date and time. ( not sure if i should incorporate the transition effects into this or make new class)
transition.as - for creating the transition effects for date/time and title fade in.
loader.as - for loading the background image
preloader.as - creates a custom preloader
would this be correct, or am i tottaly wrong here.
View Replies !
View Related
How To Structure Function
hi
i'm having trouble with how to write functions...
i've got a mc called ball3 - if i write the function like this...
function setDrag () {
if (_root.firstDrag == true && _root.isDrag == true) {
ball3._y = control._y;
ball3._x = control._x;
}
}
... & call it like this...
_root.setDrag ();
... it works fine
but like this...
function setDrag (nameIt) {
if (_root.firstDrag == true && _root.isDrag == true) {
nameIt._y = control._y;
nameIt._x = control._x;
}
}
... and calling it like this
_root.setDrag (ball3);
... it doesn't work
does anyone know why???
thanks for your help
View Replies !
View Related
Help Structure Scene.
hi, thanks for reading this.
I have a 1 scene movie, 1 layer with 1 frame. In the frame, I added an audio mc i want to loop, some animations and a clock. The movie works fine as a stand alone scene.
I added a new scene with a preloader. Now, after preloader loads mainscene, I get a loop back to preloader, so I added a stop frame to my main scene to prevent the loop, and that kills my animation.
Here's my question, How can I properly add a command so that my mainscene doesn't loop back to the scene before it (preloader)? I've tried using a stop command before, after and on the same frame as the main scene -- I kill the loop, but it stop's my animation. Any ideas?
Thanks for your time and help
View Replies !
View Related
XML & Array Structure
All these childNodes, firstChild & nextSibling seem pretty streight forward, but for some reason I can't get any other variable than -number- in each -lot- to trace. I have setup the other arrays the same as -lot- as a starting point. Can anyone help me with the arrays to get the status, size & price of each -lot-?
Here is my XML:
-?xml version="1.0" ?-
-retreat-
-lot-
-number-1-/number-
-status-a-/status-
-size-0.65-/size-
-price-$65,000-/price-
-/lot-
-lot-
-number-2-/number-
-status-a-/status-
-size-0.55-/size-
-price-$95,000-/price-
-/lot-
-lot-
-number-3-/number-
-status-a-/status-
-size-0.75-/size-
-price-$75,000-/price-
-/lot-
-lot-
-number-4-/number-
-status-a-/status-
-size-0.85-/size-
-price-$99,000-/price-
-/lot-
-lot-
-number-5-/number-
-status-a-/status-
-size-0.32-/size-
-price-$62,000-/price-
-/lot-
-/retreat-*/
Here is my script:
lotvars = new XML();
lotvars.load("lot_retreat.xml");
lotlist = new Array();
statuslist = new Array();
sizelist = new Array();
pricelist = new Array();
function myOnLoad () {
lotlist = lotvars.firstChild.childNodes;
statuslist = lotvars.firstChild.childNodes;
sizelist = lotvars.firstChild.childNodes;
pricelist = lotvars.firstChild.childNodes;
trace ("lotlist [0].fc.fc.nv: "+lotlist [0].firstChild.firstChild.nodeValue);
trace ("statuslist [0].fc.fc.nv: "+statuslist [0].firstChild.firstChild.nodeValue);
trace ("sizelist [0].fc.fc.nv: "+sizelist [0].firstChild.firstChild.nodeValue);
trace ("pricelist [0].fc.fc.nv: "+pricelist [0].firstChild.firstChild.nodeValue);
trace ("lotlist [1].fc.fc.nv: "+lotlist [1].firstChild.firstChild.nodeValue);
trace ("statuslist [1].fc.fc.nv: "+statuslist [1].firstChild.firstChild.nodeValue);
trace ("sizelist [1].fc.fc.nv: "+sizelist [1].firstChild.firstChild.nodeValue);
trace ("pricelist [1].fc.fc.nv: "+pricelist [1].firstChild.firstChild.nodeValue);
trace ("lotlist [2].fc.fc.nv: "+lotlist [2].firstChild.firstChild.nodeValue);
trace ("statuslist [2].fc.fc.nv: "+statuslist [2].firstChild.firstChild.nodeValue);
trace ("sizelist [2].fc.fc.nv: "+sizelist [2].firstChild.firstChild.nodeValue);
trace ("pricelist [2].fc.fc.nv: "+pricelist [2].firstChild.firstChild.nodeValue);
trace ("lotlist [3].fc.fc.nv: "+lotlist [3].firstChild.firstChild.nodeValue);
trace ("statuslist [3].fc.fc.nv: "+statuslist [3].firstChild.firstChild.nodeValue);
trace ("sizelist [3].fc.fc.nv: "+sizelist [3].firstChild.firstChild.nodeValue);
trace ("pricelist [3].fc.fc.nv: "+pricelist [3].firstChild.firstChild.nodeValue);
trace ("lotlist [4].fc.fc.nv: "+lotlist [4].firstChild.firstChild.nodeValue);
trace ("statuslist [4].fc.fc.nv: "+statuslist [4].firstChild.firstChild.nodeValue);
trace ("sizelist [4].fc.fc.nv: "+sizelist [4].firstChild.firstChild.nodeValue);
trace ("pricelist [4].fc.fc.nv: "+pricelist [4].firstChild.firstChild.nodeValue);
}
lotvars.onLoad = myOnLoad;
lotvars.ignoreWhite=1
stop ();
View Replies !
View Related
If Structure Problem
why does it always forward?
here is my actionscript
i load a variable from asp and if it plze then it has to go to main.htm
errormsg = "";
var rn = Math.round(Math.random()*1000000);
loadVariablesNum ("../asp/login.asp?reload="+rn, 0);
if (errormsg eq plze) {
getURL ("../gevorst/html/main.htm");
}
stop ();
could anyone help me out here tnx
J-ke
View Replies !
View Related
Cd-rom Structure - Loadmovie
hi,
okay, i have a movie/swf that is basically outside of a folder which contains the data and other swf's of the cd-rom. the problem is that i cant seem to load the next swf that is in the data folder.
its says in the flash help that i cant load another movie/swf if it resides in a folder, it has to be in the same folder as the original swf.. is this true? if so the front end of my cd-rom is gona look well messy as i have a s**t load of files that it loads up.
the front end looks like...
----------------------------------------------
start.exe (flash projector)
data (folder containing all other swf & jpegs)
autorun.inf
----------------------------------------------
any help would be great!
View Replies !
View Related
Movie Structure
Hey, All
I'm probably making this hard then it really is, but I've exausted all creative ideas of solving this, so I'm at flashkit.
I've got a movie: http://www.khaus.com/flash.htm: prolly to big to attach.
Q. Got a movie with a few layers in Scene 1. Staggered like so:
NAVA NAVA
-ONE
--TWO
---THREE
NAVA =the navagation
ONE =drag'n drop objects
TWO =movie clip. selects a background number, in a rollover fashion
THREE =background RBG color slider/changer.
Problem is when you open the movie you see THREE first. Ok, change background color. Then you go to TWO. Select a background number. Ok, now go to THREE, drag'n drop item. Ok good so far. QQQuestion/PPProblem is when you go back to THREE from ONE or TWO you lose the background number selected. What can I do to keep the selection from TWO present at when going back to THREE?
Thanks in advance.
K
View Replies !
View Related
Structure Challenge
Hey, All
I'm probably making this hard then it really is, but I've exausted all creative ideas of solving this, so I'm at flashkit.
I've got a movie: http://www.khaus.com/flash.htm: prolly to big to attach.
Q. Got a movie with a few layers in Scene 1. Staggered like so:
NAVA NAVA
-ONE
--TWO
---THREE
NAVA =the navagation
ONE =drag'n drop objects
TWO =movie clip. selects a background number, in a rollover fashion
THREE =background RBG color slider/changer.
Problem is when you open the movie you see THREE first. Ok, change background color. Then you go to TWO. Select a background number. Ok, now go to THREE, drag'n drop item. Ok good so far. QQQuestion/PPProblem is when you go back to THREE from ONE or TWO you lose the background number selected. What can I do to keep the selection from TWO present at when going back to THREE?
Thanks in advance.
K
View Replies !
View Related
Site Structure
I am designing a flash site, using a lot of external swfs that load into empty mcs. It is a large enough site that I have a lot of folders and subfolders to keep it organized.
My problem is that using loadMovie is easy when everything is in the same folder, but it is extremely tedious when I have to figure out the path to everything with all of my subfolders. The question is:
should I be putting everything in the same folder for ease of writing?
should I quit whining and go through the tedium of figuring out all the paths?
or am I missing an easier way to do this?
In other words, how does everyone else do this?
View Replies !
View Related
Movie Structure
any suggestions for the structure of how i can do this type of movie?
4 options on an initial menu screen
ie (colors, numbers, letters, vehicles)
each option brings the user to a yes or no option (happens for 50+ frames per initial menu option)
i thought that structuring each menu item as a seperate scene would work well for categorical reasons due to the large number of frames used, but that turned out to be a huge mess. i was wondering if anyone had any suggestions on how to structure differently.
any suggestions?
View Replies !
View Related
Movie Structure
any suggestions for the structure of how i can do this type of movie?
4 options on an initial menu screen
ie (colors, numbers, letters, vehicles)
each option brings the user to a yes or no option (happens for 50+ frames per initial menu option)
i thought that structuring each menu item as a seperate scene would work well for categorical reasons due to the large number of frames used, but that turned out to be a huge mess. i was wondering if anyone had any suggestions on how to structure differently.
any suggestions?
View Replies !
View Related
Best Structure For Streaming?
I'm creating a large online annual report which will incorporate over 70 pages of text and charts as well as music into one online presentation. It has to be set up in such a way that allows it to stream relatively quickly and I was wondering what would be the best way to set it up? Am I better off breaking each section into a separate .swf?
Any advice would be greatly appreciated.
Thanks,
Kosmo
View Replies !
View Related
.fla Structure Corrupted?
I'm fairly new to using Flash, and have been having a problem with a fairly large movie I spent quite a lot of time on.
After re-installing my O/S any trying to edit the .fla all the layers had been replaced by two empty ones and nothing else, all the components are still in the library but the structure has dissapeared completely.
I saved two different versions; one with hi-res movie footage and the other with low-res, but both have exactly the same problem.
Did I do something wrong saving the .fla or am I missing something obvious?
Any help and advice would be greatly appreciated.
View Replies !
View Related
.fla Structure Corrupted?
I'm fairly new to using Flash, and have been having a problem with a fairly large movie I spent quite a lot of time on.
After re-installing my O/S any trying to edit the .fla all the layers had been replaced by two empty ones and nothing else, all the components are still in the library but the structure has dissapeared completely.
I saved two different versions; one with hi-res movie footage and the other with low-res, but both have exactly the same problem.
Did I do something wrong saving the .fla or am I missing something obvious?
Any help and advice would be greatly appreciated.
P.S Sorry for the double post, but was told I might get better luck posting on here rather than in the newbie forum!
View Replies !
View Related
Tree Structure...
I am developing an interface, which will allow navigation between quite a lot of samples. Having done a few experiments previously I am of the opinion that generating the buttons in script from some sort of array would be best.
If my structure would be something like this
Code:
A---1---xA.1.1
---xA.1.2
---xA.1.3
---2---xA.2.1
---xA.2.2
B---1---xB.1.1
---2---xB.2.1
---xB.2.2
etc. etc.
would the best way of representing it be
Code:
main = newArray()
main[0]= null
main[1]= [ ["xA.1.1", "xA.1.2", "xA.1.3"], ["xA.2.1", "xA.2.2"] ]
main[2]= [ ["xB.1.1", ["xB.2.1", "xB.2.2"] ]
and so on,
I also realise that if I use objects I could hold other information, but I guess really what I'm asking is, is there a different or better way of doing this?
View Replies !
View Related
RE:movie Structure
first site teething problems...
I’ve created a kinetic navigation system with moving movie clips that stop on a rollova… the clips are 2 levels above the root level. I’m trying to get them to tell the main timeline to pop bak to scene one. Current script attached to the button movies looks like this:
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_parent.gotoAndStop("scene 1", 1);
trace(“click”);
}
}
The output window says “click” but no scene 1..HELP!!
I tried putting a button at the root level and with on (release)…gotoandstop etc. and it works ok…
I then tried targeting a movie clip with two frames that I placed on the main stage.. I can control the clip with the buttons. So why can't I jump back to the scene one? This is very frustrating!
I'm currently using the scenes to divide up my content with a seperate preloader for each scene.. maybe I should use individual movies with the loadMovie thingi instead? I'd really like to know why my movie won't work in its current state tho!
Any explination will probably save my computer, my monitor and perhaps myself from being ejected from my bedroom window.. and would be most appreciated!
Cheers..
Nik
View Replies !
View Related
If Statement Structure.
Hi,
so heres what i am trying to do:
onClipEvent (enterFrame) {
if (_root.newsday < 2) {
if(this._alpha>50){
this._alpha-=5;
} else {
this._alpha = 100;
}
}
clearly not going to work so how do i refer to a if statement within a if statement?
cheers,
G
View Replies !
View Related
How Would You Structure My Movie?
Hi all,
I'd like your input on that one, you expert flash geeks
I wanna to do something I consider to be complex. But, then I'm not yet a flash geek, but I'm hoping to become one very soon So maybe it's simple after all.
I have a main menu. From there the user can access section 1, section 2 or section 3. Each of these sections have a certain number of frames with different images (let's call them sub-sections : 1.1, 1.2, 1.3 and so on).
I want to create a play all button that would play all the frames (sub-sections) in sequence up to the end of that section. Then it would have to jump back to the main menu.
Also, I want the user to be able to interrup at any time the automatic play by pressing the Esc key. it would then jump back to the main menu. while resetting the play all button.
And finally, I want the users to be able to navigate by themselves (manually) on the site. I want to give them the full power of choosing which sections (and sub-sections) they want to see. They would have to be able to watch sub-section 1.4 and in less that 2 clicks be able to jump to sub-section 3.5, for instance.
(by the way, that last part I know how to do, it's just how to make it work along with the automatic thing) (how to override the stop() function.
Could I possibly use 2 different scenes? I've been warned about using scenes... I would prefer not to. it would probably means more work with scenes.
Thanks a lot for your help
View Replies !
View Related
How To Structure A Website?
Hi
Ive just read sam's teach yourself flash in 24 hours, thats the only knowledge of flash i have so far. Its introduced me to the concepts, but now ive finished the book and want to sit down and make a website i have no idea how to set it up?
I want a menu with options to goto different part of the website, but i have no idea how to achieve this. Do i make one big timeline and label the starting frame of each new page of the website and then 'goto' it when a button is pressed? Or do i put each page in a new scene and goto the scene when a button is pressed? Or do i even make different swf's for each page and link them together?
Thanks in advance
john
View Replies !
View Related
Design And Structure Of AS 2.0
Hi,
i'm just starting to get my head around OOP and AS2.0. I want to create a number of classes and sub classes, where the methods might vary from project to project. Now what I don't know is do I just lump all the varying methods into the classes as I do them in each project, or is their a way that the classes can pull in what methods they need dynamically, or I am getting this OOP business all wrong?!?
thanks for any advice.
boombanguk
View Replies !
View Related
Directory Structure
I'm looking for a way to reference movie clips in a directory that is not a child of the flash root directory.
I have the SWF file in a "SWF" folder which is on the server root. Then also on the server root is an "images" folder. I'm calling the loadMovie() procedure to load images, but want to be able to load images from the "images" folder.
I can't just specify a relative path, as the swf defaults the root directory to the directory the file is located. I attempted the old Unix trick of setting the path to "../Images" but flash doesn't like that. Right now the only options is to set the path as an absolute, using the full "Http://" address, but that means I'd have to go back and change every single instance when I transfer the project over to the main server.
anyone know how to do this?
View Replies !
View Related
[F8] Class Structure
I have had no luck in finding a tutorial, forum thread, or even book, that explains how to structure the class "skeleton" when creating an RIA. I want to create a website that is a 100% Flash enviroment. As I create each part of the site, i.e. navigation, php interaction, content format..., I find that I am going back and editing several class files, dropping functionality from them that I am covering with a new class. I am sure that there is some standard structure for class files in a full-Flash site, and I'm just not aware of it. I don't need a full tutorial on every detail, just a basic class structure. I am just tired of writing overlapping code. Also, seeing some structure examples would help me figure out the order of events I need to follow when I initialize the movie.
Oh, and maybe a basic structure for the base .fla also. There is a standard structure for writing class files, why can't I find one for writing a basic Flash website?
Any advice would be greatly appreciated. I am sure there are plenty of techniques better than the one I am using that would save me lots or rewriting code.
Thanks.
View Replies !
View Related
Site Structure
Less of a question but more of an inquirey, would anyone have a good clue how a site like this. http://www.trevorjackson.org was put together.
In terms of site structure and the way it loads so quickly, was the timeline broken up with external loading movie clips etc.
appreciate any thoughts
Cheers
View Replies !
View Related
Structure Of A Game In AS3
Hi, I'm starting to get familiar with AS3 elements, but I'm stuck when it comes to building a code structure for my game.
In a game consisting of a game menu (with settings, high scores etc.) and the actual game with several levels, where the menu is written in one class or one package, and the game itself in one or several others, what's a good way to jump between the menus and the game, and between the levels etc.? In AS2, I used one set of frames for the menu, and one for the game. I don't want to use the frames like that any more.
View Replies !
View Related
The Best Site Structure?
Hello everyone and Happy new year!!
Im not that new to flash but im not that experienced either.
Im currently designing a website that will host photographs in Flash.
i was wondering what would be the best way to develop the site? how should i structure the site??
im not sure which is the best way, because in the "work" page there is a number o different external slideshows i will be showing.
below is the site map of what im trying to achieve.
has anyone done anything like this before that can give me any advise please?
View Replies !
View Related
Best Way To Structure A Menu
I'm making a flash app which is basically just a menu (main screen). When you select a button, a new sub-menu should show up.
What I'm wondering is, what's the best structure for setting something like this up?
Should I have a movieHolder and load each menu in as required?
Also, I'm trying to think of a good intro & outro for each menu. Does anyone have any cool examples that might inspire me?
As of right now I'll probably just go with a simple fade-in + fade-out.
View Replies !
View Related
Demo Cd Structure
Hi guys, I'm creating a demo CD but have got a little stuck. I have some self contained flash applications and they need to be put onto a cd.
I want to autorun the cd, so a menu screen comes up where you can select which application you want to run.
However i can't think how to do it. I can't really load each application into a main one as a lot will need changing in each application to get them to work with regards to scoping issues.
Does anyone have any ideas about the best way to do this?
Could i run the main menu at startup, then when you select an application that application starts up and the other one closes?
View Replies !
View Related
Building Structure Map
Hi
I am planning to make a map of building(s) which have cubicles, conference rooms and other rooms etc
I will have facitility for search like say name of the person and then it will show which section of the building the person is sitting bu going to the database and showing the correspdonging section of the building in red in the map and clicking on it will zoom it and show the location of the person (Visual Search)
What would be the best way to implement it
I want to make it for the browser
Can it be done in PHP?
How best the drawings can be made? nothing fancy( 2D will do), but it should be clear and resemble the original building structure
View Replies !
View Related
Secrets Of Structure
So how about something like: http://www.lanalandis.com/ or even the creators at: http://www.24-7media.de/ and anything in their portfolio.
The creativity in the actual art direction and design are the overwhelming value of such a company.
What I'm wondering, is how are so many large graphics that are used as movie clips and such loaded so quickly?
What are the high-level conceptual/structural ideas of such sites? Runtime shared libraries? Cached bitmaps?
I've never really seen a good thread or article about the basic structure that so many studios like above or 2advanced.com, juxtinteractive and such places use. Surely there are techniques that all the 'big' guys use that aren't proprietary...it's just efficient and proper use of techniques in Flash.
Anyone have a 'formula' that is put into play regardless of what design contributes or demads?
Like, "I always plan to preload the two most important sections of a site first and then offer preloaders for the other sections. And I always use bitmap as cache and shared libraries for.." etc.
Just wondering about the conceptual approach to structure that should/could exist regardless to the level of complexity.
View Replies !
View Related
Packages Structure
Some time ago I started to build kind of framework (basicly containing usefull assets) and I wanna ask you about package naiming practices.
Let's say I am building some kind of player Player with own events and states.
First solution would be to put all classes in the same package
com.domain.video
---MyPlayer
---MyPlayerState
---MyPlayerEvents
The main disadvantage in this case for me it that MyPlayer class is in one package with 'helper' classes.
Secound aproach would be to split classes by 'type' and put them do diffrent packages.
com.domain.video
---MyPlayer
com.domain.consts
---MyPlayerState
com.domain.events
---MyPlayerEvents
I know it just metter of preferences. I just wanna know what do you think about secound aproach and how you deal with packages structure. Examples would be nice.
View Replies !
View Related
How To Structure Website
Hi all,
Im unsure how to go about building a website in as3. I want to create a full screen flash portfolio type project. In the background I have an actionscript coded color background that shifts color and is quite processor intensive so I dont want to be reloading this every page. On one page I have a photo slideshow, another an about me page, another a blog.
Is the best way to create the background and navigation, then addChild(about me class), then to go to another page removeChild(about me class) & addChild(slideshow)? Or should I be loading swf's into a container?
Or should I use keyframes similar to this flash8 tutorial and set up my global variables, xml, css, first???
http://www.kirupa.com/developer/flash8/best_structure_flash_site.htm
Please help.
View Replies !
View Related
Read C Structure
Hello,
I have to create a client using socket, the server send data with differents C structure.
I wanna know if it exist a class which enable to read it or if I must parse the message byte by byte?
Thanks..
View Replies !
View Related
Possible To Pass A Structure From AS3 To CF8?
I'm trying to pass a structure to a ColdFusion component from Flash but it keeps failing with this error:
"Unknown object type tag (17)"
Here's my AS. I've tried using Array, Object, and Dictionary as types:
ActionScript Code:
loadData_btn.addEventListener(MouseEvent.MOUSE_DOWN, loadData)
var myService = new NetConnection()
myService.connect("http://localhost/flashservices/gateway/")
function loadData(evt:MouseEvent){
var responder = new Responder(getTest_Result, onFault);
var mystruct:Array = new Array();
mystruct["mystring"] = "hello";
myService.call("com.mycomponent.test", responder, mystruct);
}
function getTest_Result(result){
trace("success: "+ result);
}
function onFault( f){
trace("There was a problem: " + f.description);
}
...and here's my component function (I've tried with an argument type of 'struct' as well as 'any':
Code:
<cffunction name="test" output="no" access="remote" returntype="string" >
<cfargument name="argstruct" type="any" required="yes" />
<cfset mystr =arguments.argstruct["mystring"]>
<cfreturn mystr />
</cffunction>
I was successful in sending and returning a string as a test to ensure that the apps were set up correctly. It's only when I try to pass a struct that I get an error.
Thanks in advance for any help,
Glenn
View Replies !
View Related
How To Match A XML Structure....
ok then... i´ve been looking for an easy-ish way to do this...
what i need to do, is to somehow find out if the STRUCTURE of an XML object matches that of another...
there are plenty of methods to match to CONTENTS of an XML but for the STRUCTURE itself i can´t find anything...
can anybode point me in a way to do this effeciently?
thanks in advance,
Moach
View Replies !
View Related
Website Structure Help
hi, im learning as3 at the moment and have made 2 or 3 websites so far
i need some clarification
im using different SWF's for different pages
eg , HOME, FAQ and contact us
the scripting is done on the main parent movie and then the external SWFs loaded once the corresponding button is clicked
is this the best way to go about structuring a website or is there a better way? id really like to get straight into the best possible way so if anyone has any input about their experiences, this would be greatly appreciated and would clear the headache
in fact any advice given on this matter would definitely help
thanks
//brother in need
View Replies !
View Related
Structure Problem
Hey people,
I'm tracking down bugs and have the following problem :
the user can get to a page with scrollable text by two different ways, an index screen and by the menu. Both do the same (they call a function with a switch statement. of course, the same case).
What happens is that when selected by the menu, the .maxscroll value is 1, which is supposed to be 7. If I select the page again once loaded already, I get my maxscroll of 7.
From the switch statement I call another function :
ActionScript Code:
function RapportSelection(rapSel) {
if (_root.mainDummy.rapportClip.Cover._currentframe == 1) {
_root.mainDummy.rapportOpen.gotoAndPlay(2);
}
_root.mainDummy.rapportClip.Cover.Page.gotoAndPlay(rapSel);
}
You see, if the book is closed (frame 1), it should open the cover (frame 2 onwards). The page is to be selected anyway, which it does nicely, but without my scrollbar (it checks if the maxscroll is bigger than 1, if not, I don't want a scrollbar).
Once the book is opened, I have the following piece of code on my frame :
ActionScript Code:
if (_root.mainDummy.rapportClip.Cover.Page._currentframe == 1) {
_root.SelectPage(2);
//this is the function with the switch case, case 2 is 'loading the index swf'
}
Which is what goes wrong, me thinks. Because, if the book is already open, this part no longer happens.
I don't really see how this is affecting the .maxscroll value of the text. Any help will be much appreciated ! I'm using Flash MX (u know, 6).
View Replies !
View Related
Directory Structure
Hi there, I've got a weird problem here....
I made a flash web site with this structure directory:
//
index.html
index.swf
-->/swf
-------page1.swf
-------page2.swf
wich work fine but I want to change my structure to this:
//
index.html
-->/website
-----------index.swf
-----------/swf
---------------page1.swf
---------------page2.swf
I change the "src=" patch to "website/index.swf" and it load... the weird things is that it dosen't load or find "page1.swf, page2.swf..." and in my index.swf code, it's wrote:
loadMovie("swf/page1.swf",1)
Can please someone help me?!?
View Replies !
View Related
|