Dynamic Mask Based On Color?
I am using Flash MX to dynamically load jpgs, and then the user will be able to drag them around the screen. The images I have are all different shapes but they always have the exact same background color. I would like to mask out that particular color, so that the background is transparent. Like the "blue screen" used by the TV weather man! Is this possible? I have a sinking feeling it isn't. (I love being able to import jpgs, but if I could import GIFs I wouldn't have this problem!)
Thanks,
Sheri
FlashKit > Flash Help > Flash MX
Posted on: 08-06-2002, 03:53 PM
View Complete Forum Thread with Replies
Sponsored Links:
Color Mask? Or Setting Color Of A PNG Bitmap?
I made a movie clip of a sequence of outer glow effects in PhotoShop to give the effect of a pulsating halo. I made the clip seperate from the beveled graphic it surounds so I could mask it. I want to have it pulsating between colors as it expands and contracts. I made the halo white, not anticipating that there would be any great difficulty in masking or changing its color.
So my question is, how do you make a color mask? I can only seem to get alpha masks, it completely ignores the color of the masks I make and lets through all colors, no matter the color of the mask.
Or alternately, is there a why to alter the color of all the pixels in a PNG bitmap, so that the varying transparancy/alpha of different pixels is preserved but the color is uniformly changed?
View Replies !
View Related
Color Based Loader
In Flash MX, I have created a simple loader that displays % loaded in a dynamic text box (myOutput) and I would like to update the color of a movie clip based on the percent loaded (e.g. 0% = red, 100% = green, 50% = some shade in between). I've created a 100 frame (1 frame = 1%) Movie Clip (arrowColor) with a motion tween that uses Tint to change the color.
Using the following script, the text (% loaded) portion works perfect. However, tellTarget only plays the first frame of arrowColor. I've tried using a "while" loop to cycle through tellTarget while percent<100 but it doesn't work and crashed the flash plugin. Why doesn't tellTarget update arrowColor as the percent value changes? To make sure that the code works, I entered an arbitrary value (e.g. 50) instead of "percent" and it worked.
percent = Math.floor(getBytesLoaded()/getBytesTotal()*100);
myOutput.text = percent+"%";
tellTarget ("arrowRotate.arrowColor") {
gotoAndStop(percent);
}
Any suggestions would be greatly appreciated...
View Replies !
View Related
How To Do Collision Based On Hex Color
I am trying to figure out a way to have collision detection based on a color.
I am making a game where you have to move a ball around but the ball will collide with black boxes on the screen. I am currently using hitTest to detect collision but the ball often gets stuck on the boxes. I want to find a way to have the ball checking to see if it is colliding with a color instead of just a movie clip. I was told there is a way to do this but I can not figure out how. Any help would be appreciated. I attached the file I am currently working on, hopefully it will help you understand what I need help with.
thanks.
View Replies !
View Related
[F8] Button Color Change Based On Ext. Variable...
Hello, All...
I'm having a dickens of a time figuring out how to make a button initially load a specific color based on the output of a variable in a txt file. I can get the 'dynamic text' version in the Help file to work, but what I'm wanting to do is this, and I can't seem to figure it out:
When the swf file loads, I need a variable read from blah.txt (say &a=2&), then based on that, when the scene loads, I need a button (button01) to either be green if 'a == 1', or red if 'a == 2'.
Any help or advice would be greatly appreciated.
Let me know if any other info is needed... I've been beating my head against the wall....
Thanks,
Dave
View Replies !
View Related
[F8] Screen Background Color Changes Based On Time Of Day
Hello everyone,
Just wondering if it's possible to user the current time of day or month to change the background color or background image, etc, or any other elements on the stage?
ex.
It's 3AM, and the visitor sees a black background, or nighttime scene.
It's 6PM, and the sun is setting.
It's December, and there's a snowy, winter scene.
THANKS!!
View Replies !
View Related
Code Based Color Adjust Filter?
I have a symbol on the stage; it contains a bitmap with many colors but primarily blue. I want to get the same effect as if I used the color adjust filter on it. ie, color shift the whole symbol lets say to look green, but still keep all the detail.
How would I do that in as3?
Thank you much!
View Replies !
View Related
Filling A Shape With Color Based On Variable Value
Hi! I am working on a flash game. As the user goes through they accumulate points. Here is what I want to do:
When the user answers questions correctly it will increase the value of a variable. (each correct answer increases the value by 1). I have a heart (could be any shape) on the screen that is empty at the beginning of the game. As points are awarded I want that heart to slowly fill with a color.
Ideally I need to be able to set the highest point value (for example 500 points) and that correlate to 100% filled.
can anyone help me out with this one?
thanks,
aswhitehead
View Replies !
View Related
Dynamically Changing Color Based On External(?) Info [renamed]
Hi all,
I read through the random colour tutorial with interest, and wondered to myself if an objects colour could be altered in other ways... such as by a weather feed or stocks feed.
I thought it would be interesting if the design of a site could be changed regularly by outside influences.
Is this possible?
Umm.. do I need to get out more?
Any information would be greatly appreciated!
View Replies !
View Related
Dynamically Changing Color Based On External(?) Info [renamed]
Hi all,
I read through the random colour tutorial with interest, and wondered to myself if an objects colour could be altered in other ways... such as by a weather feed or stocks feed.
I thought it would be interesting if the design of a site could be changed regularly by outside influences.
Is this possible?
Umm.. do I need to get out more?
Any information would be greatly appreciated!
View Replies !
View Related
Mask Image From B/w To Color?
I want to use a b/w image as a preloader and as the content loads, the image gets colored the same percent. Just like a regular preloaderbar, just that the counter is the color. Anyone understands what I mean and can point me in the right direction for accomplishing this?
thanks
View Replies !
View Related
Return MC To Original Color After Dynamic Color Change
How is it done? All I've seen on the web is how to change the color. Well how about going back. I'm talking about a MC with many colors. I can't just change back to a single hexadecimal color.
I can accomplish the change as it passes over a frame, but I can't get it to change back.
In the frame is this:
ActionScript Code:
cHurtColor = new Color(_root.compMC);cHurtColor.setRGB(0x00FF33);
Trying to keep this simple....
View Replies !
View Related
Return MC To Original Color After Dynamic Color Change
How is it done? All I've seen on the web is how to change the color. Well how about going back. I'm talking about a MC with many colors. I can't just change back to a single hexadecimal color.
I can accomplish the change as it passes over a frame, but I can't get it to change back.
In the frame is this:
ActionScript Code:
cHurtColor = new Color(_root.compMC);cHurtColor.setRGB(0x00FF33);
Trying to keep this simple....
View Replies !
View Related
Dynamic Color Slider Or Color Wheel ?
can someone help, or direct me to a tuttorial on
¥ user input to adjust/select color
- must be RGB sliders, or colorwheel/color bar to choos from
I need the user to be able to change the background color of a graphic, without them knowing anythign about color.
so it would be best if they could just adjust RGB sliders or pick from a color wheel would be even bettter. . .
thanks
Darin
P.S.
I could make a bunch of buttons with a few basic predefined colors, however this would be limmiting in selection.
View Replies !
View Related
Dynamic Mask Doesn't Mask...
I have a local radar image that I am loading into a holder movie clip and trying to mask but it doesn't work. Both the image and the mask are being displayed.
The holder movie clip is 'dopplerRad_mc' and I am attaching from the library.
The clip the image is loaded into is 'dopplerHolder_mc' and is dynamically created.
I then attach a mask movie clip from the library, 'imageMask1'.
My code is below. Any idea what I am missing?
var dopplerRad_mc:MovieClip = attachMovie("doppler_mc","dopplerRad_mc", getNextHighestDepth());
var doppler_mc:MovieClip = dopplerRad_mc.createEmptyMovieClip("dopplerHolder_ mc", dopplerRad_mc.getNextHighestDepth());
var mclListener:Object = new Object();
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(mclListener);
mcLoader.loadClip(doppler, dopplerRad_mc.dopplerHolder_mc,1);
dopplerRad_mc.attachMovie("imageMask","imageMask1" ,2);
dopplerRad_mc.dopplerHolder_mc.setMask(dopplerRad_ mc.imageMask1);
View Replies !
View Related
BUG: Linux Flash 9 Asumes X11 Color Mask -> Colors Wrong On SunRay
We are running Flash 9 for Linux on SunRay. These Thinclients have their own Xserver (Xnewt) it does not use the same color mask as XFree/Xorg.
Xfree -> red, green, blue masks: 0xff0000, 0xff00, 0xff
Xnewt -> red, green, blue masks: 0xff, 0xff00, 0xff0000
Normally an X11 program is supposed to query the server (xdpyinfo | grep mask) for it's color mask and then work accordingly. Flash 9 for Linux seems to skip this step with the result that the colors come out all wrong. See also this entry on the Sunray mailing list.
It would be great to get this fixed.
View Replies !
View Related
Dynamic Mask For Dynamic Text Won't Working Any Body Pls Help
Im' supposed to make a scrollable gridlike simulation with using MC. Inside that MC there are dynamic text area as cell in which its text will be updated dynamically.
Now i have a strange prob that when i use setMask to mask that grid MC it won't working
I have the MC name 'grid'
above that another MC name 'msk'
code is like tha
grid.setMask("msk");
it only shows the full grid instead of masking area.
View Replies !
View Related
[F8] Dynamic Drawing And Dynamic Mask Problems
Hi everyone. I've decided to start learning dynamic drawing (I'm using flash 8) and so I'm attempting to create a basic menu using purely actionscript. What I'm working toward is creating a main button that when pressed, it's sub buttons will drop down from behind it, using a mask to make them show up as they drop down.
I'm still at the initial phase of this. Currently I'm just placing the buttons in their final location so I can work the mask issue, which is where I'm having problems. I've got my script to create the buttons in their proper locations, and then to create the mask in it's proper location. The problem is when I try to apply the mask to the sub-buttons, it also masks the main button. I've tried this several different ways but still have not gotten any success.
Could someone take a look and see what you think? Also, if there is a much easier way to do this, please feel free. Thanks.
Here's my code:
Code:
//Set up some starting variables:
//menu position:
menuxoriginal = 100;
menuyoriginal = 100;
menux = menuxoriginal;
menuy = menuyoriginal;
//menu width and height:
w = 100;
h = 25;
//menu separation:
s = 5;
//corner clip off:
clipoff = h*.25;
//number of menu items:
n = 3;
//
//
//Now create the buttons - no labels on them yet.
//
for (i=1; i<n; i++) {
_root.createEmptyMovieClip("btn"+i, i);
with (_root."btn"+i) {
trace(this);
moveTo(menux, menuy);
//shade first box different color than all others:
if (i==0) {
beginFill(0x222222);
} else {
beginFill(0x3377ff);
}
//draw lines (button)
lineTo(menux+w, menuy);
lineTo(menux+w, menuy+h-clipoff);
lineTo(menux+w-clipoff, menuy+h);
lineTo(menux, menuy+h);
endFill();
}
//prep y location for next button (current y value+button height+separation value)
menuy = menuy+h+s;
}
//
//
//For Testing Purposes: place start of mask halfway over so we can see what's going on. Normally will be the original value of 100.
//
menux = 150;
//reset menuy to be the original value plus the height of the first button.
menuy = menuyoriginal+h;
//create the mask to start at bottom of fist button and cover all remaining buttons:
_root.createEmptyMovieClip("mask", 10);
with (_root.mask) {
moveTo(menux, menuy);
beginFill(0x000000);
lineTo(menux+w-clipoff, menuy);
lineTo(menux+w, menuy-clipoff);
lineTo(menux+w, menuy+5+((i-1)*(h+s)));
lineTo(menux, menuy+5+((i-1)*(h+s)));
endFill();
}
//here make the mask clip mask all the bottons except the first:
for (i=1; i<n; i++) {
_root.btn+i.setMask (_root.mask);
}
View Replies !
View Related
Dynamic Text Under Dynamic Mask W/ MS+ Scroller.......
Hola, everybody. I am stuck. I have some dynamic text under a dynamic mask.....I am using one of the MS+ scrollers (www.mirage-studios.com). This scroller requires the content to be under a mask. Since dynamic text wont show under a regular mask, I decieded to use a dynamic mask. The problem is that this scroller will only scroll up to the end of how big I made the dynamic text. Meaning if I made the dynamic text 500px in height, but the text being dynamically put in it, the scroller will only scroll down to that 500th pixel, rather than to the end of the text. Anyone know what I can do?
Thanks,
Gerard
View Replies !
View Related
Dynamic, XML-based OOP Quiz
Hello-
I've been banging my head against the following wall...
I'm developing a dynamic online AS3 quiz application that delivers a number of different types of questions about a physics problem (demo here: http://www.tc.umn.edu/~ehoover/physics/v2/testModule.html -see answer key below). The quiz data is coming from XML documents (one for each Section) and the application structure is object-based with the following hierarchy: Parent .fla > Module > Section > Quiz > Question. The parent .fla contains a single Module instance which in turn contains a number of Sections (usually 5). Each Section contains a number of Quizzes which finally contains a number of Questions.
The user proceeds through the module by answering the questions but eventually they get to a fork in the road where they can choose from a number of different physics approaches (so it's a branching quiz) to solve the given problem. Eventually, it will be possible to choose more than one approach to solve the given problem and in order to do so the user must be allowed to follow a branch to it's conclusion. If the approach isn't sufficient to solve the problem on its own, the user is then returned to the impasse question and allowed to select a different approach.
Which is where my problem lies: After selecting an insufficient/incorrect approach, the user is returned to the approach impasse and the question is displayed as expected, but the question interface appears to be disabled.
It's probably not practical to post the code here, but I'd be happy to make it available to anyone who wishes to help.
Thanks!
-Erik
Answer Key:
Q1: 1
Q2: 1
Q3: 2
Q4: 2 (others are valid, but for the sake of expediency choose A2)
Q5: valid targets are Ai, m, Ff, W, Fn
View Replies !
View Related
Dynamic Mc - Scrolling Based On Mousemove
I am trying to achieve a scroll effect with mouseevent . I am dynamically attaching 4 mc clips (image1,2,3,4) from the library using attachMovie and I duplicate another movie clip.
ActionScript:-------------------------
numImages = 4;
width = 200;
for (i=1; i<=numImages; i++) {
name = 'm'+i;
_root.holder.attachMovie("image"+i, name, i);
_root.holder[name]._x = i*200;
}
holder.duplicateMovieClip(image2,50);
_root.image2._y= _root.holder._y;
--------------------------------------------------------
I add this code on the mc holder which holds the 4 images scrolling
ActionScript:--------------------------------------------
onClipEvent(load){
centerPoint = 200;
switchDistance = (_width - (centerPoint*2))/2;
//trace(switchDistance);
_root.image2._y = _y;
}
onClipEvent(enterFrame){
movieBounds = this.getBounds(_root);
if( _root._xmouse <=movieBounds.xMax && _root._xmouse >=movieBounds.xMin && _root._ymouse <= movieBounds.yMax && _root._ymouse >= movieBounds.yMin)
{
//speed factor = 40
_x += (centerPoint - _root._xmouse)/100;
if (_x < -switchDistance) {
_x += _width;
}
if ((_x - _width) > -switchDistance) {
_x -= _width;
}
_root.image2._x = _x - _width;
}
}
------------------------------------------------------
I am not sure whether this method is right... also how do I test whether the duplicatemovieclip is working or not..
advacned thnx!!
View Replies !
View Related
Action Based On Dynamic Textbox's Value
hello people,
Am in a bit of a pickle regarding a drag and drop excercise i'm working on... i've got some draggable items that each contain a textbox (which i've set the values of via a couple of arrays in the root), which will look for a 'correct' target based on the value of the textbox.
so the textbox's variable is 'textValue', i've got the drag button as this (the _droptarget.answer is also set in the root):
if(eval(_droptarget.answer) == textValue) {
// do something
}
but what happens is that the textValue is returned as whatever is in the textbox before it's actually loaded - so if you write 'test' in the box in the editing window, textValue traces as 'test' or whatever you write in there. it seems to be ignoring the dynamically placed values.
I'm not sure whether i need to try something with preloading or not, but to be perfectly honest, i really am stuck! it might have something to do with the _droptarget.answer on top of that, too...
desparately hoping someone has any idea of what i'm talking about,
mark
View Replies !
View Related
Dynamic Drawing-based Guestbook
hey all. i want to design an interactive guestbook where people can 'draw' designs and sign them. the idea is to give them a set of drawing tools (i.e. some color swatches and freehand brushes), and they can draw whatever they want, then save it, so that when other people come back to the site, it will load all of the previously drawn 'signatures'. im pretty comfortable with advanced AS, so im not so much as intimidated by tackling the development, as i am by simply figuring out how to tackle the problem of saving and storing dynamically drawn MCs. is this possible??? any help, advice, or links would be *incredibly* appreciated.
cheers
j
View Replies !
View Related
Dynamic Menu Based On A .txt File
I'm doin' a site in html for a friend of mine and I wanted to make a simple interface for him to modify various things such as images and so on.
I draw a cute menu for his children in flash (with penguins, flowers and such stuff ) and considering that they could add extra pages I had an idea!
Is there possible to make a simple falsh menu that takes button names and links from a .txt file? that would be awesome...
Example!
let's say that my menu has 3 voices (kids, friends, drawings); if my idea was possible, I could modify the txt file with an extra voice and it would appear next to the previous tree with the relative link...so his kids could modify the txt to have the result in the site as well! I don't know if it can be done...is it possible?
View Replies !
View Related
[F8] Dynamic .swf Size (based On Browser)
I need to create a flash webpage that gathers information from the bowser and sends it to the swf to adjust the size of the movie accordingly and also adjusts the elements in the flash movie accordingly. any links to helpful articles or tutorials would be much appreiated.
I attached a file of a sketch of what im basically talking about.
View Replies !
View Related
[F8] Autoscroll Dynamic (XML Based) List?
Hi folks... long time viewer, 1st time poster...
Problem:
I'm trying to implement a self-scrolling list that gets its data from an XML file via php...
Current Code:
Code:
var theXML:XML = new XML();
theXML.ignoreWhite = true;
theXML.onLoad = function() {
var nodes = this.firstChild.childNodes;
for (i=0;i<nodes.length;i++) {
premiumlist.addItem(nodes[i].firstChild.nodeValue,i);
}
}
theXML.load("http://localhost/BrianTest.PHP");
I can get the Data to appear in the scroll list but cannot figure out a way to make it autoscroll... nor can I make the apply any type of formatting to the text...
Can anyone assist?
Thanks in advance...
View Replies !
View Related
Screensaver - Dynamic Web Based Content
Hi,
Can anyone recommend any screensaver software that can convert swfs that use remote (http) xml files for mac and pc? Id also like to allow the user to set variables through the screensaver settings panel once its been installed and then pick up via AS3 if poss.
cheers
View Replies !
View Related
Dynamic Image X Based On Width
Hiya, I'm working on something where a bunch of images are loaded from an XML document and I want them to be positioned based on the previous images width. I've got it working but it's not very pretty the way it works. I wanted to use a for loop to get it working but I found I couldn't get it working that way. Can anyone tell me if there's a faster way to do it? It runs kinda slowish.
Cheers.
Here's the Flash 8 file and XML.
View Replies !
View Related
Problem In XML Based Dynamic FLV Player
Hi,
This is really very urgent. I have been working on an xml based dynamic flv player which plays the commercial before each and every actual video.
I am making use of 2 xml files to play the data(videos) from.
1. category1.xml --- loads the actual video.
2. commercials.xml --- loads the commercials.
The commercials have fixed duration of 10 seconds & after this the video plays for its own duration.
I have two functions which interact with each other and cause the flv player 1st play the commercial & then plays the video. This runs fine till the functions control the player.
But the problem arises when I select the vidoe to play from the playlist. This causes the duration of 10 seconds goes on reducing and ends up becoming 0 & hence the commercial stops plying.
Please help me I am attaching the fla file & xml files.
Please help, I have 1 days deadline to solve the problem.
View Replies !
View Related
Dynamic Flash Based Screensaver
Hi there!
We're looking at doing dynamic flash based screen savers and I'm looking for some ideas/suggestions on:
1. How complex it is
2. Best way to source the content- xml, txt, etc.
Any help or advice you can give is greatly appreciated. Thanks!
View Replies !
View Related
Dynamic Percentage Based Preloade Possible?
Is it possible to have a preloader (external) which displays percentage loaded etc for dynamically loaded MCs?
I know about all the tutes for transitions etc, but they just use a flashing "loading" bit of text.
Please forgive me, as I am posting this while attempting it in Flash muself, so I may find the solution, just thought two ways are better than one.
View Replies !
View Related
Dynamic Percentage Based Preloade Possible?
Is it possible to have a preloader (external) which displays percentage loaded etc for dynamically loaded MCs?
I know about all the tutes for transitions etc, but they just use a flashing "loading" bit of text.
Please forgive me, as I am posting this while attempting it in Flash muself, so I may find the solution, just thought two ways are better than one.
View Replies !
View Related
[XML] Dynamic Text Based Buttons
Hello everybody,
Challenging problem for me but likely a simple problem for you guys.
I have a scrolling "thumbnail" panel according to the tutorial on this website, filled with text based buttons with a rectangular hitzone on top off the text.
I would like to create these buttons via an xml file to easily add buttons to my menu.
The xml file should state the text on the button a variable (xmlfile for slideshow) for usage in the flash movie and a frame number to direct my flashmovie to my slideshow.
The fla file should embed the font and create the hitzone for the buttons.
I would also like the thumbnail panel to find it's own boundries, but that is of later concern.
Thanks in advance for any pointings in the right direction,
Floren
PS If you want to see how i want to implemend it see http://www.floren.nl/ under the portfolio section.
View Replies !
View Related
Loading File Based On Dynamic Variable
im tring to load a .txt file based on a result eg.. todaysdate+.txt
so here is the issuse,.
this i understand to pull a file directly
loadVariablesNum("data.txt", 0);
this is the issue..
loadVariablesNum=_root.result;
the _root.result is a formula bulding todays dat and adding the .txt extension..but it wont load the file..
thanks
View Replies !
View Related
Dynamic Scrollbar Based On Notepad Text
Hey guys,
I know how to import text from a notepad file into a text box in flash. Is there a way to have that textbox dynamically get larger depending on how much text is written in the text file? For instance, if I put in one sentence the dynamic text box would be one line long. On the other hand, if I put in a 5 sentences the box would accomodate the larger amount of text that was coming in.
Also....one more thing, is there a good tutorial out there that tells you how to edit the scrollbar components? thanks for the help everyone
Don
View Replies !
View Related
Dynamic, XML-based Easing, Elastic Menu?
Hey all,
I'm looking for a vertical menu/nav system that uses XML or an Array to define Items and Subitems, that will animate between different submenu dropdowns, closing one as another opens... I haven't yet seen anything that seems to meet all of these specs... What i've found so far has been horizontal drop downs that animate, or vertical dropdowns that DON'T animate at all...it would accomplish the goals of the navigation, but leaves you wondering why you'd build it in flash at all...
any help or thoughts or products people could reccomend would be great. Prior to this we've been animating each drop-down manually with tweens and variables inside a nav movie clip...
thanks!
View Replies !
View Related
Resize MC Based On Loaded Dynamic Text?
Hey All,
I am looking to resize a tab movieclip that I have behind a dynamic text field. I would like to rezize the tab movieclip based on the character amount or width. Can someone please help me out or point me in the right direction.
Thanks in advance!
/zach
View Replies !
View Related
Dynamic Generated Text Boxes Based On XML
( Using CS3 - making this for Flash v5 or 6)
I'm creating a gallery.
My problem is this. I am trying to create buttons with the numbers 1 through however many entries are in the xml file. Also trying to get a transparent box to dynamically tween from the previous button to the next button to show which slide you are on. Everything was working fine until I started making my starting point function. I am trying to populate the buttons in a way that they are centered on the page at the very bottom.
I fixed the stage width problem (wasn't a capital S) But I am still having difficulties populating the buttons at the bottom. Also the slider moves like it should, but only after the nextImage() functions activates. Before that it's broken.
Ive updated the script but I can't change the attachment...
Any insight or shortcuts in this process would be helpful, thanks.
import mx.transitions.Tween;
import mx.transitions.easing.*;
// Variables
var currentImage:Number = 0;
var userImage:Number = 0;
var userControl:Boolean = false;
var xCord:Array = new Array();
var lastCord:Number = numbstart;
var stageWidth:Number = 0;
var objectwidth:Number = 0;
var numbstart:Number = 0;
var placementTotal:Number = 0;
//xml variables
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
//Functions
function userPlayHead() {
_root.bar.playPause_clip.gotoAndStop("play");
var xPosT:Tween = new Tween(_root.playerHeader, "_x", Regular.easeOut, _root.lastCord, _root.xCord[currentImage], .5, true);
_root.lastCord = xCord[currentImage];
}
//
function motionnormal() {
if (_root.userControl == false) {
var xPosA:Tween = new Tween(_root.playerHeader, "_x", Regular.easeOut, _root.lastCord, _root.xCord[currentImage], .5, true);
_root.lastCord = xCord[currentImage];
}
}
//
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
imageLoc = [];
link = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
imageLoc[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
link[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
}
firstImage();
startingPoint();
} else {
content = "Loading";
}
}
//
function nextImage() {
if (userControl == false) {
if (currentImage<(total-1)) {
currentImage++;
if (loaded == filesize) {
_root.movie._alpha = 0;
_root.movie.loadMovie(imageLoc[currentImage],1);
trace(link[currentImage]);
}
} else {
currentImage = 0;
_root.movie._alpha = 0;
_root.movie.loadMovie(imageLoc[currentImage],1);
}
}
}
//
function firstImage() {
if (loaded == filesize) {
_root.movie._alpha = 0;
_root.movie.loadMovie(imageLoc[0],1);
desc_txt.text = link[0];
currentImage = 0
}
}
//
function userScroll() {
if (loaded == filesize) {
_root.movie._alpha = 0;
_root.movie.loadMovie(imageLoc[userImage],1);
}
}
function startingPoint() {
stagewidth = Stage.width/2;
objectwidth = ((total+2)*12.8)+(3*(total-1));
numbstart = stagewidth-objectwidth;
i = 0;
while (i<=total) {
duplicateMovieClip(_root.bottomButton, "bottomButton"+i, i);
placementTotal = numbstart+(15.8*(i+1));
_root.xCord[i] = placementTotal;
_root.bottomButton[i]._x = placementTotal;
_root.bottomButton[i]._y = 232.8;
_root["bottomButton"+i].imageNumber.txt = i;
i++;
trace(_root.xCord[i]+" Xcord");
trace(placementTotal+" PlacementTotal");
trace(objectwidth+" Objectwidth");
trace(numbstart+" numbstart");
trace(stagewidth);
}
_root.bottomButton._visible = false;
}
/////////////////////////////////////
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (movie._alpha<100) {
movie._alpha += 10;
}
}
};
// END XMl ND XMl ND XMl ND XMl ND XMl ND XMl ND XMl ND XMl ND XMl ND XMl
//Button Actions
_root.bottomButton0.onRelease = function() {
_root.userControl = true;
_root.userImage = 0;
_root.currentImage = 0;
userPlayHead();
userScroll();
};
_root.bottomButton1.onRelease = function() {
_root.userControl = true;
_root.userImage = 1;
_root.currentImage = 1;
userPlayHead();
userScroll();
};
_root.bottomButton2.onRelease = function() {
_root.userControl = true;
_root.userImage = 2;
_root.currentImage = 2;
userPlayHead();
userScroll();
};
_root.bottomButton3.onRelease = function() {
_root.userControl = true;
_root.userImage = 3;
_root.currentImage = 3;
userPlayHead();
userScroll();
};
this.bar.playPause.onRelease = function() {
if (userControl == false) {
_root.userControl = true;
_root.bar.playPause_clip.gotoAndStop("play");
} else {
_root.userControl = false;
_root.bar.playPause_clip.gotoAndStop("stop");
}
};
--------------------------
The XML File has this within it.
<imagelocs>
<pic>
<imageloc>image1.jpg</imageloc>
<link>http://www.partsexpress.com/audio-video-accessories.cfm</link>
</pic>
<pic>
<imageloc>image2.jpg</imageloc>
<link>http://www.flashkit.com/movies/Interfaces/Menus/Sliding_-Jason_Sa-12087/index.php</link>
</pic>
<pic>
<imageloc>image3.jpg</imageloc>
<link>http://www.kirupa.com/developer/mx2004/xml_flash_photogallery9.htm</link>
</pic>
<pic>
<imageloc>image4.jpg</imageloc>
<link>http://www.partsexpress.com/structured-wiring.cfm</link>
</pic>
</imagelocs>
View Replies !
View Related
Running Dynamic Movies Based On Location?
Ok bare with me, I've had a slightly crazy idea ... and I don't know whether it's possible or not.
I'm like to try and run a dynamic Flash creative that will include the viewers town/location in a dynamically generated field. So for example, the content would say something like:
"Such and such a band coming to [b]London[/B[" for all those people in London, but
"Such and such a band coming to Reading" for all those people in Reading.
Is this actually possible? And if so how would I go about doing it? Can you get this sort of information from a users IP address or would I have to go about finding it from some other place?
Any suggestions at all would be REALLY welcome.
Thanks,
View Replies !
View Related
Autosize Dynamic Box Based On No. Of Chars And Align
Very new to this, appreciate any help!
I have 1 dynamic text box which is a counter. Immediately to the right of this I have a static text box.
There should be a small gap (eg. 15px) between the end of the text in the dynamic text box and the start of the text in the static box.
How do I make the dynamic tbox autosize then put the static box 15px after it?
*As the dynamic box holds numbers, I don't want it to resize every time the numbers change (as it sort of flickers all the time as some numbers like 1 are more narrow than numbers like 6).
But, I just want it to resize when for eg. it goes from 100,000 to 99,999 and then from 10,000 to 9,999. So just when the number of digits and "," change.
Many thanks in advance
View Replies !
View Related
How To Do This? - Flash Based Dynamic Image Uploading
Hi,
In burst of inspiration and creative ideas last night while downing a few at my mates(it's where the most creative thoughts come to life I feel), I've decided that I would like to create an image uploading flash-based site. Well that's just one of the ideas for the website in question.
This (pretty much 100% flash based - on the surface anyway) website idea is that the user is able to upload an image - like you would on a forum sort of - and then I want the image the person uploads to dynamically appear on the flash website straight away as the person has uploaded it.
Basically these photos would go into a 'pending' section on the site, for everyone to see and later on I'd like to do a few tricky things like allow the public to decide if the images in the 'pending' section should stay or not either by a simple yes/no query or maybe more complex voting system (a bit like at newgrounds I guess) and then if it didn't get enough votes (or a user hits 'no') the image would get deleted off the site. If it gets through (user hits 'yes') then that image is moved over to the 'hall of fame' or something like that. But for now, I'd just like to get a simple program running where I can upload images and they dynamically appear on the flash stage.
Now given I don't have much server side experience, I'm hoping this isn't too much of a tough task I've given myself. I do have the passion and energy to get this done though, which is great because I've been looking for a personal project to do for months.
I guess I'm just wondering how would I go about doing this? Like, is PhP the best way to go about it, or can it be all done in flash.. or are there alternative methods?
My knowledge lies with flash and as I said I've never created anything server-side really before so this will be a great exercise for myself in terms of learning new stuff!
Any help and information would be greatly appreciated.
Cheers!
View Replies !
View Related
Updating Dynamic Text Box Based On Click
i have a flash file in which i have loaded in data from an xml file. everything works great, but i am trying to determine how to change the content of text in one dynamic text box based on when a user clicks on a text link in another dynamic text box.
i realize i would have to assign an event listener for the mouse click and program a function to change the text, but i am new to AS3 and don't have a clue of where to start to accomplish this.
Any ideas would be appreciated!
View Replies !
View Related
Conditional Statement Based On Dynamic Textbox Value
I can't seem to get an if statement to check if a value in a dynamic text box is equal to a string...
It seems like it should be very easy, but i'm completely new to flash.
Here's my actionscript
onClipEvent (load) {
loadVariables("http://127.0.0.1/tune/verify.php", this, "GET");
if (_root.serververify == "ok") {
_root.gotoAndPlay("first");
} else {
_root.shizzit = "Unable to connect to server";
stop();
}
}
Now, the loadvariables command completes, and I can actually see the dynamic text box updated with the variable loaded from "http://127.0.0.1/tune/verify.php". In the dynamic textbox 'serververify,' the value reads 'ok' without the quotes. So how do i check to make sure that's what the textbox reads? Every time i execute this, it says "unable to connect to server" in another dynamic textbox with the variable name 'shizzit.'
The variable name of the textbox i'm trying to evaluate is 'serververify'
View Replies !
View Related
Dynamic Grid / Dynamic Mask
Hi all,
I'm looking for some source code that would allow me to do something like the 4up flash piece at this link:
http://www.instyle.com/instyle/flash...128042,00.html
Can anyone help? What would you call something like this?
Cheers,
john
View Replies !
View Related
Changing A Variable Name Based On Another Dynamic Text Field.
OK heres what I need to do:
1. Import a value from an html file into a text field in my Flash movie. FIGURED THIS STEP OUT.
2. Change the Variable (not what appears in the text field but the variable name of the field) of a different text field based on the text that I imported from the html file.
Basically I have a flash movie embedded in an include(or will if I can get past this issue) that will appear on every page on my site. The movie contains helpful information for that section that you are on. So it is specific info for each section. Because I am only using one include I can really only use one flash movie.
Sooo... I will have a text files that has about 100 different phone numbers. Based on the value that the movie imports from the html file I need to import an associated phone number from the text file.
This is complex so please don't hesitate to ask if you need more details. Thanks in advance for the help
View Replies !
View Related
|