Copy link to clipboard
Copied
I want to make my icons glow, or pulsate, if they have not been clicked. If the viewer clicks on the icon, they will watch a video clip, and then be sent back to the main screen with the pulsating icons. Is it possible for Flash to detect if that icon has been clicked when returning to the main screen so the icon they clicked can stop pulsating?
? I am certain it is not possible with the timeline. Any help would be appreciated as always
that setup is problematic. use a one frame swf that contains your icon movieclips, only. assign the icon movieclips instance names like icon1_mc, icon2_mc etc. add an flvplayback component to your library.
you can then use:
var flv_pb:FLVPlayBack=new FLVPlayBack();
flv_pb.addEventListener(Event.COMPLETE,completeF);
function completeF(e:Event):void{
removeChild(flv_pb);
}
var gf:GlowFilter=new GlowFilter();
var previouslyClickedIcon:MovieClip;
var iconA:Array=[icon1_mc, icon2_mc, etc..];
var flvA:Array=
...Copy link to clipboard
Copied
what's the relationship between your swf and the icons?
are the icons in the swf? are the icons outside the swf but in the same html page as the swf?
Copy link to clipboard
Copied
The icons are essentially buttons that move to another frame and play a video. They are all in the same exported swf
Copy link to clipboard
Copied
convert your icons to movieclips, add mouse listeners and apply a glow filter (animate the filter if you want it to pulsate) to a clicked icon and unapply the filter to the previously clicked icon movieclip (if there is one) in your listener function.
Copy link to clipboard
Copied
I should rephrase this I suppose. I know how to do mouse over and click events. I know how to animate movie clip buttons. Let me try to explain this better since I screwed it up the first time pretty badly.
Say the main area is in frame one. This includes all the movie clip buttons (say 4 of them). On frames 2-5, there are brief videos that play through an FLV player. On the initial visit to Frame 1, the user clicks on one of the buttons to take them to, say, frame 3. Once the movie completes, the user is then put back to frame 1 again. Is it then possible to have the frame 3 button no longer glow or pulsate, but still work as a button? I want my user to know where they have already been on my site, and I am not sure this is possible
Copy link to clipboard
Copied
that setup is problematic. use a one frame swf that contains your icon movieclips, only. assign the icon movieclips instance names like icon1_mc, icon2_mc etc. add an flvplayback component to your library.
you can then use:
var flv_pb:FLVPlayBack=new FLVPlayBack();
flv_pb.addEventListener(Event.COMPLETE,completeF);
function completeF(e:Event):void{
removeChild(flv_pb);
}
var gf:GlowFilter=new GlowFilter();
var previouslyClickedIcon:MovieClip;
var iconA:Array=[icon1_mc, icon2_mc, etc..];
var flvA:Array=["flv associated with icon1.flv", "icon2.flv", etc..];
for(var i:int=0;i<iconA.length;i++){
iconA.addEventListener(MouseEvent.CLICK,clickF);
}
function clickF(e:MouseEvent):void{
if(previouslyClickedIcon){
previouselyClickedIcon.filters=[];
}
MovieClip(e.currentTarget).filters=[gf];
addChild(flv_pb);
//position flv_pb
flv_pb.source = flvA[iconA.indexOf(e.currentTarget)];
}
Copy link to clipboard
Copied
This may do it. But I may be over my head. How would use an imported swf to control my main timeline? I apologize for being so ignorant in flash and as3
Copy link to clipboard
Copied
what are you trying to do?
Copy link to clipboard
Copied
I am trying to make an exploratory web page in flash. Basically, I want to draw the attention to icons/ buttons that have not been clicked before. If they have been clicked, I still want them to be there, but not glowing or whatever. The only way I know how to make multiple FLV files available to play is by putting them on different frames. I am in school and can not afford a streaming service. I am not sure if what I want to do is even possible. I am also finding bug after bug in CS 6 as compared to CS 5
Copy link to clipboard
Copied
I really need to learn AS3 properly. I am trying to do what I can with whay I know, but I am not a programmer
Copy link to clipboard
Copied
then start coding/working on your project.
if you run into a problem you can't solve on your own, post in this forum.
Copy link to clipboard
Copied
Thanks. Usually I just take my time and look up what I am trying to do. This time, I have a deadline for school and I want to blow my professors away. That is why I am asking these types of questions in here. I have been working on my project and have a working prototype up, but I would like to be able to add the features that make it special. Thanks for all your help
Copy link to clipboard
Copied
you're welcome.
p.s. this is the part of the code that adds and removes the glow filter:
var gf:GlowFilter=new GlowFilter();
var previouslyClickedIcon:MovieClip;
function clickF(e:MouseEvent):void{
if(previouslyClickedIcon){
previouselyClickedIcon.filters=[];
}
MovieClip(e.currentTarget).filters=[gf];
// add your navigation code here.
}